/* PCC Yield Optimizer - Dashboard Styles */
/* Heatmap-specific components and layouts */

/* === Heatmap Container === */
.heatmap-container {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  overflow-x: auto;
  transition: opacity 300ms ease;
}

.heatmap-container.hidden {
  display: none;
}

.heatmap-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border-default);
}

.facility-name {
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.facility-meta {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  font-size: var(--font-size-body);
  color: var(--color-text-secondary);
}

.facility-rating {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
}

/* === Heatmap Grid === */
.heatmap-grid {
  display: grid;
  grid-template-columns: 80px repeat(24, var(--space-3xl));
  gap: var(--space-3xs);
  margin-bottom: var(--space-lg);
}

.heatmap-row-label {
  font-size: var(--font-size-body-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  padding: var(--space-sm) var(--space-md);
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.heatmap-col-label {
  font-size: var(--font-size-caption);
  color: var(--color-text-secondary);
  text-align: center;
  padding: var(--space-2xs);
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--space-3xl);
}

/* === Heatmap Cells (Sprint 7.5A: Reduced size for 6 facilities) === */
.heatmap-cell {
  width: 28px;   /* Reduced from var(--space-3xl) (32px) for better fit */
  height: 28px;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-sm);
  position: relative;
  cursor: pointer;
  transition: all 150ms ease;
}

.heatmap-cell:hover {
  border-width: var(--space-3xs);
  border-color: var(--color-brand-blue);
  transform: scale(1.1);
  z-index: 10;
  box-shadow: var(--shadow-lg);
}

/* === Opportunity Overlays (Sprint 2) === */

/* High opportunity - Green border with glow */
.heatmap-cell.opportunity-high {
  border: 3px solid #10B981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.heatmap-cell.opportunity-high:hover {
  border-color: #10B981;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
}

/* Medium opportunity - Yellow/Amber border */
.heatmap-cell.opportunity-medium {
  border: 2px solid #F59E0B;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.3);
}

.heatmap-cell.opportunity-medium:hover {
  border-color: #F59E0B;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

/* Low opportunity - Red border */
.heatmap-cell.opportunity-low {
  border: 2px solid #EF4444;
}

.heatmap-cell.opportunity-low:hover {
  border-color: #EF4444;
}

/* Competitive win - Blue border with glow */
.heatmap-cell.competitive-win {
  border: 3px solid #005DAA;
  box-shadow: 0 0 8px rgba(0, 93, 170, 0.4);
}

.heatmap-cell.competitive-win:hover {
  border-color: #005DAA;
  box-shadow: 0 0 12px rgba(0, 93, 170, 0.6);
}

/* === Corner Badge (Sprint 2) === */
.corner-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  background: #10B981;
  color: #FFFFFF;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #FFFFFF;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 5;
  pointer-events: none;
}

/* === Color Legend === */
.color-legend {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 12px;
  background: var(--color-bg-page);
  border-radius: 6px;
}

.legend-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.legend-gradient {
  flex: 1;
  height: 20px;
  border-radius: 4px;
  background: linear-gradient(
    to right,
    #FFFFFF 0%,
    #FEF3C7 25%,
    #FBBF24 50%,
    #F87171 75%,
    #DC2626 100%
  );
  border: 1px solid var(--color-border-default);
}

.legend-stops {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-top: 4px;
  font-size: 11px;
  color: #9CA3AF;
}

.legend-stop {
  text-align: center;
}

/* === Heatmap Grid Layout (Sprint 7.5A: Enhanced for 6 facilities) === */
.heatmaps-grid {
  display: grid;
  gap: var(--space-lg);
}

/* For exactly 6 facilities, use optimal 3x2 layout on large screens */
@media (min-width: 1800px) {
  .heatmaps-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* For 2-3 facilities on medium screens */
@media (min-width: 1200px) and (max-width: 1799px) {
  .heatmaps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Stack on smaller screens */
@media (max-width: 1199px) {
  .heatmaps-grid {
    grid-template-columns: 1fr;
  }
}

/* === Empty State === */
.empty-state {
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
  color: var(--color-text-secondary);
}

.empty-state-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-sm);
}

.empty-state-description {
  font-size: 14px;
  color: var(--color-text-secondary);
  max-width: 400px;
  margin: 0 auto;
}

/* === Dashboard Tabs (Sprint 3) === */
.dashboard-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #E5E7EB;
  padding-bottom: 0;

  /* Make sticky header - positioned below main header */
  position: -webkit-sticky; /* Safari compatibility */
  position: sticky;
  top: 72px; /* Position below the main header (header height ~72px) */
  z-index: 100;
  background-color: var(--color-bg-page); /* #F9FAFB */
  padding-top: 12px; /* Add breathing room at top */

  /* Shadow when content scrolls underneath */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0);
  transition: box-shadow 200ms ease;
}

.tab-button {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 14px;
  font-weight: 500;
  color: #6B7280;
  cursor: pointer;
  transition: all 150ms ease;
  margin-bottom: -2px;
}

.tab-button:hover {
  color: #005DAA;
  background: #F9FAFB;
}

.tab-button.active {
  color: #005DAA;
  border-bottom-color: #005DAA;
}

/* === Dashboard Views === */
.dashboard-view {
  animation: fadeIn 300ms ease;
}

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

/* === Opportunity List (Sprint 3) === */
.opportunity-header {
  margin-bottom: 24px;
}

.opportunity-header h2 {
  font-size: 24px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 8px;
}

.opportunity-header .subtitle {
  font-size: 14px;
  color: #6B7280;
}

.opportunity-controls {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px;
  background: #F9FAFB;
  border-radius: 8px;
  flex-wrap: wrap;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.control-group label {
  font-size: 14px;
  font-weight: 500;
  color: #6B7280;
}

.control-group select,
.control-group input {
  padding: 8px 12px;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  font-size: 14px;
  background: #FFFFFF;
}

/* === Opportunity Cards === */
.opportunity-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.opportunity-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 20px;
  cursor: pointer;
  transition: all 200ms ease;
}

.opportunity-card:hover {
  border-color: #005DAA;
  box-shadow: 0 4px 12px rgba(0, 93, 170, 0.1);
  transform: translateY(-2px);
}

.opportunity-card.high {
  border-left: 4px solid #10B981;
}

.opportunity-card.medium {
  border-left: 4px solid #F59E0B;
}

.opportunity-card.low {
  border-left: 4px solid #EF4444;
}

.opp-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 16px;
}

.opp-title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.opp-title h3 {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.opp-time-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: #F3F4F6;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  color: #6B7280;
}

.opp-score {
  text-align: right;
}

.opp-score-value {
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}

.opp-score-value.high { color: #10B981; }
.opp-score-value.medium { color: #F59E0B; }
.opp-score-value.low { color: #EF4444; }

.opp-score-label {
  font-size: 12px;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.opp-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.opp-metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.opp-metric-label {
  font-size: 12px;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.opp-metric-value {
  font-size: 20px;
  font-weight: 600;
  color: #111827;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

.opp-competitors {
  margin-bottom: 16px;
}

.opp-competitors-label {
  font-size: 13px;
  font-weight: 600;
  color: #6B7280;
  margin-bottom: 8px;
}

.competitor-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #FEE2E2;
  border-radius: 16px;
  font-size: 13px;
  margin-right: 8px;
  margin-bottom: 8px;
}

.competitor-chip .popularity {
  font-weight: 600;
  color: #DC2626;
}

.opp-insight {
  padding: 12px;
  background: #F0F9FF;
  border-left: 3px solid #3B82F6;
  border-radius: 4px;
  font-size: 14px;
  color: #1E40AF;
  line-height: 1.5;
  margin-bottom: 16px;
}

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

.opp-actions button {
  flex: 1;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 150ms ease;
}

.btn-action-primary {
  background: #005DAA;
  color: #FFFFFF;
  border: none;
}

.btn-action-primary:hover {
  background: #004488;
}

.btn-action-secondary {
  background: #FFFFFF;
  color: #005DAA;
  border: 1px solid #005DAA;
}

.btn-action-secondary:hover {
  background: #F0F9FF;
}

/* === Gap Analysis Grid (Sprint 4) === */
.gap-analysis-header {
  margin-bottom: 24px;
}

.gap-analysis-header h2 {
  font-size: 24px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 8px;
}

.gap-analysis-header .subtitle {
  font-size: 14px;
  color: #6B7280;
}

.gap-grid-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Summary Panel */
.summary-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.summary-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 20px;
  transition: all 150ms ease;
}

.summary-card:hover {
  border-color: #005DAA;
  box-shadow: 0 4px 12px rgba(0, 93, 170, 0.1);
}

.summary-label {
  font-size: 12px;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.summary-value {
  font-size: 32px;
  font-weight: 700;
  color: #111827;
  line-height: 1;
  margin-bottom: 8px;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

.summary-subtitle {
  font-size: 13px;
  color: #6B7280;
}

/* Grid Controls */
.grid-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: #F9FAFB;
  border-radius: 8px;
  flex-wrap: wrap;
  gap: 16px;
}

.filter-group {
  display: flex;
  gap: 16px;
  align-items: center;
}

/* Data Table */
.table-wrapper {
  overflow-x: auto;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table thead {
  background: #F9FAFB;
  border-bottom: 2px solid #E5E7EB;
}

.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
}

.sortable-header {
  cursor: pointer;
  user-select: none;
  transition: background 150ms ease;
}

.sortable-header:hover {
  background: #F3F4F6;
}

.sort-icon {
  margin-left: 4px;
  opacity: 0.5;
  font-size: 12px;
}

.data-table tbody tr {
  border-bottom: 1px solid #E5E7EB;
  transition: background 150ms ease;
}

.data-table tbody tr:hover {
  background: #F9FAFB;
}

.data-table td {
  padding: 12px 16px;
  color: #111827;
}

.cell-time {
  font-weight: 500;
  white-space: nowrap;
}

.cell-number {
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  text-align: right;
  white-space: nowrap;
}

.cell-text {
  color: #6B7280;
}

/* Gap Cell Coloring */
.gap-high {
  color: #10B981;
  font-weight: 600;
}

.gap-medium {
  color: #F59E0B;
  font-weight: 600;
}

.gap-low {
  color: #6B7280;
}

.gap-winning {
  color: #3B82F6;
  font-weight: 600;
}

/* ===== GAP ANALYSIS HEATMAP STYLES (Sprint 4.5) ===== */

.gap-grid-heatmap {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Summary Panel - Enhanced for heatmap view */
.summary-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.summary-card {
  background: white;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  transition: all 150ms ease;
}

.summary-card:hover {
  border-color: #005DAA;
  box-shadow: 0 4px 12px rgba(0, 93, 170, 0.1);
}

.summary-label {
  font-size: 14px;
  color: #6B7280;
  font-weight: 500;
  margin-bottom: 8px;
}

.summary-value {
  font-size: 32px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

.text-green-600 {
  color: #10B981;
}

.text-blue-600 {
  color: #3B82F6;
}

.summary-subtitle {
  font-size: 12px;
  color: #9CA3AF;
}

/* Top Opportunities Section */
.top-opportunities {
  background: white;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 24px;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 16px 0;
}

.opportunity-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.opportunity-card {
  background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
  border: 2px solid #10B981;
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.opportunity-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.opportunity-rank {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #10B981;
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
}

.opportunity-time {
  font-size: 16px;
  color: #065F46;
  margin-bottom: 8px;
}

.opportunity-metrics {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.metric-badge {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.metric-badge.gap-high {
  background: #10B981;
  color: white;
}

.metric-badge.revenue {
  background: #3B82F6;
  color: white;
}

.opportunity-competitor {
  font-size: 12px;
  color: #6B7280;
  font-style: italic;
}

/* Heatmap Controls */
.heatmap-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 24px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #374151;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.legend-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #374151;
}

.legend-color {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid #E5E7EB;
}

.btn-export {
  padding: 12px 20px;
  background: #3B82F6;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  align-self: start;
}

.btn-export:hover {
  background: #2563EB;
}

.btn-export svg {
  width: 16px;
  height: 16px;
}

/* Heatmap Grid Container */
.heatmap-container {
  background: white;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 24px;
  overflow-x: auto;
}

.heatmap-hour-labels {
  display: grid;
  grid-template-columns: 120px repeat(24, 1fr);
  gap: 2px;
  margin-bottom: 8px;
}

.hour-label-spacer {
  grid-column: 1;
}

.hour-label {
  text-align: center;
  font-size: 11px;
  color: #6B7280;
  font-weight: 600;
  padding: 4px 0;
}

.heatmap-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px;
  margin-bottom: 4px;
}

.day-label {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background: #F9FAFB;
  border-radius: 6px;
}

.hour-cells {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 2px;
}

.hour-cell {
  aspect-ratio: 1;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
  min-height: 36px;
}

.hour-cell:hover:not(.hidden) {
  transform: scale(1.15);
  border-color: #111827;
  z-index: 10;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.hour-cell.selected {
  border: 3px solid #111827;
  transform: scale(1.1);
  z-index: 20;
}

.hour-cell.hidden {
  opacity: 0.1;
  cursor: not-allowed;
}

/* Tooltip */
.heatmap-tooltip {
  position: fixed;
  background: #111827;
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  pointer-events: none;
  z-index: 1000;
  transform: translate(-50%, -100%);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  min-width: 200px;
}

.heatmap-tooltip::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #111827;
}

.tooltip-time {
  font-size: 14px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.tooltip-row {
  display: flex;
  justify-content: space-between;
  margin: 4px 0;
}

.tooltip-competitor {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 11px;
  color: #D1D5DB;
}

/* Detail Panel */
.detail-panel {
  background: white;
  border: 2px solid #3B82F6;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.detail-panel.empty {
  border: 2px dashed #E5E7EB;
  background: #F9FAFB;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #9CA3AF;
}

.empty-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 16px;
  margin: 0;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #E5E7EB;
}

.detail-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #111827;
}

.detail-close {
  background: none;
  border: none;
  font-size: 32px;
  color: #6B7280;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
}

.detail-close:hover {
  background: #F3F4F6;
  color: #111827;
}

.detail-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.detail-metric {
  background: #F9FAFB;
  padding: 16px;
  border-radius: 8px;
  text-align: center;
}

.detail-metric.highlight {
  background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
  border: 2px solid #10B981;
}

.metric-label {
  font-size: 12px;
  font-weight: 600;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.metric-value {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
}

.metric-sublabel {
  font-size: 12px;
  color: #9CA3AF;
}

/* Gap color classes for detail panel */
.gap-high {
  color: #10B981;
}

.gap-medium {
  color: #F59E0B;
}

.gap-low {
  color: #6EE7B7;
}

.gap-winning {
  color: #3B82F6;
}

.detail-recommendations {
  background: #FEF3C7;
  border-left: 4px solid #F59E0B;
  padding: 20px;
  border-radius: 8px;
}

.detail-recommendations h4 {
  margin: 0 0 16px 0;
  color: #92400E;
  font-size: 16px;
  font-weight: 600;
}

.detail-recommendations p {
  margin: 12px 0;
  color: #78350F;
  line-height: 1.6;
  font-size: 14px;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .opportunity-cards {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }

  .heatmap-controls {
    grid-template-columns: 1fr;
  }

  .hour-cell {
    min-height: 28px;
  }
}

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

  .opportunity-cards {
    grid-template-columns: 1fr;
  }

  .heatmap-row {
    grid-template-columns: 80px 1fr;
  }

  .day-label {
    font-size: 12px;
    padding: 6px 8px;
  }

  .hour-label {
    font-size: 9px;
  }

  .hour-cell {
    min-height: 24px;
  }

  .detail-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .summary-panel {
    grid-template-columns: 1fr;
  }

  .heatmap-hour-labels {
    grid-template-columns: 60px repeat(24, 1fr);
  }

  .heatmap-row {
    grid-template-columns: 60px 1fr;
  }

  .day-label {
    font-size: 10px;
    padding: 4px;
  }

  .hour-cell {
    min-height: 20px;
  }
}

/* Coming Soon placeholder */
.coming-soon {
  text-align: center;
  padding: 60px 24px;
  color: #6B7280;
}

.coming-soon h2 {
  font-size: 24px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 8px;
}

.coming-soon p {
  font-size: 14px;
  color: #6B7280;
}

/* ===== GEOGRAPHIC MAP STYLES (Sprint 5) ===== */

/* Map Header */
.map-header {
  margin-bottom: 24px;
}

.map-header h2 {
  font-size: 24px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 12px;
}

/* Map Instructions */
.map-instructions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.map-instructions .subtitle {
  font-size: 14px;
  color: #374151;
  line-height: 1.6;
  margin: 0;
}

.map-instructions .subtitle strong {
  color: #111827;
}

/* Collapsible Help Section */
.help-expandable {
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 8px;
}

.help-expandable summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #005DAA;
  list-style: none;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.help-expandable summary::-webkit-details-marker {
  display: none;
}

.help-expandable summary::before {
  content: '▶';
  font-size: 10px;
  transition: transform 150ms ease;
  display: inline-block;
}

.help-expandable[open] summary::before {
  transform: rotate(90deg);
}

.help-expandable summary:hover {
  color: #004488;
}

.help-list {
  margin: 16px 0 8px 0;
  padding-left: 20px;
  list-style: none;
}

.help-list li {
  margin-bottom: 12px;
  font-size: 13px;
  color: #374151;
  line-height: 1.6;
  position: relative;
  padding-left: 8px;
}

.help-list li::before {
  content: '•';
  position: absolute;
  left: -12px;
  color: #005DAA;
  font-weight: bold;
}

.help-list li strong {
  color: #111827;
}

/* Map Controls */
.map-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.map-controls .checkbox-label input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.map-controls .checkbox-label:has(input:disabled) {
  opacity: 0.6;
  cursor: not-allowed;
}

.coming-soon-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: #6B7280;
  background: #E5E7EB;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 4px;
  vertical-align: middle;
}

/* Map Container */
#map-container {
  width: 100%;
  height: 600px;
  background: #F3F4F6;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  margin-bottom: 24px;
  overflow: hidden;
}

/* Leaflet overrides for better styling */
.leaflet-container {
  font-family: inherit;
}

.leaflet-popup-content-wrapper {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-content {
  margin: 16px;
  font-size: 14px;
  line-height: 1.6;
}

/* Facility popup styles */
.facility-popup h3 {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 12px 0;
}

.facility-popup .popup-row {
  margin: 8px 0;
  font-size: 13px;
  color: #374151;
}

.facility-popup .popup-row strong {
  color: #6B7280;
  font-weight: 600;
  min-width: 100px;
  display: inline-block;
}

/* Map Legend */
.map-legend {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 20px;
}

.map-legend h4 {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 12px 0;
}

.legend-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #374151;
}

.legend-marker {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

/* Responsive map styles */
@media (max-width: 768px) {
  #map-container {
    height: 400px;
  }

  .map-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .control-group {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ===== CTA TRANSIT OVERLAY STYLES (Sprint 6.5) ===== */

/* Station Popup Styles */
.station-popup {
  max-width: 280px;
  font-family: inherit;
}

.station-name {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 6px;
}

.station-lines {
  font-size: 13px;
  color: #6B7280;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #E5E7EB;
}

.facility-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.facility-list li {
  padding: 8px 0;
  border-bottom: 1px solid #E5E7EB;
  font-size: 13px;
  color: #374151;
}

.facility-list li:last-child {
  border-bottom: none;
}

.facility-list li div:first-child {
  font-weight: 500;
  color: #111827;
  margin-bottom: 2px;
}

.pcc-facility {
  background: #EFF6FF;
  padding: 10px 8px;
  margin: 0 -8px;
  border-left: 3px solid #005DAA;
  font-weight: 600;
}

.pcc-facility div:first-child {
  color: #005DAA;
}

.walk-time {
  font-size: 12px;
  color: #6B7280;
}

.no-facilities {
  padding: 12px 0;
  color: #9CA3AF;
  font-size: 13px;
  font-style: italic;
  text-align: center;
}

/* Transit Legend Items */
.legend-line {
  height: 3px;
  width: 30px;
  border-radius: 2px;
  flex-shrink: 0;
}

.legend-station-marker {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid #C60C30;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
