/* === Moved from index.html for shared use === */
.dashboard-flex {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  align-items: flex-start;
  margin-top: 2rem;
}
.alerts-list-section {
  flex: 0 0 340px;
  min-width: 280px;
  max-width: 400px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(183,28,28,0.08);
  border: 1.5px solid #f3e5e5;
  padding: 1.5rem 1.2rem;
  transition: width 0.3s, min-width 0.3s, max-width 0.3s;
  position: relative;
}
.alerts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5em;
}
#toggle-alerts {
  background: #c0392b;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 1.3em;
  width: 2em;
  height: 2em;
  cursor: pointer;
  transition: background 0.2s;
  margin-left: 0.5em;
}
#toggle-alerts:hover {
  background: #e74c3c;
}
.alerts-list-section.collapsed {
  width: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  padding-left: 0.2em;
  padding-right: 0.2em;
  overflow: hidden;
}
.alerts-list-section.collapsed h2,
.alerts-list-section.collapsed .alerts-list {
  display: none;
}
.map-medical-stack {
  display: flex;
  flex-direction: column;
  flex: 1 1 300px;
  min-width: 300px;
  gap: 1rem;
}
.map-section {
  flex: 1 1 0%;
  background: #fafbfc;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(33,33,33,0.07);
  border: 1.5px solid #e3e3e3;
  padding: 1.5rem 1.2rem;
}
.medical-emergency-section {
  margin-bottom: 0;
}
.card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  border: 1px solid #e0e0e0;
  padding: 1.5rem;
}
.medical-emergency-section h2 {
  margin-top: 0;
  font-size: 1.3rem;
  color: #c0392b;
  letter-spacing: 0.5px;
}
.med-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.med-tabs button {
  background: #c0392b;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 0.5em 1em;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.2s;
}
.med-tabs button:hover, .med-tabs button.active {
  background: #e74c3c;
}
.med-content {
  border: 1px solid #e0e0e0;
  background: #f9f9f9;
  border-radius: 7px;
  padding: 1em;
  min-height: 120px;
  font-size: 1em;
  color: #333;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
header, footer {
  padding: 1rem 2rem;
}
.logo-title {
  display: flex;
  align-items: center;
  gap: 1rem;
}
nav {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
nav a {
  text-decoration: none;
  color: #333;
  padding: 0.5em 1em;
  border-radius: 5px;
  transition: background 0.2s;
}
nav a.active, nav a:hover {
  background: #c0392b;
  color: #fff;
}
@media (max-width: 900px) {
  .dashboard-flex {
    flex-direction: column;
    gap: 1.5rem;
  }
  .map-medical-stack {
    order: -1;
    max-width: 100%;
    min-width: 0;
  }
  .alerts-list-section {
    flex: 1 1 100%;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    order: 0;
  }
}
@media (max-width: 600px) {
  header, footer {
    padding: 1rem;
  }
  .logo-title h1 {
    font-size: 1.1rem;
  }
  .card {
    padding: 1rem;
  }
  .med-tabs button {
    font-size: 0.95em;
    padding: 0.4em 0.7em;
  }
  .med-content {
    font-size: 0.95em;
    padding: 0.7em;
  }
  nav {
    gap: 0.5rem;
    width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    display: flex;
    margin-top: 0.7rem;
  }
  nav a {
    width: 100%;
    text-align: center;
    margin: 0.2rem 0;
    border-radius: 6px;
    padding: 0.7em 0;
    font-size: 1.08em;
  }
}
/* Enhanced dashboard appearance */
.alerts-list-section h2 {
  color: #b71c1c;
  font-size: 1.3rem;
  margin-bottom: 1.2rem;
  letter-spacing: 0.01em;
}
.map-section h2 {
  color: #1976d2;
  font-size: 1.3rem;
  margin-bottom: 1.2rem;
  letter-spacing: 0.01em;
}
/* Collapsible alert cards */
.alert-card {
  border-left: 8px solid #b71c1c;
  background: #fff3e0;
  border-radius: 8px;
  padding: 0.7rem 1.2rem;
  box-shadow: 0 1px 6px rgba(183,28,28,0.07);
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1.2rem;
  transition: box-shadow 0.2s, background 0.2s;
  cursor: pointer;
}
.alert-card:last-child {
  margin-bottom: 0;
}
.alert-card:hover, .alert-card.expanded {
  box-shadow: 0 4px 16px rgba(183,28,28,0.13);
  background: #ffe0b2;
}
.alert-info-collapsed {
  display: none;
}
.alert-card.collapsed .alert-info-collapsed {
  display: block;
}
.alert-card.collapsed .alert-info-full {
  display: none;
}
.alert-card.expanded .alert-info-collapsed {
  display: none;
}
.alert-card.expanded .alert-info-full {
  display: block;
}
.alert-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.2rem;
}
.alert-location {
  color: #b71c1c;
  font-weight: bold;
  font-size: 1.01rem;
}
.alert-summary {
  margin: 0.2rem 0 0.2rem 0;
  color: #444;
}
.alert-actions {
  margin-top: 0.3rem;
  font-size: 0.98rem;
  color: #333;
}
.alert-updated {
  font-size: 0.93rem;
  color: #888;
  margin-top: 0.2rem;
}
.alert-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}
@media (max-width: 900px) {
  .alerts-list-section, .map-section {
    padding: 1rem 0.5rem;
    border-radius: 8px;
  }
  .alert-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.8rem 0.7rem;
  }
}
/* Dashboard flex layout: alerts left, map right */
@media (max-width: 900px) {
  .dashboard-flex {
    gap: 1.2rem;
  }
  .alerts-list-section, .map-section {
    max-width: 100%;
    min-width: 0;
    flex: 1 1 100%;
  }
}
/* Vehicle Tracking Styles */
.vehicle-section {
  margin-top: 2.5rem;
  background: #f9f9f9;
  border-radius: 10px;
  padding: 2rem 1.5rem;
  box-shadow: 0 2px 8px rgba(183,28,28,0.06);
}
.vehicle-section h2 {
  color: #b71c1c;
  margin-bottom: 1.2rem;
}
.vehicle-map-container {
  width: 100%;
  margin-bottom: 1.5rem;
}
.roster-table td.active { background: #e8f5e9; }
.roster-table td.standby { background: #fffde7; }
.roster-table td.out-of-service { background: #ffebee; }
.roster-table th, .roster-table td { vertical-align: middle; }
/* Enhanced Roster Management Styles */
.roster-section {
  margin-top: 2.5rem;
  background: #f9f9f9;
  border-radius: 10px;
  padding: 2rem 1.5rem;
  box-shadow: 0 2px 8px rgba(183,28,28,0.06);
}
.roster-section h2 {
  color: #b71c1c;
  margin-bottom: 1.2rem;
}
.roster-section h3 {
  color: #333;
  margin-top: 1.5rem;
  margin-bottom: 0.7rem;
}
.roster-section h4 {
  margin-top: 1.2rem;
  margin-bottom: 0.5rem;
  color: #b71c1c;
}
.roster-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.roster-table th, .roster-table td {
  border: 1px solid #e0e0e0;
  padding: 0.6rem 0.9rem;
  text-align: left;
  font-size: 1rem;
}
.roster-table th {
  background: #b71c1c;
  color: #fff;
  font-weight: 600;
}
.roster-table td.on-duty { background: #e8f5e9; }
.roster-table td.off-duty { background: #fffde7; }
.roster-table td.holiday { background: #e3f2fd; }
.roster-table td.sick { background: #ffebee; }
.roster-table td.pending { background: #fff3e0; }
.roster-table td.confirmed { background: #e8f5e9; }
.roster-table select {
  padding: 0.3rem 0.5rem;
  border-radius: 5px;
  border: 1px solid #ccc;
  font-size: 1em;
  background: #fafafa;
}
.leave-list {
  margin-top: 1rem;
  font-size: 1em;
  padding-left: 1.2em;
}
.leave-list li {
  margin-bottom: 0.3rem;
  background: #f5f5f5;
  border-left: 4px solid #b71c1c;
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.leave-list button {
  background: #b71c1c;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.2rem 0.7rem;
  margin-left: 1em;
  cursor: pointer;
  font-size: 0.95em;
  transition: background 0.2s;
}
.leave-list button:hover {
  background: #d32f2f;
}
#addLeaveForm {
  margin-top: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  align-items: center;
}
#addLeaveForm select, #addLeaveForm input[type="date"], #addLeaveForm input[type="text"] {
  padding: 0.3rem 0.5rem;
  border-radius: 5px;
  border: 1px solid #ccc;
  font-size: 1em;
}
#addLeaveForm button {
  background: #b71c1c;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 0.4rem 1.1rem;
  font-size: 1em;
  cursor: pointer;
  margin-left: 0.5em;
  transition: background 0.2s;
}
#addLeaveForm button:hover {
  background: #d32f2f;
}
/* Australian Bushfire Alert System Styles */

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background-color: #ffffff; /* white */
  margin: 0;
  padding: 0;
  color: #333333; /* dark gray */
  position: relative; /* Needed for pseudo-element positioning */
  z-index: 1; /* Ensure content is above pseudo-element */
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('assets/background.jpeg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.8; /* Adjust this value for desired transparency */
  z-index: -1; /* Place behind content */
}
header {
  border-bottom: 2px solid #b71c1c;
  padding: 0.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.logo-title {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.logo {
  height: 48px;
}
nav {
  margin-top: 0.5rem;
}
nav a {
  color: #b71c1c;
  text-decoration: none;
  margin: 0 1rem;
  font-weight: bold;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: border 0.2s;
}
nav a.active, nav a:hover {
  border-bottom: 2px solid #b71c1c;
}
.main-flex {
  max-width: 1200px;
  margin: 2rem auto;
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}
.map-section {
  margin-bottom: 2rem;
}
.map-embed {
  width: 100% !important;
  height: 400px !important;
  min-height: 400px !important;
  margin-top: 1rem;
  background: #eee;
  border: 2px solid #b71c1c;
  box-sizing: border-box;
  display: block !important;
  position: relative;
  overflow: hidden;
  z-index: 0;
}
.map-embed .leaflet-attribution-flag {
  display: none !important;
}

/* Ensure Leaflet controls and popups display above map */
.leaflet-container {
  z-index: 1 !important;
  min-height: 400px !important;
  height: 400px !important;
}

.alerts-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.alert-card:hover {
  box-shadow: 0 4px 16px rgba(183,28,28,0.12);
}
.alert-icon {
  width: 48px;
  height: 48px;
}
.alert-info {
  flex: 1;
}
.alert-title {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 0.3rem;
}
.alert-location {
  color: #b71c1c;
  font-weight: bold;
}
.alert-severity-advice { border-left-color: #1976d2; }
.alert-severity-watch { border-left-color: #fbc02d; }
.alert-severity-emergency { border-left-color: #b71c1c; }
.alert-severity-advice .alert-title { color: #1976d2; }
.alert-severity-watch .alert-title { color: #fbc02d; }
.alert-severity-emergency .alert-title { color: #b71c1c; }
.alert-actions {
  margin-top: 0.5rem;
  font-size: 0.98rem;
  color: #333;
}
footer {
  text-align: center;
  margin: 2rem 0 1rem 0;
  color: #888;
  font-size: 0.95rem;
}
footer a {
  color: #b71c1c;
  text-decoration: underline;
}

/* Medical Coordination Dashboard Styles */
.medical-coordination-dashboard h2 {
  margin-top: 0;
  font-size: 1.3rem;
  color: #2c3e50; /* Darker blue/grey for a professional look */
  letter-spacing: 0.5px;
}
.med-coord-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.med-coord-tabs button {
  background: #3498db; /* Blue for medical coordination */
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 0.5em 1em;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.2s;
}
.med-coord-tabs button:hover, .med-coord-tabs button.active {
  background: #2980b9; /* Darker blue on hover/active */
}

/* Loading Spinner Styles */
.loading-spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left: 4px solid #c0392b;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1001; /* Ensure it's above other content */
}

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

/* Community Safety Checklist Styles */
.checklist-accordion {
  margin-top: 1.5em;
}

.accordion-item {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 1em;
  overflow: hidden;
}

.accordion-header {
  background-color: #f5f5f5;
  padding: 1em 1.5em;
  width: 100%;
  text-align: left;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1em;
  font-weight: bold;
  color: #333;
  transition: background-color 0.2s;
}

.accordion-header:hover {
  background-color: #e0e0e0;
}

.accordion-header h3 {
  margin: 0;
  font-size: 1.1em;
}

.accordion-icon {
  font-size: 1.2em;
  transition: transform 0.2s;
}

.accordion-header[aria-expanded="true"] .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  padding: 1em 1.5em;
  border-top: 1px solid #e0e0e0;
  display: none; /* Controlled by JS */
}

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

.checklist-items li {
  margin-bottom: 0.8em;
}

.checklist-items label {
  display: flex;
  align-items: center;
  font-size: 1em;
  color: #444;
  cursor: pointer;
}

.checklist-items input[type="checkbox"] {
  margin-right: 0.8em;
  transform: scale(1.2);
}

.checklist-items .info-icon {
  margin-left: 0.5em;
  font-size: 0.9em;
  color: #1976d2;
  cursor: help;
}

.checklist-actions button {
  padding: 0.7em 1.5em;
  border-radius: 6px;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 1em;
  transition: background-color 0.2s, transform 0.2s;
}

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

/* Personalised Alerts Section Styles */
.personalised-alerts-section h2 {
  color: #c0392b;
  margin-bottom: 1em;
}

.personalised-alerts-section h3 {
  color: #333;
  margin-top: 1.5em;
  margin-bottom: 0.8em;
  font-size: 1.15em;
}

.personalised-alerts-section label {
  display: inline-block;
  margin-right: 1em;
  margin-bottom: 0.5em;
  font-size: 0.95em;
}

.personalised-alerts-section input[type="checkbox"],
.personalised-alerts-section input[type="radio"] {
  margin-right: 0.5em;
}

.local-hazard-dashboard #activeIncidentsList p {
  color: #555;
  font-style: italic;
}

.local-hazard-dashboard .incident-item {
  background-color: #f9f9f9;
  border-left: 5px solid;
  padding: 0.8em;
  margin-bottom: 0.7em;
  border-radius: 5px;
}

.local-hazard-dashboard .incident-item strong {
  font-size: 1.1em;
  color: #333;
}

.local-hazard-dashboard .incident-item .status-emergency { border-color: #c0392b; background-color: rgba(192, 57, 43, 0.1); }
.local-hazard-dashboard .incident-item .status-watch-and-act { border-color: #f39c12; background-color: rgba(243, 156, 18, 0.1); }
.local-hazard-dashboard .incident-item .status-advice { border-color: #1976d2; background-color: rgba(25, 118, 210, 0.1); }
.local-hazard-dashboard .incident-item .status-active { border-color: #c0392b; background-color: rgba(192, 57, 43, 0.1); }
.local-hazard-dashboard .incident-item .status-contained { border-color: #28a745; background-color: rgba(40, 167, 69, 0.1); }
.local-hazard-dashboard .incident-item .status-high { border-color: #c0392b; background-color: rgba(192, 57, 43, 0.1); } /* For predictive risk */

.alert-examples .card {
  margin-bottom: 1em;
}

.emergency-quick-actions .quick-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.8em 1.5em;
  border-radius: 8px;
  font-size: 1em;
  font-weight: bold;
  transition: background-color 0.2s, transform 0.2s;
}

.emergency-quick-actions .quick-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.emergency-quick-actions .quick-action-btn img {
  filter: brightness(0) invert(1); /* Make icons white for dark buttons */
}

/* CTA Buttons */
.cta-button {
  padding: 0.7em 1.5em;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 1em;
  transition: background-color 0.2s, transform 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  justify-content: center;
}

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

.primary-button {
  background:#28a745;
  color:#fff;
}

.primary-button:hover {
  background:#218838;
}

.secondary-button {
  background:#007bff;
  color:#fff;
}

.secondary-button:hover {
  background:#0056b3;
}

/* Toggle Buttons for Preferences */
.toggle-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  margin-top: 0.5em;
}

.toggle-button {
  background: #f0f0f0;
  color: #555;
  border: 1px solid #ccc;
  border-radius: 20px;
  padding: 0.5em 1em;
  font-size: 0.9em;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
}

.toggle-button.active {
  background: #c0392b;
  color: #fff;
  border-color: #c0392b;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.toggle-button:hover:not(.active) {
  background: #e0e0e0;
}

/* Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 15px 20px;
  border-radius: 8px;
  font-size: 1em;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.toast-notification.show {
  opacity: 1;
}

/* Accessibility Bar Enhancements */
.accessibility-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8em;
  padding: 0.5em 1em;
  background-color: #f0f0f0;
  border-bottom: 1px solid #e0e0e0;
  justify-content: center;
  align-items: center;
}

.accessibility-bar button,
.accessibility-bar select {
  padding: 0.4em 0.8em;
  border-radius: 5px;
  border: 1px solid #ccc;
  background-color: #fff;
  cursor: pointer;
  font-size: 0.9em;
  transition: background-color 0.2s, border-color 0.2s;
}

.accessibility-bar button:hover,
.accessibility-bar select:hover {
  background-color: #e9e9e9;
  border-color: #bbb;
}

.accessibility-bar button.active {
  background-color: #3498db;
  color: white;
  border-color: #3498db;
}

.font-size-controls {
  display: flex;
  gap: 0.2em;
}

.font-size-controls button {
  font-weight: bold;
}

/* Color Blind Mode */
body.color-blind-mode {
  /* Example: Deuteranomaly (red-green color blindness) friendly palette */
  --primary-red: #e74c3c; /* Original red */
  --color-bushfire: #e74c3c; /* Original red */
  --color-flood: #3498db; /* Original blue */
  --color-storm: #9b59b6; /* Original purple */
  --color-heatwave: #f39c12; /* Original orange */

  /* Adjust colors for better contrast for color blindness */
  --color-bushfire-cb: #e74c3c; /* Red remains distinct */
  --color-flood-cb: #3498db; /* Blue remains distinct */
  --color-storm-cb: #2ecc71; /* Green for storm */
  --color-heatwave-cb: #f1c40f; /* Yellow for heatwave */

  /* Override specific elements */
  .alert-severity-emergency { border-left-color: var(--color-bushfire-cb); }
  .alert-severity-emergency .alert-title { color: var(--color-bushfire-cb); }
  .alert-severity-watch { border-left-color: var(--color-heatwave-cb); }
  .alert-severity-watch .alert-title { color: var(--color-heatwave-cb); }
  .alert-severity-advice { border-left-color: var(--color-flood-cb); }
  .alert-severity-advice .alert-title { color: var(--color-flood-cb); }

  .local-hazard-dashboard .incident-item .status-emergency { border-color: var(--color-bushfire-cb); background-color: rgba(var(--color-bushfire-cb-rgb), 0.1); }
  .local-hazard-dashboard .incident-item .status-watch-and-act { border-color: var(--color-heatwave-cb); background-color: rgba(var(--color-heatwave-cb-rgb), 0.1); }
  .local-hazard-dashboard .incident-item .status-advice { border-color: var(--color-flood-cb); background-color: rgba(var(--color-flood-cb-rgb), 0.1); }
  .local-hazard-dashboard .incident-item .status-active { border-color: var(--color-bushfire-cb); background-color: rgba(var(--color-bushfire-cb-rgb), 0.1); }
  .local-hazard-dashboard .incident-item .status-contained { border-color: #28a745; background-color: rgba(40, 167, 69, 0.1); } /* Keep green for contained */
  .local-hazard-dashboard .incident-item .status-high { border-color: var(--color-bushfire-cb); background-color: rgba(var(--color-bushfire-cb-rgb), 0.1); }

  .timeline-severity-emergency { border-color: var(--color-bushfire-cb); background: rgba(var(--color-bushfire-cb-rgb), 0.1); }
  .timeline-severity-critical { border-color: var(--color-bushfire-cb); background: rgba(var(--color-bushfire-cb-rgb), 0.1); }
  .timeline-severity-medium { border-color: var(--color-heatwave-cb); background: rgba(var(--color-heatwave-cb-rgb), 0.1); }
  .timeline-severity-low { border-color: var(--color-flood-cb); background: rgba(var(--color-flood-cb-rgb), 0.1); }
  .timeline-severity-advice { border-color: var(--color-flood-cb); background: rgba(var(--color-flood-cb-rgb), 0.1); }

  /* Update specific icons/elements that use hardcoded colors */
  .flood-icon span { color: var(--color-flood-cb) !important; }
  .storm-icon span { color: var(--color-storm-cb) !important; }
  .heatwave-icon span { color: var(--color-heatwave-cb) !important; }
}

/* Font Size Adjustments */
body.font-size-small { font-size: 0.9em; }
body.font-size-large { font-size: 1.1em; }
body.font-size-xlarge { font-size: 1.2em; }

@media (max-width: 700px) {
  main {
    padding: 1rem;
  }
  .alert-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .emergency-quick-actions .quick-action-btn {
    width: 100%;
    margin-bottom: 0.5em;
  }
}

/* AI Weather Chat Styles */
.weather-chat-section {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(33,150,243,0.08);
  border: 1.5px solid #e3f2fd;
  padding: 1.5rem 1.2rem;
  margin-bottom: 1.5rem;
  flex: 0 0 350px;
  min-width: 300px;
  max-width: 400px;
  max-height: 500px;
  display: flex;
  flex-direction: column;
}

.weather-chat-section h2 {
  color: #1976d2;
  font-size: 1.3rem;
  margin-bottom: 1.2rem;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 300px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0;
  margin-bottom: 1rem;
  border: 1px solid #e3f2fd;
  border-radius: 8px;
  background: #fafbfc;
  min-height: 200px;
  max-height: 300px;
}

.typing-cursor {
  display: inline-block;
  animation: cursor-blink 1s steps(2) infinite;
  color: #1976d2;
  font-weight: bold;
}

@keyframes cursor-blink {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.message {
  margin: 1rem 1.5rem;
  padding: 1.2rem 1.5rem;
  border-radius: 16px;
  word-wrap: break-word;
  animation: fadeIn 0.3s ease-in;
  transition: all 0.2s ease;
}

.message.user {
  background: #1976d2;
  color: white;
  margin-left: 3rem;
  border-bottom-right-radius: 8px;
  padding: 1.5rem;
}

.message.ai {
  background: #e3f2fd;
  color: #1976d2;
  margin-right: 3rem;
  border-bottom-left-radius: 8px;
  border-left: 4px solid #1976d2;
  padding: 1.5rem;
}

.message.ai strong {
  color: #0d47a1;
  font-size: 1.1em;
}

.message.loading {
  background: #f5f5f5;
  color: #666;
  font-style: italic;
  margin-right: 3rem;
  border-left: 4px solid #ccc;
  padding: 1.2rem;
}

.chat-input-container {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}

.chat-input {
  flex: 1;
  padding: 0.8rem 1rem;
  border: 2px solid #e3f2fd;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.chat-input:focus {
  border-color: #1976d2;
}

.chat-send-btn {
  background: #1976d2;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.chat-send-btn:hover:not(:disabled) {
  background: #1565c0;
}

.chat-send-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.quick-questions {
  margin-bottom: 1rem;
}

.quick-questions h4 {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.quick-question-btn {
  background: #e3f2fd;
  color: #1976d2;
  border: 1px solid #bbdefb;
  border-radius: 16px;
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
  cursor: pointer;
  margin: 0.2rem;
  transition: all 0.2s;
}

.quick-question-btn:hover {
  background: #bbdefb;
  transform: translateY(-1px);
}

/* Medical Coordination Section Styles */
.medical-coordination-section h2 {
  color: #2c3e50; /* Darker blue/grey for a professional look */
  margin-bottom: 1.5em;
  font-size: 1.5rem;
  text-align: center;
}

.medical-features-group {
  margin-bottom: 2em;
  padding: 1.5em;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  background: #fdfdfd;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.medical-features-group h3 {
  color: #34495e;
  font-size: 1.3em;
  margin-top: 0;
  margin-bottom: 1em;
  text-align: center;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5em;
}

.medical-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5em;
}

.medical-features-grid .feature-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 1.5em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.medical-features-grid .feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.medical-features-grid .feature-card h3 {
  color: #34495e;
  font-size: 1.1em;
  margin-top: 0;
  margin-bottom: 0.8em;
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.medical-features-grid .feature-card h3 img {
  filter: invert(15%) sepia(10%) saturate(1000%) hue-rotate(180deg) brightness(90%) contrast(90%); /* Darken icons */
}

.medical-features-grid .feature-card p {
  font-size: 0.9em;
  color: #666;
  flex-grow: 1;
  margin-bottom: 1.5em;
}

.medical-features-grid .feature-card .button-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5em;
  margin-top: auto; /* Push buttons to the bottom */
}

/* Risk Score Widget */
.risk-score-widget {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 1.5em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  text-align: center;
}

.risk-score-widget h4 {
  color: #34495e;
  margin-top: 0;
  margin-bottom: 0.5em;
  font-size: 1.1em;
}

.risk-score-widget #riskScoreValue {
  font-size: 2.8em;
  font-weight: bold;
  color: #e74c3c; /* Red for high risk */
  margin-bottom: 0.2em;
}

.risk-score-widget p {
  font-size: 0.85em;
  color: #777;
}

.med-action-btn {
  padding: 0.6em 1.2em;
  border-radius: 5px;
  border: none;
  background-color: #3498db; /* Blue for actions */
  color: white;
  font-size: 0.9em;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
}

.med-action-btn:hover {
  background-color: #2980b9;
  transform: translateY(-1px);
}

.med-action-btn.primary-button {
  background-color: #e74c3c; /* Red for escalation */
}

.med-action-btn.primary-button:hover {
  background-color: #c0392b;
}

/* Progress Tracker */
.progress-tracker {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5em;
  background-color: #f0f0f0;
  border-radius: 8px;
  padding: 1em;
  position: relative;
}

.progress-tracker::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 1em;
  right: 1em;
  height: 4px;
  background-color: #ccc;
  transform: translateY(-50%);
  z-index: 1;
}

.progress-tracker .step {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 2;
  color: #888;
  font-weight: bold;
  font-size: 0.9em;
}

.progress-tracker .step::before {
  content: '';
  display: block;
  width: 20px;
  height: 20px;
  background-color: #ccc;
  border-radius: 50%;
  margin: 0 auto 0.5em auto;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px #ccc;
  transition: background-color 0.3s, box-shadow 0.3s;
}

.progress-tracker .step.active {
  color: #333;
}

.progress-tracker .step.active::before {
  background-color: #3498db;
  box-shadow: 0 0 0 3px #3498db;
}

.progress-tracker .step.completed {
  color: #2ecc71;
}

.progress-tracker .step.completed::before {
  background-color: #2ecc71;
  box-shadow: 0 0 0 3px #2ecc71;
  content: '✔'; /* Checkmark for completed steps */
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8em;
}

/* Small Feature Cards for Dispatch Tools */
.dispatch-features .small-card {
  flex: 1 1 calc(33% - 1em); /* Three cards per row, adjusting for gap */
  min-width: 200px;
  padding: 1em;
  background: #fdfdfd;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  text-align: center;
}

.dispatch-features .small-card h4 {
  color: #34495e;
  margin-top: 0;
  margin-bottom: 0.5em;
  font-size: 1.1em;
}

.dispatch-features .small-card p {
  font-size: 0.85em;
  color: #777;
  margin-bottom: 1em;
}

@media (max-width: 768px) {
  .medical-features-grid {
    grid-template-columns: 1fr;
  }
  .dispatch-features .small-card {
    flex: 1 1 100%;
  }
}

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

@media (max-width: 1200px) {
  .dashboard-flex {
    flex-wrap: wrap;
  }
  
  .weather-chat-section {
    flex: 1 1 100%;
    max-width: 100%;
    order: 3;
  }
}

@media (max-width: 900px) {
  .weather-chat-section {
    flex: 1 1 100%;
    min-width: 0;
    max-width: 100%;
    order: 2;
  }
  
  .chat-messages {
    min-height: 150px;
    max-height: 200px;
  }
}

/* Employee Management Styles */
#employeeDashboard .card {
    margin-bottom: 1.5rem;
}

#add-employee-form {
    display: flex;
    gap: 1rem;
    align-items: center;
}

#add-employee-form input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 5px;
}

#add-employee-form button {
    padding: 0.8rem 1.5rem;
    background-color: #c0392b;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#add-employee-form button:hover {
    background-color: #e74c3c;
}

#employee-table {
    width: 100%;
    border-collapse: collapse;
}

#employee-table th, #employee-table td {
    border: 1px solid #ddd;
    padding: 0.8rem;
    text-align: left;
}

#employee-table th {
    background-color: #f2f2f2;
}

#employee-table button {
    margin-right: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    color: white;
}

#employee-table .edit-btn {
    background-color: #f39c12;
}

#employee-table .delete-btn {
    background-color: #c0392b;
}

/* Dropdown menu styles */
.dropdown {
  position: relative;
  display: inline-block;
}
.dropdown-toggle {
  text-decoration: none;
  color: #333;
  padding: 0.5em 1em;
  border-radius: 5px;
  transition: background 0.2s;
  cursor: pointer;
  display: inline-block;
}
.dropdown-toggle:hover,
.dropdown-toggle:focus {
  background: #c0392b;
  color: #fff;
}
.dropdown-menu {
  display: none;
  position: absolute;
  left: 0;
  top: 110%;
  min-width: 200px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.13);
  z-index: 100;
  flex-direction: column;
  padding: 0.5em 0;
}
.dropdown-menu a {
  display: block;
  padding: 0.6em 1.2em;
  color: #333;
  text-decoration: none;
  border-radius: 0;
  background: none;
  transition: background 0.2s;
}
.dropdown-menu a:hover,
.dropdown-menu a:focus {
  background: #f2f2f2;
  color: #c0392b;
}
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  display: flex;
}

/* Styles for Hazard Map Legend */
#hazardLegend {
  position: fixed; /* Make it float */
  bottom: 20px; /* Distance from bottom */
  right: 20px; /* Distance from right */
  background: rgba(255, 255, 255, 0.9); /* Semi-transparent white background */
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1em;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1); /* Add shadow for depth */
  z-index: 1000; /* Ensure it's above other elements */
  width: 250px; /* Fixed width for readability */
}

#hazardLegend h3 {
  margin-top: 0;
  margin-bottom: 0.8em;
  color: #333;
  font-size: 1.2em;
}

#legendContent div {
  margin-bottom: 0.5em;
  font-size: 0.95em;
  color: #555;
}

#legendContent img, #legendContent span {
  margin-right: 0.5em;
}

/* Styles for Interactive Timeline */
.interactive-timeline-section {
  background: #f8f8f8; /* Add a distinct background to see if the section is visible */
  padding: 1.5em;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  border: 5px solid red !important; /* DEBUG: Strong red border */
  min-height: 250px !important; /* DEBUG: Ensure minimum height */
}

.timeline-container {
  position: relative;
  height: 120px; /* Increased height to accommodate markers and labels */
  border: 5px solid blue !important; /* DEBUG: Strong blue border */
  border-radius: 8px;
  background: #fcfcfc;
  overflow-x: auto;
  white-space: nowrap; /* Prevent wrapping of timeline events */
  padding: 1em 0;
  box-shadow: inset 0 1px 4px rgba(0,0,0,0.05);
}

.timeline {
  position: relative;
  height: 100%;
  min-width: 2000px; /* Base width for scrollability */
  display: flex;
  align-items: center;
  border: 5px solid green !important; /* DEBUG: Strong green border */
}

.timeline-event {
  position: absolute;
  top: 50%; /* Center vertically */
  transform: translateY(-50%);
  cursor: pointer;
  text-align: center;
  transition: transform 0.2s, opacity 0.2s;
  padding: 0.5em;
  border-radius: 5px;
  background: rgba(255,255,255,0.9); /* Slightly more opaque */
  border: 1px solid #ccc;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08); /* Stronger shadow */
  z-index: 10; /* Ensure events are above the line */
  min-width: 60px; /* Ensure a minimum width for events */
}

.timeline-event:hover {
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  z-index: 11;
}

.timeline-marker {
  font-size: 1.2em;
  margin-bottom: 0.3em;
}

.timeline-label {
  font-size: 0.8em;
  color: #555;
  white-space: normal; /* Allow label to wrap */
  max-width: 80px; /* Limit label width */
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Severity-based coloring for timeline events */
.timeline-severity-emergency {
  border-color: #c0392b;
  background: #fff3f0;
}
.timeline-severity-critical {
  border-color: #c0392b;
  background: #fff3f0;
}
.timeline-severity-medium {
  border-color: #f39c12;
  background: #fffbe6;
}
.timeline-severity-low {
  border-color: #1976d2;
  background: #e6f0ff;
}
.timeline-severity-advice {
  border-color: #1976d2;
  background: #e6f0ff;
}

/* Timeline controls */
.timeline-controls button {
  background: #1976d2;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 0.5em 1em;
  font-size: 0.9em;
  cursor: pointer;
  transition: background 0.2s;
}
.timeline-controls button:hover {
  background: #1565c0;
}

/* Timeline details panel */
#timelineDetails {
  border-left: 5px solid #1976d2;
}
#timelineDetails h3 {
  color: #1976d2;
  margin-top: 0;
  font-size: 1.1em;
}
#timelineDetails p {
  margin-bottom: 0.5em;
  font-size: 0.95em;
  color: #333;
}
#timelineDetails a {
  color: #1976d2;
  text-decoration: none;
  font-weight: bold;
}
#timelineDetails a:hover {
  text-decoration: underline;
}

/* Animated Alert Styles */
@keyframes pulse-red {
  0% { box-shadow: 0 0 0 0 rgba(192, 57, 43, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(192, 57, 43, 0); }
  100% { box-shadow: 0 0 0 0 rgba(192, 57, 43, 0); }
}

@keyframes glow-orange {
  0% { box-shadow: 0 0 0 0 rgba(243, 156, 18, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(243, 156, 18, 0); }
  100% { box-shadow: 0 0 0 0 rgba(243, 156, 18, 0); }
}

.alert-card[data-level="Emergency"] {
  animation: pulse-red 2s infinite;
  position: relative;
}

.alert-card[data-level="Watch and Act"] {
  animation: glow-orange 3s infinite;
  position: relative;
}

/* Live Indicator Dot */
.alert-card .live-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  background-color: #2ecc71; /* Green dot */
  border-radius: 50%;
  margin-left: 8px;
  animation: pulse-green 1.5s infinite;
}

@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(46, 204, 113, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}
