/* Emergency Command Center Dashboard */

#dashboard-container {
  min-height: 100vh;
  background: #000000;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Tactical Command Header */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background: var(--tactical-bg);
  backdrop-filter: blur(15px);
  border-bottom: 2px solid var(--emergency-red);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.5),
    0 0 0 1px var(--steel-dark);
}

.dashboard-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #ff4444, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57, #ff9ff3, #54a0ff);
  background-size: 400% 400%;
  animation: gradientShift 3s ease-in-out infinite;
}

.header-left {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dashboard-logo {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: 'Roboto', sans-serif;
  text-transform: none;
}

.location-info {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.location-info::before {
  content: '◉';
  font-size: 1.2rem;
  color: var(--success-green);
  animation: status-pulse 2s ease-in-out infinite;
}

.header-btn.icon-only {
  padding: 0.75rem;
  min-width: auto;
  width: auto;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-btn.icon-only .btn-icon {
  font-size: 1.125rem;
}

.header-right {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

/* View Toggle Switch */
.view-toggle-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  background: rgba(31, 41, 55, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid var(--steel-medium);
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  transition: all 0.3s ease;
}

.view-toggle-container:hover {
  border-color: var(--electric-blue);
  box-shadow: var(--glow-sm) var(--electric-blue-glow);
}

.view-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}

.view-toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 26px;
}

.view-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.view-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--steel-medium);
  transition: 0.3s;
  border-radius: 13px;
  border: 1px solid var(--steel-light);
}

.view-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: var(--emergency-red);
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: var(--glow-sm) var(--emergency-red-glow);
}

.view-toggle-switch input:checked + .view-slider {
  background: var(--electric-blue);
  border-color: var(--electric-blue);
  box-shadow: var(--glow-sm) var(--electric-blue-glow);
}

.view-toggle-switch input:checked + .view-slider:before {
  transform: translateX(26px);
  background: var(--text-primary);
  box-shadow: var(--glow-sm) rgba(248, 250, 252, 0.5);
}

/* Update view labels based on toggle state */
.view-toggle-container .view-label:first-child {
  color: var(--emergency-red);
}

.view-toggle-switch input:checked ~ .view-label:first-child,
.view-toggle-container .view-label:last-child {
  color: var(--text-muted);
}

.view-toggle-switch input:checked ~ .view-label:last-child {
  color: var(--electric-blue);
}

/* Command Center Main Display */
.dashboard-main {
  flex: 1;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
  position: relative;
}

/* Tactical Status Strip */
.quick-stats {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 1fr;
  grid-auto-rows: max-content;
  align-items: start;
  gap: 1.5rem;
  margin-bottom: 2rem;
  animation: tactical-fade-in 0.8s ease-out;
}

/* Emergency Status Cards */
.stat-card {
  background: var(--tactical-bg);
  backdrop-filter: blur(10px);
  border: 2px solid var(--steel-medium);
  clip-path: polygon(12px 0%, 100% 0%, calc(100% - 12px) 100%, 0% 100%);
  padding: 1.75rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  animation: slide-in-left 0.6s ease-out;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--steel-medium), var(--steel-light));
  transition: all 0.4s ease;
}

.stat-card.highlight::before {
  background: linear-gradient(90deg, var(--emergency-red), var(--tactical-orange));
  box-shadow: var(--glow-md) var(--emergency-red-glow);
}

.stat-card:hover {
  border-color: var(--emergency-red);
  transform: translateY(-3px);
  box-shadow: 
    var(--glow-lg) var(--emergency-red-glow),
    0 15px 40px rgba(0, 0, 0, 0.4);
}

.stat-card:hover::before {
  background: linear-gradient(90deg, var(--emergency-red), var(--electric-blue));
  box-shadow: var(--glow-lg) var(--emergency-red-glow);
}

.stat-icon {
  font-size: 3rem;
  line-height: 1;
  color: var(--emergency-red);
  text-shadow: var(--glow-sm) var(--emergency-red-glow);
  animation: status-pulse 3s ease-in-out infinite;
}

.stat-content {
  flex: 1;
}

.stat-value {
  font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 0.5rem;
  text-shadow: var(--glow-sm) rgba(248, 250, 252, 0.3);
  animation: number-count-up 1s ease-out;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.stat-change {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.4rem 0.8rem;
  clip-path: polygon(4px 0%, 100% 0%, calc(100% - 4px) 100%, 0% 100%);
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-change.positive {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success-green);
  border: 1px solid var(--success-green);
  box-shadow: var(--glow-sm) var(--success-green-glow);
}

.stat-change.negative {
  background: rgba(220, 38, 38, 0.2);
  color: var(--emergency-red);
  border: 1px solid var(--emergency-red);
  box-shadow: var(--glow-sm) var(--emergency-red-glow);
}

.stat-change.neutral {
  background: rgba(100, 116, 139, 0.2);
  color: var(--text-muted);
  border: 1px solid var(--steel-medium);
}

/* Combined Card Styles */
.combined-card {
  padding: 0.75rem;
}

.combined-card .stat-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.combined-card .stat-value {
  margin-bottom: 0;
}

.combined-card .stat-label {
  margin-bottom: 0.125rem;
}

.combined-card .stat-change {
  margin-top: 0.125rem;
}

/* Card mini headers */
.card-mini-header {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

/* Inline icon styles */
.stat-with-icon {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat-with-icon-small {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat-icon-inline {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-icon-inline-small {
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* Dual inline stats layout */
.stat-dual-inline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.stat-dual-inline .stat-with-icon {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Make both values the same size in dual layout */
.stat-dual-inline .stat-value,
.stat-dual-inline .stat-value-small {
  font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 0.25rem;
  text-shadow: var(--glow-sm) rgba(248, 250, 252, 0.3);
}

/* Make both labels the same size in dual layout */
.stat-dual-inline .stat-label,
.stat-dual-inline .stat-label-small {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0;
}

/* Explore button */
.explore-btn {
  background: var(--electric-blue);
  color: white;
  border: none;
  padding: 0.375rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.explore-btn:hover {
  background: var(--tactical-orange);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

/* Predictive Analysis Card */
.predictive-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(14, 165, 233, 0.1));
  padding: 0.75rem;
  min-height: 140px; /* Force minimum height to match other cards */
  display: flex;
  align-items: center;
}

.predictive-card .stat-content {
  gap: 0.5rem;
  width: 100%;
}

.predictive-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 80px; /* Add minimum height to the content */
}

.predictive-status {
  text-align: right;
}

.trend-indicator {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.trend-indicator.increasing {
  color: var(--success-green);
}

.trend-indicator.decreasing {
  color: var(--emergency-red);
}

.trend-indicator.steady {
  color: var(--text-muted);
}

.trend-description {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

.predictive-trend {
  color: var(--success-green);
  font-weight: 700;
}

.primary-metric {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.secondary-metric {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  background: rgba(31, 41, 55, 0.3);
  backdrop-filter: blur(10px);
  clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
  border: 1px solid var(--steel-medium);
  transition: all 0.3s ease;
}

.secondary-metric:hover {
  border-color: var(--electric-blue);
  background: rgba(31, 41, 55, 0.5);
}

.stat-icon-small {
  font-size: 1.5rem;
  color: var(--emergency-red);
  text-shadow: var(--glow-sm) var(--emergency-red-glow);
  animation: status-pulse 2s ease-in-out infinite;
}

.stat-value-small {
  font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-shadow: var(--glow-sm) rgba(248, 250, 252, 0.3);
  min-width: 40px;
  text-align: center;
}

.stat-label-small {
  font-size: 0.6rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  flex: 1;
}

.stat-change-small {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  clip-path: polygon(3px 0%, 100% 0%, calc(100% - 3px) 100%, 0% 100%);
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-change-small.positive {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success-green);
  border: 1px solid var(--success-green);
  box-shadow: var(--glow-sm) var(--success-green-glow);
}

.stat-change-small.negative {
  background: rgba(220, 38, 38, 0.2);
  color: var(--emergency-red);
  border: 1px solid var(--emergency-red);
  box-shadow: var(--glow-sm) var(--emergency-red-glow);
}

.stat-change-small.neutral {
  background: rgba(100, 116, 139, 0.2);
  color: var(--text-muted);
  border: 1px solid var(--steel-medium);
}

/* Reports Card Styles */
.reports-card {
  padding: 0.75rem;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(245, 158, 11, 0.1));
}

.reports-card .stat-content {
  gap: 0.5rem;
}

.reports-card .stat-icon {
  color: var(--electric-blue);
}

.reports-card .stat-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.report-status {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  clip-path: polygon(4px 0%, 100% 0%, calc(100% - 4px) 100%, 0% 100%);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  animation: status-pulse 2s ease-in-out infinite;
}

.report-status.available {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success-green);
  border: 1px solid var(--success-green);
}

.report-status.updating {
  background: rgba(245, 158, 11, 0.2);
  color: var(--tactical-orange);
  border: 1px solid var(--tactical-orange);
}

.report-status.unavailable {
  background: rgba(100, 116, 139, 0.2);
  color: var(--text-muted);
  border: 1px solid var(--steel-medium);
}

.report-slots {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.report-slot {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  background: rgba(31, 41, 55, 0.3);
  backdrop-filter: blur(10px);
  clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
  border: 1px solid var(--steel-medium);
  transition: all 0.3s ease;
}

.report-slot:hover {
  border-color: var(--electric-blue);
  background: rgba(31, 41, 55, 0.5);
}

.slot-icon {
  font-size: 1.2rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 165, 233, 0.2);
  border-radius: 0;
  clip-path: polygon(4px 0%, 100% 0%, calc(100% - 4px) 100%, 0% 100%);
  border: 1px solid var(--electric-blue);
}

.slot-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.slot-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.slot-status {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  animation: status-pulse 2s ease-in-out infinite;
}

.slot-status.available {
  color: var(--success-green);
}

.slot-status.generating {
  color: var(--tactical-orange);
}

.slot-status.unavailable {
  color: var(--text-muted);
}

.slot-time {
  font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  font-size: 0.65rem;
  color: var(--tactical-orange);
  font-weight: 500;
  text-shadow: var(--glow-sm) rgba(245, 158, 11, 0.3);
}

.report-footer {
  margin-top: 0.5rem;
  text-align: center;
}

.report-frequency {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Extra Cards - Hidden by default */
.extra-card {
  transition: all 0.4s ease;
  transform-origin: top;
}

.extra-card.hidden {
  display: none;
}

.extra-card.show {
  animation: card-slide-in 0.5s ease-out;
}

@keyframes card-slide-in {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Setting description text */
.setting-description {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  font-weight: 400;
  line-height: 1.3;
}

/* Responsive adjustments for map card */
@media (max-width: 768px) {
  .mini-map-container {
    min-height: 300px;
  }

  /* Improve touch handling for Google Maps */
  #mini-map,
  #danger-mini-map {
    touch-action: pan-x pan-y;
  }
}

/* Staggered animations for all elements */
.stat-card:nth-child(1) { animation-delay: 0s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.2s; }
.stat-card:nth-child(4) { animation-delay: 0.3s; }

.dashboard-card:nth-child(1) { animation-delay: 0.2s; }
.dashboard-card:nth-child(2) { animation-delay: 0.3s; }
.dashboard-card:nth-child(3) { animation-delay: 0.4s; }
.dashboard-card:nth-child(4) { animation-delay: 0.5s; }
.dashboard-card:nth-child(5) { animation-delay: 0.6s; }

/* Command Center Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: max-content;
  gap: 2rem;
  animation: tactical-fade-in 1s ease-out;
}

/* Tactical Command Cards */
.dashboard-card {
  background: var(--tactical-bg);
  backdrop-filter: blur(15px);
  border: 2px solid var(--steel-medium);
  clip-path: polygon(16px 0%, 100% 0%, calc(100% - 16px) 100%, 0% 100%);
  padding: 0;
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
  min-height: 320px;
  position: relative;
  overflow: hidden;
  animation: slide-in-left 0.8s ease-out;
}

.dashboard-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--steel-medium), var(--steel-light));
  transition: all 0.4s ease;
}

.dashboard-card:hover {
  border-color: var(--electric-blue);
  transform: translateY(-2px);
  box-shadow: 
    var(--glow-lg) var(--electric-blue-glow),
    0 12px 35px rgba(0, 0, 0, 0.4);
}

.dashboard-card:hover::before {
  background: linear-gradient(90deg, var(--electric-blue), var(--tactical-orange));
  box-shadow: var(--glow-md) var(--electric-blue-glow);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 1.75rem 1.5rem;
  border-bottom: 2px solid var(--steel-dark);
  position: relative;
}

.card-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1.75rem;
  right: 1.75rem;
  height: 2px;
  background: linear-gradient(90deg, var(--emergency-red), transparent);
  opacity: 0.6;
}

.card-header h3 {
  color: var(--text-primary);
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-shadow: var(--glow-sm) rgba(248, 250, 252, 0.2);
  position: relative;
}

.card-header h3::before {
  content: '▶';
  color: var(--emergency-red);
  font-size: 0.8rem;
  margin-right: 0.75rem;
  animation: status-pulse 2s ease-in-out infinite;
}

.card-period {
  font-size: 0.7rem;
  color: var(--text-muted);
  background: rgba(31, 41, 55, 0.6);
  backdrop-filter: blur(10px);
  padding: 0.5rem 0.75rem;
  clip-path: polygon(4px 0%, 100% 0%, calc(100% - 4px) 100%, 0% 100%);
  border: 1px solid var(--steel-medium);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.card-content {
  flex: 1;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Set consistent height for both Recent Activity and Top Event Types cards */
#recent-activity,
#event-types-chart {
  max-height: 400px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--steel-medium) transparent;
}

/* Remove default padding that creates wasted space */
#recent-activity,
#event-types-chart {
  margin: -1rem;
  padding: 1rem;
}

.card-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg, 
    transparent 0%, 
    rgba(14, 165, 233, 0.03) 50%, 
    transparent 100%
  );
  pointer-events: none;
}

/* Live Event Map Card */
.map-card {
  min-height: 400px;
}

.mini-map-container {
  flex: 1;
  border-radius: 0;
  clip-path: polygon(12px 0%, 100% 0%, calc(100% - 12px) 100%, 0% 100%);
  overflow: hidden;
  border: 2px solid var(--steel-medium);
  background: var(--steel-dark);
  position: relative;
  min-height: 320px;
  box-shadow: 
    var(--glow-md) rgba(0, 0, 0, 0.5),
    inset 0 0 20px rgba(14, 165, 233, 0.1);
}

/* Chart Containers */
.chart-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}

/* Tactical Event Analysis Chart */
.event-type-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--steel-dark);
  transition: all 0.3s ease;
  position: relative;
}

.event-type-item:last-child {
  border-bottom: none;
}

.event-type-item::before {
  content: '•';
  color: var(--emergency-red);
  font-size: 1.2rem;
  margin-right: 0.75rem;
  animation: status-pulse 3s ease-in-out infinite;
}

.event-type-item:hover {
  background: rgba(31, 41, 55, 0.3);
  transform: translateX(4px);
}

.event-type-name {
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.875rem;
}

.event-type-count {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.event-type-number {
  font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  font-weight: 700;
  color: var(--emergency-red);
  font-size: 1rem;
  text-shadow: var(--glow-sm) var(--emergency-red-glow);
  min-width: 32px;
  text-align: right;
}

.event-type-bar {
  width: 80px;
  height: 6px;
  background: var(--steel-dark);
  border-radius: 0;
  overflow: hidden;
  border: 1px solid var(--steel-medium);
  clip-path: polygon(2px 0%, 100% 0%, calc(100% - 2px) 100%, 0% 100%);
}

.event-type-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--emergency-red), var(--tactical-orange));
  transition: width 0.6s ease;
  box-shadow: var(--glow-sm) var(--emergency-red-glow);
}

/* Live Activity Feed */
.activity-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 360px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--steel-medium) transparent;
}

/* Remove height restriction since parent container controls it */
.activity-list {
  flex: 1;
}

.activity-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--steel-dark);
  backdrop-filter: blur(10px);
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  border: 1px solid var(--steel-medium);
  border-left: 3px solid var(--electric-blue);
  transition: all 0.3s ease;
  position: relative;
  cursor: pointer;
}

.activity-item:hover {
  border-color: var(--tactical-orange);
  border-left-color: var(--emergency-red);
  transform: translateX(2px);
  box-shadow: var(--glow-sm) var(--tactical-orange-glow);
}

.activity-item.highlighted {
  border-color: var(--emergency-red);
  border-left-color: var(--emergency-red);
  background: rgba(220, 38, 38, 0.2);
  box-shadow: var(--glow-md) var(--emergency-red-glow);
  transform: translateX(4px);
}

.activity-item::before {
  content: '▶';
  position: absolute;
  left: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--electric-blue);
  font-size: 0.6rem;
  animation: status-pulse 2s ease-in-out infinite;
}

.activity-time {
  font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  font-size: 0.75rem;
  color: var(--tactical-orange);
  min-width: 70px;
  text-align: right;
  font-weight: 600;
  text-shadow: var(--glow-sm) rgba(245, 158, 11, 0.3);
}

.activity-details {
  flex: 1;
  margin-left: 0.5rem;
}

.activity-type {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.activity-location {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.activity-priority {
  border-left-color: var(--emergency-red);
  background: rgba(220, 38, 38, 0.1);
  box-shadow: var(--glow-sm) var(--emergency-red-glow);
}

.activity-priority::before {
  color: var(--emergency-red);
}

.activity-priority .activity-type {
  color: var(--emergency-red);
}

.activity-priority .activity-type::after {
  content: ' ⚠';
  color: var(--emergency-red);
  animation: status-pulse 1s ease-in-out infinite;
}

/* Command Service Analysis */
.service-chart {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.service-item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.75rem;
  background: rgba(31, 41, 55, 0.4);
  backdrop-filter: blur(10px);
  border: 1px solid var(--steel-medium);
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  transition: all 0.3s ease;
}

.service-item:hover {
  border-color: var(--electric-blue);
  transform: translateY(-1px);
  box-shadow: var(--glow-sm) var(--electric-blue-glow);
}

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 0;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border: 2px solid;
  transition: all 0.3s ease;
}

.service-police {
  background: rgba(220, 38, 38, 0.2);
  color: var(--emergency-red);
  border-color: var(--emergency-red);
  box-shadow: var(--glow-sm) var(--emergency-red-glow);
}

.service-fire {
  background: rgba(245, 158, 11, 0.2);
  color: var(--tactical-orange);
  border-color: var(--tactical-orange);
  box-shadow: var(--glow-sm) var(--tactical-orange-glow);
}

.service-traffic {
  background: rgba(14, 165, 233, 0.2);
  color: var(--electric-blue);
  border-color: var(--electric-blue);
  box-shadow: var(--glow-sm) var(--electric-blue-glow);
}

.service-info {
  flex: 1;
}

.service-name {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.9rem;
}

.service-stats {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.service-count {
  font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  font-weight: 700;
  color: var(--text-primary);
  text-shadow: var(--glow-sm) rgba(248, 250, 252, 0.3);
}

/* Tactical Activity Timeline */
.hourly-bars {
  display: flex;
  align-items: end;
  gap: 1px;
  height: 140px;
  margin: 1.5rem 0;
  padding: 0.5rem;
  background: rgba(31, 41, 55, 0.3);
  border: 1px solid var(--steel-medium);
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}

.hourly-bar {
  flex: 1;
  background: var(--steel-dark);
  border-radius: 0;
  position: relative;
  transition: all 0.4s ease;
  cursor: pointer;
  border: 1px solid var(--steel-medium);
  min-height: 4px;
}

.hourly-bar:hover {
  background: var(--electric-blue);
  box-shadow: var(--glow-sm) var(--electric-blue-glow);
  transform: scaleY(1.1);
}

.hourly-bar-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, var(--emergency-red), var(--tactical-orange));
  border-radius: 0;
  transition: height 0.8s ease;
  box-shadow: var(--glow-sm) var(--emergency-red-glow);
}

.hourly-labels {
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Command System Status */
.status-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: var(--steel-dark);
  backdrop-filter: blur(10px);
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  border: 1px solid var(--steel-medium);
  border-left: 3px solid var(--success-green);
  transition: all 0.3s ease;
  position: relative;
}

.status-item::before {
  content: '▶';
  position: absolute;
  left: 0.5rem;
  color: var(--success-green);
  font-size: 0.6rem;
  animation: status-pulse 2s ease-in-out infinite;
}

.status-item:hover {
  border-color: var(--success-green);
  transform: translateX(2px);
  box-shadow: var(--glow-sm) var(--success-green-glow);
}

.status-item.warning {
  border-left-color: var(--tactical-orange);
}

.status-item.warning::before {
  color: var(--tactical-orange);
}

.status-item.warning:hover {
  border-color: var(--tactical-orange);
  box-shadow: var(--glow-sm) var(--tactical-orange-glow);
}

.status-item.error {
  border-left-color: var(--emergency-red);
  background: rgba(220, 38, 38, 0.1);
}

.status-item.error::before {
  color: var(--emergency-red);
}

.status-item.error:hover {
  border-color: var(--emergency-red);
  box-shadow: var(--glow-sm) var(--emergency-red-glow);
}

.status-name {
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.875rem;
  margin-left: 1rem;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  animation: status-pulse 2s ease-in-out infinite;
}

.status-dot.online {
  background: var(--success-green);
  box-shadow: var(--glow-md) var(--success-green-glow);
}

.status-dot.warning {
  background: var(--tactical-orange);
  box-shadow: var(--glow-md) var(--tactical-orange-glow);
}

.status-dot.offline {
  background: var(--emergency-red);
  box-shadow: var(--glow-md) var(--emergency-red-glow);
}

/* Empty states */
.empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  color: #888;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.empty-state-subtext {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* Loading states for cards */
.card-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  flex-direction: column;
  gap: 1rem;
}

.card-loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid #333;
  border-top: 2px solid #61dafb;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.card-loading-text {
  font-size: 0.875rem;
  color: #888;
}

/* Danger Zone Card Styles */
.danger-zone-card {
  background: var(--tactical-bg);
  backdrop-filter: blur(10px);
  border: 2px solid var(--steel-medium);
  clip-path: polygon(12px 0%, 100% 0%, calc(100% - 12px) 100%, 0% 100%);
  padding: 0;
  position: relative;
  overflow: visible;
  height: 200px;
  transition: all 0.4s ease;
}

.danger-zone-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--emergency-red), rgba(220, 38, 38, 0.8));
  transition: all 0.4s ease;
}

.danger-zone-card:hover {
  border-color: #ff4444;
  box-shadow: var(--glow-lg) var(--emergency-red-glow), 0 15px 40px rgba(220, 38, 38, 0.4);
}

.danger-zone-content {
  position: relative;
  height: 200px;
  width: 100%;
}

.danger-zone-header {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.danger-zone-icon {
  font-size: 1.5rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}

.danger-zone-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--emergency-red);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  letter-spacing: 0.05em;
}

.danger-zone-timer {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(220, 38, 38, 0.5);
  min-width: 80px;
}

.timer-label {
  font-size: 0.625rem;
  font-weight: 600;
  color: #cccccc;
  letter-spacing: 0.05em;
  text-align: center;
}

.timer-value {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--emergency-red);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  font-family: 'Courier New', monospace;
  text-align: center;
  line-height: 1;
}

.danger-zone-main {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  z-index: 10;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  padding: 0.75rem;
  border: 1px solid rgba(220, 38, 38, 0.3);
  max-width: 60%;
}

.neighborhood-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.danger-zone-details {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.event-type {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--emergency-red);
  background: rgba(220, 38, 38, 0.2);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--emergency-red);
}

.danger-zone-percentage {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  z-index: 10;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  padding: 0.75rem;
  border: 1px solid rgba(220, 38, 38, 0.3);
  text-align: center;
  min-width: 80px;
}

.event-percentage {
  font-size: 2rem;
  font-weight: 900;
  color: var(--emergency-red);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  line-height: 1;
}

.event-subtitle {
  font-size: 0.625rem;
  color: #cccccc;
  margin-top: 0.25rem;
  line-height: 1.2;
}

.danger-zone-map {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 200px;
  z-index: 1;
}

.danger-zone-card .danger-map-container,
#danger-mini-map {
  width: 100% !important;
  height: 200px !important;
  position: relative !important;
  border-radius: 0 !important;
  clip-path: polygon(12px 0%, 100% 0%, calc(100% - 12px) 100%, 0% 100%) !important;
  overflow: hidden !important;
  border: 2px solid var(--steel-medium) !important;
  background: var(--steel-dark) !important;
  box-shadow: 
    var(--glow-md) rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

/* Combined Stats Card Styles */
.combined-stats-card {
  padding: 1rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1rem;
  height: 100%;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.75rem;
  background: rgba(31, 41, 55, 0.3);
  border: 1px solid var(--steel-medium);
  clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
  transition: all 0.3s ease;
}

.stat-item:hover {
  border-color: var(--electric-blue);
  background: rgba(31, 41, 55, 0.5);
  transform: translateY(-2px);
  box-shadow: var(--glow-sm) var(--electric-blue-glow);
}

.stat-item .stat-with-icon {
  flex-direction: column;
  gap: 0.5rem;
}

.stat-item .stat-value {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}

.stat-item .stat-label {
  font-size: 0.7rem;
  margin-bottom: 0;
}

/* Compact Card Styles */
.compact-card {
  min-height: 280px;
}

.compact-card .card-content {
  padding: 1.25rem;
}

.compact-card .activity-list {
  max-height: 200px;
}

.compact-card .mini-map-container {
  min-height: 200px;
}

/* Animations */
@keyframes number-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

/* Report Options Styles */
.report-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.report-option-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(31, 41, 55, 0.3);
  backdrop-filter: blur(10px);
  border: 1px solid var(--steel-medium);
  border-radius: 6px;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Roboto', sans-serif;
  font-size: 0.9rem;
  width: 100%;
}

.report-option-btn:hover:not(:disabled) {
  border-color: var(--electric-blue);
  background: rgba(31, 41, 55, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
}

.report-option-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: var(--steel-dark);
  background: rgba(31, 41, 55, 0.2);
}

.report-option-btn .report-icon {
  font-size: 1.2rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 165, 233, 0.2);
  border: 1px solid var(--electric-blue);
  border-radius: 50%;
  flex-shrink: 0;
}

.report-option-btn:disabled .report-icon {
  background: rgba(100, 116, 139, 0.2);
  border-color: var(--steel-medium);
}

.report-option-btn .report-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.report-option-btn .report-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.report-option-btn .report-desc {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.report-option-btn .report-status {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.report-option-btn .report-status:not(.unavailable) {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success-green);
  border: 1px solid var(--success-green);
}

.report-option-btn .report-status.unavailable {
  background: rgba(100, 116, 139, 0.2);
  color: var(--text-muted);
  border: 1px solid var(--steel-medium);
}

/* Notification Banner */
.notification-banner {
  position: fixed;
  top: 80px; /* Below header */
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  width: 90%;
  max-width: 600px;
  z-index: 1000;
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.notification-banner:not(.hidden) {
  transform: translateX(-50%) translateY(0);
}

.notification-content {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.95) 0%, rgba(185, 28, 28, 0.95) 100%);
  backdrop-filter: blur(15px);
  border: 2px solid var(--emergency-red);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  box-shadow:
    0 10px 40px rgba(220, 38, 38, 0.5),
    var(--glow-md) var(--emergency-red-glow);
  display: flex;
  align-items: center;
  gap: 1rem;
  animation: notification-pulse 2s ease-in-out infinite;
}

.notification-banner.priority .notification-content {
  animation: notification-pulse-priority 1s ease-in-out infinite;
}

.notification-icon {
  font-size: 2rem;
  line-height: 1;
  animation: notification-icon-bounce 0.6s ease-in-out;
}

.notification-details {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.notification-body {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-close {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  transition: transform 0.2s ease;
  line-height: 1;
}

.notification-close:hover {
  transform: scale(1.2);
}

@keyframes notification-pulse {
  0%, 100% {
    box-shadow:
      0 10px 40px rgba(220, 38, 38, 0.5),
      var(--glow-md) var(--emergency-red-glow);
  }
  50% {
    box-shadow:
      0 10px 50px rgba(220, 38, 38, 0.7),
      var(--glow-lg) var(--emergency-red-glow);
  }
}

@keyframes notification-pulse-priority {
  0%, 100% {
    box-shadow:
      0 10px 40px rgba(220, 38, 38, 0.8),
      var(--glow-lg) var(--emergency-red-glow);
  }
  50% {
    box-shadow:
      0 15px 60px rgba(220, 38, 38, 1),
      0 0 60px rgba(220, 38, 38, 0.8);
  }
}

@keyframes notification-icon-bounce {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}
