/* Soft monochrome + calm accents */
:root{
  --bg:#f4f5f8;
  --card:#ffffff;
  --muted:#96a1ad;
  --accent:#1e40af;
  --green:#22c55e;
  --amber:#fbbf24;
  --orange:#f97316;
  --red:#ef4444;
}

.dark {
  --bg:#0f1419;
  --card:#1e293b;
  --muted:#ffffff;
  --accent:#2563eb;
  --green:#34d399;
  --amber:#fbbf24;
  --orange:#fb923c;
  --red:#f87171;
}

*{box-sizing:border-box}
body{
  margin:0;
  background:var(--bg);
  font-family:Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  color:#222;
  height:100vh;
}

.container{
  display:grid;
  grid-template-columns:260px 1fr 380px;
  gap:14px;
  height:100%;
  padding:12px;
}

/* cards */
.card{
  background:var(--card);
  border-radius:12px;
  box-shadow:0 6px 20px rgba(10,20,40,0.06);
  padding:16px;
  overflow:auto;
}

/* controls */
.controls {
  padding: 20px;
}

.control-header {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e6e9ee;
}

.control-header h2 {
  font-size: 18px;
  color: var(--accent);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.control-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.control-group {
  margin-bottom: 20px;
}

.control-group label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.control-group input, .control-group select {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #e6e9ee;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.control-group input:focus, .control-group select:focus {
  outline: none;
  border-color: var(--accent);
}

.scenario-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.scenario-btn {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: 0;
  background: #394f83;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: background 0.3s ease;
}

.scenario-btn:hover {
  background: #2d3d5c;
}

.control-actions {
  margin: 25px 0;
}

.run-btn {
  padding: 12px 20px;
  border-radius: 8px;
  border: 0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.run-btn.primary {
  background: var(--accent);
  color: #fff;
  width: 100%;
}

.run-btn.primary:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.run-btn.secondary {
  background: #f8f9fa;
  color: var(--muted);
  border: 1px solid #e6e9ee;
}

.run-btn.secondary:hover {
  background: #e9ecef;
  color: var(--accent);
}

.control-footer {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #e6e9ee;
}

.unit-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
}

.unit-toggle .run-btn {
  flex: 1;
  padding: 8px 12px;
  font-size: 12px;
}

.notes {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

.notes p {
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

/* map */
.map-panel{display:flex;flex-direction:column;align-items:center;justify-content:flex-start}
.suspension-banner{height:50px;display:flex;justify-content:center;gap:8px;margin-bottom:10px;}
.banner-tile{flex:0 0 120px;display:flex;flex-direction:column;align-items:center;justify-content:center;font-weight:bold;text-align:center;padding:4px;background:#fafafa;border:1px solid #ccc;border-radius:8px;}
.banner-tile .tile-label{font-size:10px;color:#666;margin-bottom:2px}
.banner-tile .tile-value{font-size:16px;font-weight:bold;color:#333}
.banner-tile .tile-value.safe{color:var(--green)}
.banner-tile .tile-value.caution{color:var(--amber)}
.banner-tile .tile-value.impassable{color:var(--red)}
.banner-tile .tile-value.normal{color:var(--green)}
#map{width:92%;height:calc(72vh - 90px);border-radius:0 0 10px 10px;border:1px solid #dfe6ef;border-top:none}

/* results */
.results {
  padding: 20px;
  max-height: 100%;
  overflow-y: auto;
}

.results-header {
  text-align: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e6e9ee;
}

.results-header h3 {
  font-size: 18px;
  color: var(--accent);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.results-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.results-section {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
}

.results-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.results-section h4 {
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.table-container {
  overflow-x: auto;
  margin-bottom: 15px;
}

.flood-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.flood-table th, .flood-table td {
  padding: 8px 6px;
  border-bottom: 1px solid #eef2f6;
  text-align: left;
}

.flood-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 8px;
  color: #fff;
  font-weight: 600;
  font-size: 11px;
}

.badge.green { background: var(--green); }
.badge.yellow { background: var(--amber); color: #222; }
.badge.orange { background: var(--orange); }
.badge.red { background: var(--red); }

.kpis {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.kpi-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 3px solid var(--accent);
}

.kpi-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.kpi-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}

.kpi-unit {
  font-size: 12px;
  color: var(--muted);
  margin-left: 4px;
}

.results-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.results-actions .run-btn {
  width: 100%;
  padding: 10px;
  font-size: 13px;
}

.alert-section {
  margin-top: 15px;
  padding: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #dc2626;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.route-summary {
  margin-top: 15px;
  padding: 12px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 6px;
  color: var(--accent);
  font-size: 13px;
}

.small {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}

/* Resize charts inside the results panel */
.results canvas {
  width: 100% !important;
  max-height: 250px;   /* caps the height */
  height: 200px;       /* a good balance */
}

.dark .results-section h4 {
  color: var(--accent);
}

.dark .results-section {
  border-bottom-color: #374151;
}

.dark .results-actions .run-btn.secondary {
  background: #374151;
  color: var(--muted);
  border-color: #4b5563;
}

.dark .results-actions .run-btn.secondary:hover {
  background: #4b5563;
  color: var(--accent);
}

/* Dark mode for charts/graphs */
.dark .results canvas {
  filter: invert(1) hue-rotate(180deg);
}

/* Tabs */
.tabs {
  display: flex;
  margin-bottom: 15px;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: #e6e9ee;
  color: #222;
  cursor: pointer;
  font-size: 14px;
  border-radius: 8px 8px 0 0;
}

.tab-btn.active {
  background: var(--accent);
  color: #fff;
}

.tab-content {
  display: block;
}

/* Slider */
#forecastHour {
  width: 100%;
  margin-top: 6px;
}

/* Safe Route Identifier */
#safestRoutes ol {
  padding-left: 20px;
  margin: 0;
}

#safestRoutes li {
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.4;
}

#safestRoutes strong {
  color: var(--accent);
}

/* Navigation Header */
.header {
  background: var(--card);
  padding: 12px 20px;
  border-bottom: 1px solid #e6e9ee;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle-container {
  position: relative;
}

.theme-toggle-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.theme-toggle-btn:hover {
  background: var(--accent);
  color: white;
}

.theme-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  min-width: 150px;
  display: none;
  z-index: 1001;
  overflow: hidden;
}

.theme-menu.show {
  display: block;
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  color: var(--muted);
  transition: background 0.2s ease;
  font-size: 0.9rem;
}

.theme-option:hover {
  background: var(--accent);
  color: white;
}

.theme-option i {
  width: 16px;
}

.github-link {
  color: var(--muted);
  font-size: 1.4rem;
  transition: color 0.3s ease;
  text-decoration: none;
}

.github-link:hover {
  color: var(--accent);
}

.nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-link {
  text-decoration: none;
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.nav-link:hover {
  background: rgba(30, 64, 175, 0.1);
  color: var(--accent);
}

.nav-link.active {
  background: var(--accent);
  color: #fff;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  background: none;
  border: none;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--muted);
  margin: 3px 0;
  transition: 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Page Sections */
.page-section {
  display: none;
  height: calc(100vh - 60px); /* Adjust based on header height */
}

.page-section.active {
  display: block;
}

#plan-monitor.page-section.active {
  overflow: auto;
  display: grid;
  grid-template-columns: 260px 1fr 380px;
  gap: 14px;
  padding: 12px;
  height: calc(100vh - 60px);
}

/* Home Page Styles */
#home {
  background: linear-gradient(135deg, var(--bg) 0%, #e0f2fe 100%);
  padding: 0;
  overflow-y: auto;
}

.hero-section {
  text-align: center;
  padding: 80px 20px 60px;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.1) 0%, rgba(30, 64, 175, 0.05) 100%);
  margin-bottom: 60px;
}

.hero-section h1 {
  font-size: 48px;
  color: var(--accent);
  margin-bottom: 20px;
  animation: fadeInUp 1s ease-out;
}

.hero-section p {
  font-size: 20px;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.stats-section {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 80px;
  animation: fadeInUp 1s ease-out 0.4s both;
}

.stat-card {
  background: var(--card);
  padding: 30px 20px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  text-align: center;
  min-width: 150px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

.stat-card i {
  font-size: 32px;
  color: var(--accent);
  margin-bottom: 15px;
}

.stat-number {
  font-size: 36px;
  font-weight: bold;
  color: var(--accent);
  margin-bottom: 5px;
}

.stat-label {
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.features-section {
  max-width: 1200px;
  margin: 0 auto 80px;
  padding: 0 20px;
  animation: fadeInUp 1s ease-out 0.6s both;
}

.features-section h2 {
  text-align: center;
  font-size: 36px;
  color: var(--accent);
  margin-bottom: 50px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.feature-card {
  background: var(--card);
  padding: 40px 30px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

.feature-card i {
  font-size: 48px;
  color: var(--accent);
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 24px;
  color: var(--accent);
  margin-bottom: 15px;
}

.feature-card p {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
}

.about-section {
  max-width: 800px;
  margin: 0 auto 80px;
  padding: 0 20px;
  animation: fadeInUp 1s ease-out 0.8s both;
}

.about-section h2 {
  text-align: center;
  font-size: 32px;
  color: var(--accent);
  margin-bottom: 30px;
}

.about-section p {
  font-size: 18px;
  line-height: 1.7;
  color: var(--muted);
  text-align: center;
}

.tutorial-section {
  max-width: 1200px;
  margin: 0 auto 80px;
  padding: 0 20px;
  animation: fadeInUp 1s ease-out 1s both;
}

.tutorial-section h2 {
  text-align: center;
  font-size: 36px;
  color: var(--accent);
  margin-bottom: 50px;
}

.tutorial-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.tutorial-step {
  background: var(--card);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  text-align: center;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tutorial-step:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

.step-number {
  background: var(--accent);
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 16px;
  flex-shrink: 0;
}

.floating.step-number {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
}

.tutorial-step h3 {
  font-size: 20px;
  color: var(--accent);
  margin-bottom: 15px;
  margin-top: 10px;
}

.tutorial-step p {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
}

.cta-section {
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.1) 0%, rgba(30, 64, 175, 0.05) 100%);
  animation: fadeInUp 1s ease-out 1.2s both;
}

.cta-section p {
  font-size: 20px;
  color: var(--muted);
  margin-bottom: 30px;
}

.cta-button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 15px 40px;
  font-size: 18px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}

.cta-button:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
}

/* Page transition animations */
.page-section {
  animation: fadeIn 0.5s ease-out;
}

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

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

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

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Dark mode adjustments */
.dark .header {
  background: var(--card);
  border-bottom-color: #444;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.dark .nav-link {
  color: var(--muted);
}

.dark .nav-link.active {
  background: var(--accent);
  color: #fff;
}

.dark .intro-container h1 {
  color: var(--accent);
}

.dark .intro-container p {
  color: var(--muted);
}

.dark .controls input, .dark .controls select {
  background: var(--card);
  border-color: #555;
  color: #fff;
}

.dark .controls label {
  color: var(--muted);
}

.dark .flood-table th, .dark .flood-table td {
  border-bottom-color: #334155;
}

.dark .kpis {
  color: #e0e0e0;
}

.dark .kpi-item {
  background: #374151;
  border-left-color: var(--accent);
}

.dark .kpi-label {
  color: var(--muted);
}

.dark .kpi-value {
  color: var(--accent);
}

.dark .banner-tile {
  background: #374151;
  border-color: #4b5563;
}

.dark .banner-tile .tile-label {
  color: var(--muted);
}

.dark .banner-tile .tile-value {
  color: #e0e0e0;
}

.dark .badge.yellow {
  color: #000;
}

/* Unit toggle */
.unit-toggle {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

/* Help icon */
.help-icon {
  cursor: pointer;
  color: var(--accent);
  font-weight: bold;
  margin-left: 5px;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 64, 175, 0.1);
  font-size: 12px;
}

.help-icon:hover {
  background: var(--accent);
  color: #fff;
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
  animation: fadeIn 0.3s ease-out;
}

.modal-content {
  background-color: var(--card);
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 500px;
  border-radius: 10px;
  position: relative;
  animation: slideIn 0.3s ease-out;
}

.large-modal .modal-content {
  max-width: 900px;
  width: 95%;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: #000;
  text-decoration: none;
}

#hotlinesContent h3 {
  margin-top: 20px;
  margin-bottom: 10px;
  color: var(--accent);
}

#hotlinesContent ul {
  list-style-type: none;
  padding: 0;
}

#hotlinesContent li {
  margin-bottom: 8px;
  font-size: 14px;
}

#hotlinesContent strong {
  color: var(--accent);
}

/* Dark mode for modal */
.dark .modal-content {
  background-color: var(--card);
  color: #fff;
}

.dark .close:hover,
.dark .close:focus {
  color: #fff;
}

/* Street Details Modal Styles */
.street-details-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 700px; /* Ensure minimum width for all columns */
}

.street-details-table th,
.street-details-table td {
  padding: 8px 6px;
  border-bottom: 1px solid #eef2f6;
  text-align: left;
  white-space: nowrap; /* Prevent text wrapping */
}

.street-details-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
  z-index: 1;
}

.dark .street-details-table th,
.dark .street-details-table td {
  border-bottom-color: #444;
}

.dark .street-details-table th {
  background: #374151;
  color: #e0e0e0;
}

/* Table container for horizontal scrolling */
.table-container {
  overflow-x: auto;
  margin-bottom: 15px;
  max-height: 400px;
  overflow-y: auto;
}

/* Tutorial modal styles */
.tutorial-step {
  text-align: center;
}

.tutorial-step h3 {
  color: var(--accent);
  margin-bottom: 10px;
}

.tutorial-step p {
  margin-bottom: 20px;
  line-height: 1.5;
}

.tutorial-next, .tutorial-prev, .tutorial-done {
  padding: 8px 16px;
  border: none;
  border-radius: 5px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  margin: 0 5px;
}

.tutorial-prev {
  background: #666;
}

.tutorial-done {
  background: var(--green);
}

/* Mobile Toggles */
.mobile-toggles {
  display: none;
  position: fixed;
  top: 70px;
  right: 16px;
  z-index: 101;
  gap: 8px;
}

.mobile-toggle-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: background 0.2s;
}

.mobile-toggle-btn:hover {
  background: #1d4ed8;
}

.mobile-toggle-btn.active {
  background: #dc2626;
}

/* Weather Bulletin Styles */
.weather-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.weather-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e6e9ee;
}

.weather-header h1 {
  font-size: 32px;
  color: var(--accent);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.weather-subtitle {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 15px;
}

.weather-location-selector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.location-input-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.location-input-group label {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

.location-input-group select {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #e6e9ee;
  font-size: 14px;
  background: var(--card);
  color: var(--accent);
  min-width: 200px;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.location-input-group select:focus {
  outline: none;
  border-color: var(--accent);
}

.weather-location {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.weather-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.weather-card {
  background: var(--card);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border: 1px solid #e6e9ee;
}

.weather-card h3 {
  font-size: 18px;
  color: var(--accent);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

/* Current Weather */
.current-weather {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.current-weather h3 {
  color: white;
}

.temp-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin-bottom: 15px;
}

#currentTemp {
  font-size: 48px;
  font-weight: 300;
}

.temp-unit {
  font-size: 24px;
  margin-left: 5px;
}

.weather-condition {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 18px;
}

.weather-metrics {
  display: flex;
  justify-content: space-around;
  gap: 15px;
}

.metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 12px;
}

/* Alerts */
.alerts-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.alert-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
}

.alert-item.warning {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  color: #92400e;
}

.alert-content strong {
  display: block;
  margin-bottom: 5px;
}

.alert-content p {
  margin: 0;
  font-size: 13px;
}

/* Forecasts */
.forecast-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 300px;
  overflow-y: auto;
}

.hourly-item, .daily-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #f8f9fa;
  border-radius: 6px;
  font-size: 14px;
}

.hourly-item {
  justify-content: space-between;
}

.daily-item {
  padding: 12px;
}

.forecast-time {
  font-weight: 500;
  min-width: 60px;
}

.forecast-icon {
  font-size: 20px;
  color: var(--accent);
}

.forecast-temp {
  font-weight: 600;
  color: var(--accent);
}

.forecast-desc {
  color: var(--muted);
  font-size: 12px;
}

/* Impact Analysis */
.impact-metrics {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.impact-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}

.impact-item:last-child {
  border-bottom: none;
}

.impact-label {
  font-size: 14px;
  color: var(--muted);
}

.impact-value {
  font-size: 16px;
  font-weight: 600;
}

.impact-value.high {
  color: #ef4444;
}

.impact-value.medium {
  color: #f59e0b;
}

.impact-value.low {
  color: #22c55e;
}

/* Weather Actions */
.weather-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
}

/* Dark mode for weather */
.dark .current-weather {
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
}

.dark .alert-item.warning {
  background: #451a03;
  color: #fbbf24;
}

.dark .hourly-item, .dark .daily-item {
  background: #374151;
  color: #e5e7eb;
}

.dark .impact-item {
  border-bottom-color: #4b5563;
}

/* Emergency Hub Styles */
.emergency-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.emergency-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e6e9ee;
}

.emergency-header h1 {
  font-size: 32px;
  color: var(--accent);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.emergency-subtitle {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 10px;
}

.emergency-disclaimer {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: #92400e;
}

.emergency-disclaimer i {
  color: #f59e0b;
  margin-top: 2px;
  flex-shrink: 0;
}

.emergency-disclaimer small {
  line-height: 1.4;
  margin: 0;
}

.emergency-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.emergency-card {
  background: var(--card);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border: 1px solid #e6e9ee;
}

.emergency-card h3 {
  font-size: 18px;
  color: var(--accent);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

/* Emergency Alerts */
.alerts-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.alert-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
}

.alert-item.info {
  background: #e0f2fe;
  border-left: 4px solid #0284c7;
  color: #0c4a6e;
}

.alert-item.warning {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  color: #92400e;
}

.alert-item.danger {
  background: #fee2e2;
  border-left: 4px solid #dc2626;
  color: #991b1b;
}

.alert-content strong {
  display: block;
  margin-bottom: 5px;
}

.alert-content p {
  margin: 0;
  font-size: 13px;
}

.alert-actions {
  margin-top: 15px;
  text-align: center;
}

/* Evacuation Routes */
.campus-selector {
  margin-bottom: 15px;
}

.campus-selector label {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 5px;
  display: block;
}

.campus-selector select {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #e6e9ee;
  font-size: 14px;
  background: var(--card);
  color: var(--accent);
}

.evacuation-map {
  height: 200px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e6e9ee;
}

.route-info h4 {
  font-size: 16px;
  color: var(--accent);
  margin-bottom: 10px;
}

#routeList {
  font-size: 14px;
  line-height: 1.6;
}

#routeList ol {
  padding-left: 20px;
}

#routeList li {
  margin-bottom: 8px;
}

/* Emergency Contacts */
.contact-tabs {
  display: flex;
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e6e9ee;
}

.contact-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: #f8f9fa;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s, color 0.3s;
}

.contact-tab.active {
  background: var(--accent);
  color: #fff;
}

.contacts-content {
  max-height: 250px;
  overflow-y: auto;
}

.contacts-content .contact-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}

.contacts-content .contact-item:last-child {
  border-bottom: none;
}

.contact-name {
  font-weight: 500;
  color: var(--accent);
}

.contact-number {
  font-weight: 600;
  color: var(--muted);
}

/* Emergency Procedures */
.procedure-steps {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.procedure-step {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid var(--accent);
  position: relative;
}

.step-number {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  flex-shrink: 0;
}

.step-content h4 {
  font-size: 16px;
  color: var(--accent);
  margin-bottom: 5px;
  margin-top: 0;
}

.step-content p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
}

/* Resource Tracking */
.resource-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 15px;
}

.resource-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
}

.resource-item i {
  font-size: 20px;
  color: var(--accent);
  width: 30px;
}

.resource-info {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.resource-name {
  font-weight: 500;
  color: var(--accent);
}

.resource-status {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 12px;
  text-transform: uppercase;
}

.resource-status.available {
  background: #dcfce7;
  color: #166534;
}

.resource-status.limited {
  background: #fef3c7;
  color: #92400e;
}

.resource-status.unavailable {
  background: #fee2e2;
  color: #991b1b;
}

.resource-actions {
  text-align: center;
}

/* Emergency Kit Checklist */
.kit-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 15px;
}

.kit-category h4 {
  font-size: 16px;
  color: var(--accent);
  margin-bottom: 10px;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 5px;
}

.kit-category ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.kit-category li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--muted);
}

.kit-category input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.kit-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Emergency Actions */
.emergency-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
  flex-wrap: wrap;
}

/* Report Issues Styles */
#report-issues.page-section.active {
  overflow-y: auto;
  padding: 20px;
}

.report-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.report-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e6e9ee;
}

.report-header h1 {
  font-size: 32px;
  color: var(--accent);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.report-subtitle {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 15px;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.report-card {
  background: var(--card);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border: 1px solid #e6e9ee;
}

.report-card h3 {
  font-size: 18px;
  color: var(--accent);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

/* Report Form */
.report-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #e6e9ee;
  font-size: 14px;
  background: var(--card);
  color: inherit;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

/* Photo Upload */
.photo-upload-area {
  border: 2px dashed #e6e9ee;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  transition: border-color 0.3s ease;
}

.photo-upload-area:hover {
  border-color: var(--accent);
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.upload-placeholder i {
  font-size: 48px;
  color: var(--muted);
}

.upload-placeholder p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.photo-preview {
  margin-top: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.photo-preview img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e6e9ee;
}

/* Incident Map */
.incident-map {
  height: 250px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e6e9ee;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-controls {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  justify-content: center;
}

/* Status Tracking */
.status-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 300px;
  overflow-y: auto;
}

.status-item {
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid var(--accent);
}

.status-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.status-id {
  font-weight: 600;
  color: var(--accent);
  font-size: 14px;
}

.status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.pending {
  background: #fef3c7;
  color: #92400e;
}

.status-badge.in-progress {
  background: #dbeafe;
  color: #1e40af;
}

.status-badge.resolved {
  background: #dcfce7;
  color: #166534;
}

.status-details p {
  margin: 4px 0;
  font-size: 13px;
  color: var(--muted);
}

/* Community Alerts */
.community-alerts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 250px;
  overflow-y: auto;
}

.alert-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
}

.alert-item.warning {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  color: #92400e;
}

.alert-item.info {
  background: #e0f2fe;
  border-left: 4px solid #0284c7;
  color: #0c4a6e;
}

.alert-item.success {
  background: #dcfce7;
  border-left: 4px solid #22c55e;
  color: #166534;
}

.alert-content strong {
  display: block;
  margin-bottom: 5px;
}

.alert-content p {
  margin: 0;
  font-size: 13px;
}

.alert-content small {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  opacity: 0.8;
}

/* Coming Soon Overlay */
.coming-soon-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.overlay-content {
  text-align: center;
  padding: 20px;
}

.overlay-content i {
  font-size: 48px;
  color: var(--accent);
  margin-bottom: 10px;
}

.overlay-content p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

/* Dark mode for report issues */
.dark .status-item {
  background: #374151;
}

.dark .alert-item.warning {
  background: #451a03;
  color: #fbbf24;
}

.dark .alert-item.info {
  background: #1e3a8a;
  color: #dbeafe;
}

.dark .alert-item.success {
  background: #14532d;
  color: #bbf7d0;
}

.dark .coming-soon-overlay {
  background: rgba(0, 0, 0, 0.8);
}

.dark .photo-upload-area {
  border-color: #4b5563;
}

.dark .photo-upload-area:hover {
  border-color: var(--accent);
}

/* Mobile responsiveness for report issues */
@media (max-width: 768px) {
  .report-container {
    padding: 15px;
  }

  .report-header h1 {
    font-size: 28px;
  }

  .report-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .report-card {
    padding: 15px;
  }

  .report-form {
    gap: 12px;
  }

  .photo-upload-area {
    padding: 15px;
  }

  .upload-placeholder i {
    font-size: 36px;
  }

  .status-list {
    max-height: 200px;
  }

  .community-alerts {
    max-height: 200px;
  }
}

/* Dark mode for emergency hub */
.dark .alert-item.info {
  background: #1e3a8a;
  color: #dbeafe;
}

.dark .alert-item.warning {
  background: #451a03;
  color: #fbbf24;
}

.dark .alert-item.danger {
  background: #7f1d1d;
  color: #fecaca;
}

.dark .procedure-step {
  background: #374151;
}

.dark .resource-item {
  background: #374151;
}

.dark .contact-item {
  border-bottom-color: #4b5563;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
  .header {
    padding: 8px 16px;
  }

  .nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card);
    border-bottom: 1px solid #e6e9ee;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 1000;
  }

  .nav.active {
    display: flex;
  }

  .nav-link {
    padding: 12px 16px;
    text-align: center;
    border-bottom: 1px solid #e6e9ee;
  }

  .nav-link:last-child {
    border-bottom: none;
  }

  .hamburger {
    display: flex;
  }

  .mobile-toggles {
    display: flex !important;
  }

  #plan-monitor.page-section.active {
    display: block;
    padding: 8px;
    height: calc(100vh - 60px);
  }

  .controls {
    position: fixed;
    top: 110px;
    left: -100%;
    width: 280px;
    height: calc(100vh - 130px);
    z-index: 99;
    transition: left 0.3s ease;
    overflow-y: auto;
    border-radius: 0 12px 12px 0;
    box-shadow: 2px 0 8px rgba(0,0,0,0.2);
  }

  .controls.active {
    left: 0;
  }

  .map-panel {
    height: calc(100vh - 110px);
    position: relative;
    z-index: 1;
  }

  .results {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    height: calc(50vh - 60px);
    background: var(--card);
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.2);
    z-index: 98;
    transition: bottom 0.3s ease;
    overflow-y: auto;
    padding: 16px;
  }

  .results.active {
    bottom: 0;
  }

  #map {
    height: 100%;
    width: 100%;
    position: relative;
    z-index: 1;
  }

  .suspension-banner {
    flex-wrap: wrap;
    height: auto;
    padding: 6px;
  }

  .banner-tile {
    flex: 0 0 calc(50% - 4px);
    margin-bottom: 4px;
  }

  .results canvas {
    width: 100% !important;
    height: 150px !important;
  }

  .unit-toggle {
    flex-direction: column;
  }

  .intro-container {
    margin: 20px auto;
    padding: 16px;
  }

  .intro-container h1 {
    font-size: 28px;
  }

  .intro-container p {
    font-size: 16px;
  }

  .weather-container {
    padding: 15px;
  }

  .weather-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .weather-header h1 {
    font-size: 28px;
  }

  .weather-actions {
    flex-direction: column;
    align-items: center;
  }

  .temp-display {
    flex-direction: column;
    align-items: center;
    gap: 5px;
  }

  #currentTemp {
    font-size: 36px;
  }

  .weather-metrics {
    flex-direction: column;
    gap: 10px;
  }
}
