/* Extracted CSS from public/index.html */



.liner-mini-color-circle {
  color: #fff !important;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5) !important;
}
/* ===================================== */
   /* 🌍 HAZARD MAP STYLING */
/* The Map Area */
#hazard-map { 
  height: 600px; 
  width: 100%; 
  z-index: 1;
  border: 2px solid #ccc;
}

/* ✅ ADD THIS RIGHT BELOW */
.hazard-wrapper {
  position: relative;
}

.hazard-menu {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255,255,255,0.95);
  padding: 12px;
  border-radius: 10px;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hazard-menu select {
  padding: 4px;
  border-radius: 4px;
}

.hazard-specific-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hazard-specific-control[hidden] {
  display: none !important;
}
.hazard-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.hazard-toolbar button {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #083b7a, #0d6efd);
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}

.hazard-toolbar button.secondary {
  background: linear-gradient(135deg, #475569, #334155);
}

.hazard-risk-panel {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(14, 116, 144, 0.2);
  border-left: 5px solid #0ea5e9;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.hazard-risk-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.hazard-risk-panel h3 {
  margin: 0 0 4px;
  color: #08345f;
  font-size: 18px;
  font-weight: 900;
}

.hazard-risk-panel p {
  margin: 0;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

#hazardRiskActiveBadge {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  color: #0f172a;
  background: #e2e8f0;
  font-size: 12px;
  font-weight: 900;
}

.hazard-risk-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.hazard-risk-stat {
  padding: 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.hazard-risk-stat span,
.hazard-risk-stat strong {
  display: block;
}

.hazard-risk-stat span {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.hazard-risk-stat strong {
  color: #0f172a;
  font-size: 24px;
  line-height: 1.1;
}

.hazard-risk-stat.high {
  border-color: rgba(220, 38, 38, 0.35);
}

.hazard-risk-stat.moderate {
  border-color: rgba(249, 115, 22, 0.35);
}

.hazard-risk-stat.low {
  border-color: rgba(34, 197, 94, 0.35);
}

.hazard-risk-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hazard-risk-list span {
  padding: 9px 13px;
  border-radius: 999px;
  color: #08345f;
  background: #e0f2fe;
  border: 1px solid rgba(14, 116, 144, 0.2);
  font-size: 16px;
  line-height: 1.25;
  font-weight: 850;
}

#hazard-map-viewer[data-monitoring-type="flood"] .hazard-risk-panel {
  border-left-color: #2563eb;
}

#hazard-map-viewer[data-monitoring-type="flood"] .hazard-risk-stat.high {
  border-color: rgba(37, 99, 235, 0.55);
}

#hazard-map-viewer[data-monitoring-type="flood"] .hazard-risk-stat.moderate {
  border-color: rgba(56, 189, 248, 0.6);
}

#hazard-map-viewer[data-monitoring-type="flood"] .hazard-risk-stat.low {
  border-color: rgba(94, 234, 212, 0.7);
}

#hazard-map-viewer[data-monitoring-type="flood"] .hazard-risk-list span {
  color: #1e3a8a;
  background: #dbeafe;
  border-color: rgba(37, 99, 235, 0.3);
}

.hazard-risk-list .hazard-risk-empty {
  color: #64748b;
  background: #f8fafc;
  border-color: #e2e8f0;
}

.intelligence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.intelligence-panel {
  background: linear-gradient(145deg, rgba(255,255,255,0.96), rgba(242,247,252,0.94));
  border-left: 6px solid #083b7a;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

.intelligence-panel h3,
.intelligence-panel p,
.intelligence-panel li,
.intelligence-panel span,
.intelligence-panel strong {
  color: #16324f !important;
}

.intelligence-panel h3 {
  margin-top: 0;
}

.intel-status-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.intel-status-list li {
  background: rgba(8,59,122,0.06);
  border: 1px solid rgba(8,59,122,0.12);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.intel-status-value {
  display: block;
  font-size: 16px;
  font-weight: 800;
  margin-top: 4px;
}

.intel-links {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.intel-links li {
  margin-bottom: 10px;
}

.intel-links a {
  display: block;
  text-decoration: none;
  background: rgba(13,110,253,0.08);
  border: 1px solid rgba(13,110,253,0.15);
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 700;
  color: #083b7a !important;
}

.embed-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.96), rgba(243,248,255,0.94));
  border-left: 6px solid #0d6efd;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
  margin: 20px auto;
  max-width: 1400px;
}

.embed-card h3,
.embed-card p {
  color: #16324f !important;
}

.embed-card h3 {
  margin-top: 0;
}

  /* Header for the page */
  .map-title-bar {
    background: #004a99;
    color: white;
    padding: 10px;
    text-align: center;
    border-radius: 8px 8px 0 0;
  }

  /* CRITICAL FIX: This keeps the layer menu visible */
  .leaflet-control-layers {
    z-index: 9999 !important; 
    background: white !important;
    padding: 10px;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
  }

    /* ===================================== */
    /* 🌄 GLOBAL SITE BACKGROUND */
    /* ===================================== */
    html, body {
  width: 100%;
  overflow-x: hidden;
}

/* 🔥 ADD THIS EXACTLY HERE */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #222;
  --card-surface: linear-gradient(180deg, rgba(255,255,255,0.97) 0%, rgba(246,249,252,0.95) 100%);
  --card-border: rgba(8,59,122,0.14);
  --card-shadow: 0 16px 34px rgba(5,23,45,0.18);
  --card-shadow-soft: 0 10px 22px rgba(5,23,45,0.12);
  --card-title-bg: linear-gradient(135deg, #0b4ea2, #083b7a);
  --card-title-shadow: 0 8px 18px rgba(8,59,122,0.22);
  --card-text: #18344f;
  --card-muted: #4b647f;

  background: linear-gradient(
    to bottom,
    #0f172a,
    #134e4a,
    #0f172a
  );

  min-height: 100vh;
}
    /* KEEP ALL YOUR EXISTING CSS BELOW THIS LINE */
    nav {
      background: #062c63;
      padding: 10px;
      text-align: center;
    }

    nav a {
      color: white;
      text-decoration: none;
      margin: 0 15px;
      font-weight: bold;
      font-size: 14px;
    }

    section {
      padding: 30px;
      max-width: 1300px;
      margin: auto;
    }
@media (max-width: 768px){

  section {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;        /* 🔥 ADD THIS */
    padding: 15px !important;
  }

}
/* 🔓 Allow weather section to host full-width maps */
#weather {
  max-width: none;
  padding: 0;
}

.card {
  position: relative;
  z-index: 2;

  background: var(--card-surface);
  backdrop-filter: blur(8px);
  border: 1px solid var(--card-border);

  padding: 44px;
  min-height: 360px;
  border-radius: 22px;

  margin-top: 20px;

  box-shadow: var(--card-shadow);

  width: 100%;
  min-width: min(100%, 340px);
  max-width: 100%;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(90deg, rgba(13,110,253,0.9), rgba(23,162,184,0.58), rgba(255,193,7,0.55));
  opacity: 1;
}

.card > :first-child {
  margin-top: 0;
}

.card h2,
.card h3,
.card h4,
.card p,
.card li,
.card span,
.card strong,
.card label {
  color: #1f2937 !important;
}

.card h2,
.card h3 {
  font-size: 22px;
  line-height: 1.2;
}

.card p,
.card li {
  line-height: 1.55;
}

.card p,
.card li,
.card label,
.card input,
.card select,
.card textarea,
.card button,
.card small,
.card strong,
.card span {
  font-size: 1.15rem;
}

.card p {
  margin: 0 0 12px;
}

.card ul {
  margin: 0;
  padding-left: 22px;
}

.card li + li {
  margin-top: 4px;
}

.card a {
  color: #0b5fc4;
}

.card h4:not(.section-title) {
  margin: 14px 0 10px;
  color: #0b4f94;
}

    h2 {
      color: #083b7a;
    }

    footer {
      background: #083b7a;
      color: white;
      text-align: center;
      padding: 15px;
      margin-top: 40px;
      font-size: 13px;
    }

    .site-policy-links {
      background: #062f5f;
      color: #ffffff;
      text-align: center;
      padding: 10px 16px;
      font-size: 13px;
    }

    .site-policy-links button,
    .policy-link {
      background: transparent;
      border: 0;
      color: #0b5fc4;
      cursor: pointer;
      font: inherit;
      font-weight: 700;
      padding: 0;
      text-decoration: underline;
      text-underline-offset: 2px;
    }

    .site-policy-links button {
      color: #ffffff;
    }

    .site-policy-links button:hover,
    .site-policy-links button:focus,
    .policy-link:hover,
    .policy-link:focus {
      color: #ffd85a;
      outline: 2px solid currentColor;
      outline-offset: 3px;
    }

    .policy-link:hover,
    .policy-link:focus {
      color: #083b7a;
    }

    .policy-consent {
      background: #f8fbff;
      border: 1px solid #c9d8ea;
      border-radius: 8px;
      color: #0f172a;
      margin-top: 14px;
      padding: 12px;
    }

    .policy-consent-dark {
      background: rgba(255, 255, 255, 0.1);
      border-color: rgba(255, 255, 255, 0.35);
      color: #ffffff;
    }

    .policy-consent label {
      align-items: flex-start;
      display: flex;
      gap: 10px;
      line-height: 1.45;
    }

    .policy-consent input[type="checkbox"] {
      flex: 0 0 auto;
      margin-top: 3px;
    }

    .policy-consent-dark .policy-link {
      color: #9fd1ff;
    }

    .policy-consent-dark .policy-link:hover,
    .policy-consent-dark .policy-link:focus {
      color: #ffffff;
    }

    .policy-consent-error {
      color: #b42318;
      font-size: 12px;
      font-weight: 700;
      margin-top: 8px;
    }

    .policy-consent-dark .policy-consent-error {
      color: #ffd5d5;
    }

    .policy-modal-content {
      max-width: 860px;
    }

    .policy-modal {
      z-index: 10050;
    }

    .policy-modal-body {
      color: #1f2937;
      line-height: 1.55;
      max-height: 68vh;
      overflow-y: auto;
    }

    .policy-modal-body section + section {
      margin-top: 18px;
    }

    .policy-modal-body h4 {
      color: #083b7a;
      margin: 0 0 6px;
    }

    .policy-modal-body p {
      margin: 0;
    }

    .privacy-notice-banner {
      align-items: center;
      background: #ffffff;
      border: 1px solid #bfd3ea;
      border-left: 6px solid #0b5fc4;
      border-radius: 8px;
      bottom: 54px;
      box-shadow: 0 12px 30px rgba(2, 23, 54, 0.25);
      color: #0f172a;
      gap: 16px;
      left: 16px;
      max-width: 760px;
      padding: 14px 16px;
      position: fixed;
      right: 16px;
      z-index: 10001;
    }

    .privacy-notice-banner p {
      flex: 1 1 auto;
      margin: 0;
    }

    .privacy-notice-actions {
      display: flex;
      flex: 0 0 auto;
      gap: 8px;
    }

    .privacy-notice-actions button {
      background: #eaf3ff;
      border: 1px solid #9fc1e6;
      border-radius: 8px;
      color: #083b7a;
      cursor: pointer;
      font-weight: 700;
      padding: 9px 12px;
    }

    .privacy-notice-actions button.primary {
      background: #083b7a;
      border-color: #083b7a;
      color: #ffffff;
    }

/* 🚫 Remove section styling influence on full-width maps */

#weather > .full-width-section {
  all: unset;
  display: block;
  width: 100%;
  position: relative;
  left: 0;
  margin-left: 0;
}
/* 🌧 WINDY REAL-TIME WEATHER RADAR – IMAGE BACKGROUND */
.windy-card {
  position: relative;
  color: #ffffff;
}
/* Ensure all text stays readable */
.windy-card h3,
.windy-card p,
.windy-card span {
  color: #ffffff !important;
}

.weather-subheading{
  margin-top:15px;
  color:#0b5394 !important;
  font:800 1.02rem/1.4 "Trebuchet MS", "Segoe UI", sans-serif;
  letter-spacing:0.01em;
}

/* 📒 OPCEN DAILY INCIDENT LOG – IMAGE CARD */
/* 📒 OPCEN DAILY INCIDENT LOG – STRONGER IMAGE */
/* 📒 OPCEN DAILY INCIDENT LOG – VERY STRONG IMAGE */
.opcen-log-card {
  position: relative;

  background:
    linear-gradient(
      rgba(0, 0, 0, 0.15),
      rgba(0, 0, 0, 0.15)
    ),
    url("images/opcen_daily_log.jpg") center / cover no-repeat;

  color: #ffffff;

  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

#incidentReviewQueueCard {
  background: linear-gradient(180deg, rgba(255,255,255,0.97), rgba(244,248,255,0.96));
  color: #17324d;
}

#incidentReviewQueueCard h3,
#incidentReviewQueueCard p,
#incidentReviewQueueCard strong,
#incidentReviewQueueCard small,
#incidentReviewQueueCard span {
  color: #17324d !important;
}

#incidentReviewQueueCard .ops-list-item {
  background: rgba(11, 95, 196, 0.08);
  border: 1px solid rgba(11, 95, 196, 0.18);
}

/* ===== OPCEN DAILY INCIDENT LOG TABLE – READABILITY FIX ===== */

#incident-log table {
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
}

#incident-log thead th {
  background: rgba(0, 0, 0, 0.85);
  color: #ffffff;
  font-weight: bold;
  text-align: center;
  font-size: 14px;
}

#incident-log tbody td {
  background: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  font-size: 14px;
}

#incident-log tbody tr:nth-child(even) td {
  background: rgba(0, 0, 0, 0.65);
}

#incident-log tbody td[colspan] {
  color: #ffffff;
  font-weight: bold;
}

/* 🔧 TOP STATUS BOARD */
.top-status-board{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  padding:14px 18px;
  background:linear-gradient(135deg, #0f5132, #0b3f2f);
  border-bottom:2px solid rgba(255,255,255,0.08);
}

.top-status-card{
  background:rgba(255,255,255,0.10);
  border:1px solid rgba(255,255,255,0.12);
  border-radius:18px;
  padding:14px;
  box-shadow:0 10px 18px rgba(0,0,0,0.14);
}

.site-dev-banner{
  margin:14px auto 18px;
  max-width:1220px;
  padding:12px 18px;
  background:#fff3cd;
  border:1px solid #ffeaa7;
  border-radius:8px;
  text-align:center;
  box-shadow:0 10px 24px rgba(0,0,0,0.12);
}

.site-dev-banner strong{
  display:block;
  margin-bottom:3px;
  font-size:1.1rem !important;
  font-weight: 700 !important;
  color: #856404 !important;
}

.site-dev-banner span{
  display:block;
  font-size:1rem !important;
  line-height:1.5;
  color: #856404 !important;
}

.top-status-label{
  display:block;
  margin-bottom:10px;
  font-size:12px;
  font-weight:800;
  letter-spacing:0.06em;
  text-transform:uppercase;
  color:rgba(255,255,255,1);
}

.top-status-value{
  padding:12px 14px;
  border-radius:14px;
  text-align:center;
  font-weight:900;
  font-size:20px;
  line-height:1.2;
  transition:all 0.3s ease;
}

.top-status-meta{
  margin:10px 0 0;
  font-size:13px;
  line-height:1.45;
  color:rgba(255,255,255,1);
}

#eocStatusBar{
  background:#198754;
  color:white;
}

.status-normal{
  background:#198754;
  color:#ffffff;
}

.status-yellow{
  background:#ffc107;
  color:#1f2937;
}

.status-blue{
  background:#0d6efd;
  color:#ffffff;
}

.status-red{
  background:#b30000;
  color:#ffffff;
}

.status-orange{
  background:#ff8800;
  color:#ffffff;
}
/* 📍 BARANGAY HEATMAP */
.brgy{
  padding:10px;
  text-align:center;
  border-radius:8px;
  font-weight:bold;
  color:white;
}

.brgy.safe{
  background:#198754 !important;
  color:#ffffff !important;
}
.brgy.monitoring{
  background:#ffc107 !important;
  color:#1f2937 !important;
}
.brgy.danger{
  background:#dc3545 !important;
  color:#ffffff !important;
}
#barangayMap .brgy{
  background-image:none !important;
  box-shadow:none !important;
}
#barangayMap .brgy.safe{
  background:#198754 !important;
  background-color:#198754 !important;
  color:#ffffff !important;
}
#barangayMap .brgy.monitoring{
  background:#ffc107 !important;
  background-color:#ffc107 !important;
  color:#1f2937 !important;
}
#barangayMap .brgy.danger{
  background:#dc3545 !important;
  background-color:#dc3545 !important;
  color:#ffffff !important;
}
.brgy:hover{
  transform: scale(1.05);
  cursor:pointer;
}
/* 🎞 HERO SLIDER */
#heroSlider {
  width: 100%;
  position: relative;
  height: 420px;   /* 🔥 FIX: force real height */
}

/* 📰 HERO NEWS */
.hero-news {
  padding: 20px 20px 30px;   /* 🔥 CLEAN single version */
  background: transparent;
  margin-top: 0;
}

.hero-news .card {
  margin: 20px auto 0;
  max-width: 900px;
}

.home-editor-panel {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(8, 59, 122, 0.14);
}

.home-editor-panel h4 {
  margin: 0 0 12px;
  color: #083b7a;
  font-size: 16px;
}

.home-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.home-editor-panel input,
.home-editor-panel textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(8, 59, 122, 0.18);
  background: rgba(255,255,255,0.96);
  color: #16324f;
  font: inherit;
}

.home-editor-panel textarea {
  min-height: 110px;
  resize: vertical;
}

.home-editor-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.home-editor-actions button {
  border: none;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, #0d6efd, #083b7a);
  color: #fff;
}

.home-editor-actions .secondary {
  background: linear-gradient(135deg, #64748b, #475569);
}

.home-manager-list {
  display: grid;
  gap: 10px;
}

.home-manager-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(8, 59, 122, 0.05);
  border: 1px solid rgba(8, 59, 122, 0.1);
}

.home-manager-item strong,
.home-manager-item span {
  display: block;
}

.home-manager-item span {
  color: #475569;
  font-size: 13px;
  margin-top: 4px;
}

.home-manager-item-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.home-manager-item-actions button {
  border: none;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  background: rgba(13, 110, 253, 0.12);
  color: #083b7a;
}

.home-manager-item-actions .danger {
  background: rgba(220, 53, 69, 0.14);
  color: #b42318;
}

.home-slide-tag {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(8, 59, 122, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

/* 🧱 HERO CONTAINER */
.hero-container {
  max-width: 1100px;
  margin: 30px auto 40px;   /* 🔥 merged margin */
  border-radius: 16px;

  overflow: visible;        /* 🔥 allow content */
  display: block;
}

/* 🎞 SLIDES */
.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;

  transform: scale(1.05);              /* 🔥 zoom base */
  transition: opacity 1s ease-in-out, transform 6s ease;

}

.slide.active {
  opacity: 1;
  transform: scale(1);                 /* 🔥 zoom in effect */
}
/* 🎛 SLIDER CONTROLS */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4);
  color: white;
  border: none;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 18px;
  border-radius: 6px;
  z-index: 3;
}

.slider-btn:hover {
  background: rgba(0,0,0,0.7);
}

.prev { left: 10px; }
.next { right: 10px; }

/* 🔵 DOTS */
.slider-dots {
  position: absolute;
  bottom: 12px;
  width: 100%;
  text-align: center;
  z-index: 3;
}

.slider-dots span {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 0 4px;
  background: rgba(255,255,255,0.8);
  border-radius: 50%;
  cursor: pointer;
}

.slider-dots .active {
  background: white;
}

/* 🔴 GLOBAL ALERT BAR STATES */
#globalAlertBar{
  text-align:center;
  padding:12px 14px;
  font-weight:bold;
  font-size:18px;
  border-radius:14px;
}

/* STATES */
.alert-normal{
  background:#198754;
  color:white;
}

.alert-monitoring{
  background:#ffc107;
  color:black;
}

.alert-blue{
  background:#0d6efd;
  color:white;
}

.alert-red{
  background:#dc3545;
  color:white;
}
/* ✅ Sticky Banner Across Whole Site */
.sticky-banner {
  position: relative;
  top: auto;
  z-index: auto;
  width: auto;
  padding: 12px 14px;
  font-weight: 900;
  text-align: center;
  font-size: 17px;
  border-radius: 14px;
}

/* Banner Colors */
.sticky-banner.yellow {
  background: #ffeb3b;
  color: black;
}

.sticky-banner.orange {
  background: #ff9800;
  color: white;
}

.sticky-banner.red {
  background: #f44336;
  color: white;
}

.sticky-banner.none {
  background: #198754;
  color: white;
}

  /* ✅ PAGASA Rainfall Warning Color Codes */
.rain-alert {
  padding: 15px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 10px;
  margin-top: 10px;
  text-align: center;
}

.rain-alert.yellow {
  background-color: #ffeb3b;
  color: black;
}

.rain-alert.orange {
  background-color: #ff9800;
  color: white;
}

.rain-alert.red {
  background-color: #f44336;
  color: white;
}

.rain-alert.none {
  background-color: #e0e0e0;
  color: black;
}


/* 🧾 GLOBAL TEXT SAFETY (PREVENT WORD BREAK ISSUES) */
h1, h2, h3 {
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* 🔰 SECTION TITLE VISIBILITY FIX (OPCEN & EARTHQUAKE) */
.section-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  background: var(--card-title-bg);
  color: #ffffff !important;
  font-size: clamp(19px, 2.2vw, 22px);
  font-weight: 800;
  line-height: 1.25;
  padding: 12px 18px;
  border-radius: 14px;
  box-shadow: var(--card-title-shadow);
  margin-bottom: 16px;
  letter-spacing: 0.01em;
}
/* ===== HEADER LAYOUT (LOGOS BESIDE TITLE – DESKTOP & MOBILE) ===== */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 22px;
  background:
    radial-gradient(circle at top center, rgba(255,255,255,0.16), transparent 30%),
    linear-gradient(135deg, rgba(4, 24, 45, 0.94) 0%, rgba(6, 55, 107, 0.96) 48%, rgba(11, 79, 154, 0.92) 100%);
  color: white;
  padding: 24px 28px;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 20px 44px rgba(1, 12, 28, 0.34);

  width: 100%;                 /* ✅ ADD */
  box-sizing: border-box;      /* ✅ ADD */
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5000;
}

/* LOGO CONTAINERS */
.header-logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Final About page visual override: high contrast civic profile design */
#aboutPage.about-page {
  color: #102a43 !important;
  padding-bottom: 130px !important;
}

#aboutPage .about-hero-panel {
  grid-template-columns: minmax(310px, 380px) minmax(0, 1fr) !important;
  max-width: 1180px !important;
  background: linear-gradient(135deg, #f8fbff 0%, #ffffff 48%, #eef9f6 100%) !important;
  border: 1px solid rgba(14, 116, 144, 0.18) !important;
  border-radius: 24px !important;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.16) !important;
}

#aboutPage .about-logo-panel {
  background:
    linear-gradient(180deg, rgba(6, 50, 76, 0.94), rgba(8, 87, 80, 0.96)),
    url("images/site_background.jpg") center / cover no-repeat !important;
  color: #ffffff !important;
}

#aboutPage .about-logo-panel img {
  width: 224px !important;
  max-height: 250px !important;
  padding: 18px !important;
  background: #ffffff !important;
  border-radius: 24px !important;
  border: 1px solid rgba(255,255,255,0.88) !important;
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.3) !important;
}

#aboutPage .about-logo-panel h2 {
  color: #ffffff !important;
  font-size: 31px !important;
  font-weight: 950 !important;
  text-shadow: 0 3px 12px rgba(0,0,0,0.45) !important;
}

#aboutPage .about-logo-panel p {
  max-width: 280px !important;
  color: #e7fff7 !important;
  font-size: 15.5px !important;
  font-weight: 850 !important;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
}

#aboutPage .about-logo-btn {
  background: linear-gradient(135deg, #f59e0b, #b45309) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,0.35) !important;
  box-shadow: 0 14px 30px rgba(0,0,0,0.26) !important;
}

#aboutPage .about-menu-panel {
  gap: 18px !important;
  padding: 40px !important;
  align-content: center !important;
  background:
    radial-gradient(circle at 82% 16%, rgba(14, 165, 233, 0.12), transparent 30%),
    radial-gradient(circle at 12% 78%, rgba(20, 184, 166, 0.11), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f5f9fc 100%) !important;
}

#aboutPage .about-menu-panel > button.about-menu-card {
  --about-card-accent: #0ea5e9;
  min-height: 152px !important;
  padding: 22px 20px !important;
  color: #12324a !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
  border: 1px solid rgba(15, 65, 95, 0.14) !important;
  border-top: 6px solid var(--about-card-accent) !important;
  border-radius: 18px !important;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.10) !important;
}

#aboutPage .about-menu-panel > button.about-menu-card:nth-child(1) { --about-card-accent: #0ea5e9; }
#aboutPage .about-menu-panel > button.about-menu-card:nth-child(2) { --about-card-accent: #14b8a6; }
#aboutPage .about-menu-panel > button.about-menu-card:nth-child(3) { --about-card-accent: #7c3aed; }
#aboutPage .about-menu-panel > button.about-menu-card:nth-child(4) { --about-card-accent: #f59e0b; }
#aboutPage .about-menu-panel > button.about-menu-card:nth-child(5) { --about-card-accent: #22c55e; }

#aboutPage .about-menu-panel > button.about-menu-card:hover,
#aboutPage .about-menu-panel > button.about-menu-card.active {
  transform: translateY(-5px) !important;
  background: linear-gradient(180deg, #ffffff 0%, #eef8ff 100%) !important;
  border-color: rgba(14, 165, 233, 0.34) !important;
  border-top-color: var(--about-card-accent) !important;
  box-shadow: 0 24px 46px rgba(15, 23, 42, 0.18) !important;
}

#aboutPage .about-menu-panel > button.about-menu-card .about-menu-icon {
  width: 52px !important;
  height: 52px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #0f172a !important;
  background: #eef7ff !important;
  border: 1px solid rgba(14, 165, 233, 0.2) !important;
  border-radius: 16px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8) !important;
}

#aboutPage .about-menu-panel > button.about-menu-card strong {
  color: #082f49 !important;
  font-size: 20px !important;
  font-weight: 950 !important;
  line-height: 1.15 !important;
}

#aboutPage .about-menu-panel > button.about-menu-card small {
  color: #3b5268 !important;
  font-size: 13.5px !important;
  font-weight: 750 !important;
  line-height: 1.45 !important;
}

/* Final mobile layout guard: keep the restored desktop portal shell from leaking into phones. */
@media (max-width: 980px) {
  html,
  body {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  body {
    padding-top: 0 !important;
    padding-left: 0 !important;
  }

  .site-header {
    width: 100% !important;
    min-width: 0 !important;
    padding: 18px 14px 16px !important;
    overflow: hidden !important;
  }

  .site-header .header-title {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
  }

  .site-header .header-title h1 {
    width: 100% !important;
    max-width: 100% !important;
    font-size: clamp(22px, 8vw, 32px) !important;
    line-height: 1.08 !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    text-wrap: balance;
  }

  .site-header .header-title .subtitle {
    font-size: clamp(12px, 3.8vw, 15px) !important;
  }

  .site-header .header-title .location {
    width: 100% !important;
    gap: 8px !important;
  }

  .site-header .header-badge {
    min-width: 0 !important;
    max-width: 100% !important;
    white-space: normal !important;
    text-align: center !important;
  }

  .layer-top-nav.header-nav {
    width: 100% !important;
    max-width: 100% !important;
  }

  .privacy-notice-banner {
    left: 12px !important;
    right: 12px !important;
    bottom: 12px !important;
    max-width: none !important;
    width: auto !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding: 14px !important;
  }

  .privacy-notice-banner p {
    width: 100% !important;
    min-width: 0 !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
  }

  .privacy-notice-actions {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .privacy-notice-actions button {
    width: 100% !important;
    min-width: 0 !important;
    white-space: normal !important;
  }

  .hotline-action-bar {
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    white-space: normal !important;
    overflow: visible !important;
    text-align: left !important;
  }

  .hotline-action-copy {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    animation: none !important;
    transform: none !important;
    padding: 0 !important;
    margin: 0 !important;
    white-space: normal !important;
  }

  .hotline-action-title {
    font-size: 13px !important;
  }

  .hotline-action-note {
    display: block !important;
    margin: 4px 0 0 !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
  }
}
@media (max-width: 480px) {
  .site-header .header-title h1 {
    font-size: clamp(21px, 7vw, 27px) !important;
  }

  .site-header .header-logo-frame {
    width: 68px !important;
    height: 68px !important;
  }

  .site-header .header-logo img {
    height: 52px !important;
    max-width: 52px !important;
  }

  .privacy-notice-actions {
    grid-template-columns: 1fr !important;
  }
}

.header-logo-duo {
  gap: 12px;
}

.header-logo-frame {
  width: 168px;
  height: 168px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.24), rgba(255,255,255,0.08));
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 24px;
  box-shadow: 0 12px 24px rgba(0,0,0,0.18);
  backdrop-filter: blur(4px);
}

.header-logo img {
  height: 124px;
  max-height: 124px;
  max-width: 124px;
  width: auto;
  background: rgba(255,255,255,0.96);
  padding: 12px;
  border-radius: 18px;
  border: 2px solid rgba(255,255,255,0.88);
  object-fit: contain;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
}

.header-logo-duo .header-logo-frame {
  width: 128px;
  height: 128px;
}

.header-logo-duo img {
  height: 92px;
  max-height: 92px;
  max-width: 92px;
}

/* CENTER TITLE */
.header-title {
  flex: 1;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.header-nav{
  width: 100%;
  margin-top: 6px;
  padding: 12px 0 0;
  background: transparent;
  border-top: 1px solid rgba(255,255,255,0.14);
  border-bottom: none;
  box-shadow: none;
  justify-content: center;
  flex-wrap: wrap;
  row-gap: 10px;
}

.header-nav .nav-links{
  width: 100%;
  justify-content: center;
}

.header-nav .incident-ticker{
  width: 100%;
  margin-top: 2px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,243,205,0.96);
  box-shadow: 0 8px 16px rgba(0,0,0,0.12);
  overflow: hidden;
}

.incident-banner-content{
  display:block;
  padding:10px 0;
  white-space:nowrap;
}

.incident-ticker-text{
  display:inline-block;
  font-weight:800;
  color:#664d03 !important;
  font-size:15px !important;
  line-height:1.35;
  white-space:nowrap;
  padding: 8px 12px;
  text-align:left;
  white-space:nowrap;
  padding-left:100%;
  animation:tickerMove 22s linear infinite;
}

.header-title .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #dcecff;
}

.header-title h1 {
  margin: 0;
  font-size: 40px;
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.header-title .subtitle {
  margin: 10px 0 0;
  font-size: 17px;
  font-weight: 700;
  color: rgba(255,255,255,0.92);
}

.header-title .location {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.16);
  color: #f4f8ff;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.header-badge.live-clock {
  background: rgba(255,255,255,0.18);
  min-width: 250px;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}

.utility-menu{
  position: relative;
  display: inline-flex;
}

.mobile-nav-toggle{
  display:none;
  align-items:center;
  justify-content:center;
  gap:8px;
  width:100%;
  min-height:44px;
  padding:10px 14px;
  border:none;
  border-radius:14px;
  background:linear-gradient(135deg, #0f172a, #334155);
  color:#fff;
  font-size:13px;
  font-weight:800;
  letter-spacing:0.02em;
  cursor:pointer;
  box-shadow:0 8px 20px rgba(0,0,0,0.18);
}

.mobile-nav-toggle.active{
  background:linear-gradient(135deg, #1d4ed8, #1e3a8a);
}

.utility-panel{
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 288px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 14px;
  border-radius: 20px;
  max-height: min(70vh, 560px);
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: transform 0.24s ease, opacity 0.24s ease;
  z-index: 4500;
}

.utility-menu.open .utility-panel{
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#heroSlider .slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  position: absolute;
  inset: 0;
}

.utility-panel[hidden]{
  display: none !important;
}

.control-card{
  display:flex;
  flex-direction:column;
  gap:8px;
  border-radius:14px;
  padding:14px;
}

.control-card-label{
  font-size:12px;
  letter-spacing:0.06em;
  text-transform:uppercase;
}

.control-card button{
  width:100%;
}

.utility-panel .control-card:nth-child(1) { order: 4; }
.utility-panel .control-card:nth-child(2) { order: 5; }
.utility-panel .control-card:nth-child(3) { order: 1; }
.utility-panel .control-card:nth-child(4) { order: 2; }
.utility-panel .control-card:nth-child(5) { order: 3; }

.control-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:46px;
  padding:10px 12px;
  font-weight:800;
  border-radius:10px;
  border:none;
  cursor:pointer;
  transition:transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  font-size:15px;
}

.control-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 18px rgba(0,0,0,0.16);
}

.control-btn:disabled{
  cursor:not-allowed;
  opacity:0.88;
  transform:none;
  box-shadow:none;
}

.control-btn.sound{
  background:linear-gradient(135deg, #0d6efd, #083b7a);
  color:#fff;
}

.control-btn.install{
  background:linear-gradient(135deg, #2e7d32, #1f6b28);
  color:#fff;
}

.control-btn.notify{
  background:linear-gradient(135deg, #7c3aed, #5b21b6);
  color:#fff;
}

.control-btn.access{
  background:linear-gradient(135deg, #0d6efd, #2563eb);
  color:#fff;
}

.control-btn.logout{
  background:linear-gradient(135deg, #6c757d, #4b5563);
  color:#fff;
}

.control-status{
  font-size:13px;
  line-height:1.45;
  color:#d7e6f7;
}

.role-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:10px 12px;
  border-radius:10px;
  font-size:15px;
  font-weight:800;
  white-space:nowrap;
  text-align:center;
}

@media (max-width: 768px) {

  .top-status-board{
    grid-template-columns:1fr;
    padding:12px;
  }

  .top-status-card{
    padding:12px;
  }

  .top-status-value,
  #globalAlertBar,
  .sticky-banner{
    font-size:16px;
  }

  .site-header {
    position: static;
    gap: 14px;
    padding: 16px 14px;
  }

  .header-logo-frame {
    width: 112px;
    height: 112px;
    border-radius: 18px;
  }

  .header-logo-duo {
    gap: 10px;
  }

  .header-logo-duo .header-logo-frame {
    width: 84px;
    height: 84px;
  }

  .header-logo img {
    height: 76px;
    max-width: 76px;
    padding: 7px;
    border-radius: 14px;
  }

  .header-title h1 {
    font-size: 22px;
  }

  .header-title .subtitle {
    font-size: 13px;
    margin-top: 8px;
  }

  .header-title .eyebrow {
    margin-bottom: 8px;
    font-size: 10px;
    padding: 6px 10px;
  }

  .header-title .location {
    gap: 8px;
    margin-top: 10px;
  }

  .header-badge {
    font-size: 11px;
    padding: 7px 10px;
  }

  .header-nav{
    margin-top: 2px;
    padding-top: 10px;
  }

  .incident-banner-content{
    flex-direction:column;
    align-items:flex-start;
  }

  .top-control-bar{
    position: static;
    width: auto;
    margin: 12px auto;
    padding: 0 12px;
    transform: none;
  }

  .utility-menu{
    width: 100%;
    display: flex;
    flex-direction: column;
  }

  .utility-panel{
    position: static;
    width: 100%;
    max-height: none;
    transform: none !important;
    margin-top: 10px;
    display: none;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .utility-menu.open .utility-panel{
    display:grid;
  }

  .hotline-action-bar{
    padding:10px 12px;
  }

  /* MOBILE LAYER FIX */
  .layer-header{
    font-size:16px;
    padding:10px;
    margin:25px 0 10px 0;
  }

  .layer-desc{
    font-size:13px;
    margin-bottom:10px;
  }

}

@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  .site-header {
    position: static;
    padding: 14px 10px 18px;
    gap: 10px;
  }

  .header-logo {
    flex: 0 0 auto;
  }

  .header-logo-frame {
    width: 84px;
    height: 84px;
    border-radius: 16px;
  }

  .header-logo-duo .header-logo-frame {
    width: 72px;
    height: 72px;
  }

  .header-logo img {
    height: 58px;
    max-width: 58px;
    padding: 6px;
  }

  .header-title {
    order: 2;
    width: 100%;
    flex: 1 1 100%;
  }

  .header-title h1 {
    font-size: clamp(18px, 6vw, 26px);
    line-height: 1.15;
  }

  .header-title .subtitle {
    font-size: 12px;
  }

  .header-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    order: 3;
    padding-top: 12px;
  }

  .mobile-nav-toggle {
    display: inline-flex;
  }

  .header-nav .nav-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
  }

  .header-nav.mobile-nav-collapsed .nav-links {
    display: flex;
    flex-direction: column;
  }

  .header-nav.mobile-nav-collapsed .nav-links > * {
    display: none !important;
  }

  .header-nav.mobile-nav-collapsed .nav-links > [data-page].active {
    display: flex !important;
  }

  .header-nav .nav-links > button,
  .header-nav .nav-links > .utility-menu {
    width: 100%;
  }

  .nav-links .layer-btn.home-btn,
  .nav-links .layer-tile {
    width: 100%;
    min-height: 46px;
    padding: 12px 10px;
    justify-content: center;
    text-align: center;
    font-size: 13px;
  }

  .utility-menu {
    grid-column: 1 / -1;
  }

  .header-nav .incident-ticker {
    margin-top: 10px;
    border-radius: 12px;
  }

  .incident-banner-content {
    padding: 8px 0;
  }

  .incident-ticker-text {
    font-size: 13px;
    line-height: 1.35;
  }

  .hero-container {
    margin: 16px auto 22px;
    padding: 0 12px;
  }

  #heroSlider {
    height: 260px;
  }

  /* 📱 Mobile Gallery Display Fixes */
  #heroSlider .slide {
    background-size: cover !important;
    background-position: center !important;
  }

  /* 📱 Mobile img elements for gallery */
  #heroSlider .slide img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
  }

  #heroSlider .home-slide-tag {
    font-size: 12px !important;
    padding: 6px 10px !important;
    margin: 10px !important;
  }

  #heroSlider .home-slide-tag strong {
    font-size: 13px !important;
  }

  #heroSlider .home-slide-tag small {
    font-size: 11px !important;
  }

  #heroSlider > div[style*="translate(-50%,-50%)"] {
    width: calc(100% - 40px);
  }

  #heroSlider > div[style*="translate(-50%,-50%)"] h1 {
    font-size: clamp(22px, 7vw, 30px) !important;
    line-height: 1.1;
    margin-bottom: 8px;
  }

  #heroSlider > div[style*="translate(-50%,-50%)"] p {
    font-size: 14px;
    margin: 0;
  }

  .slider-btn {
    padding: 8px 10px;
    font-size: 16px;
  }

  .card {
    padding: 18px;
    border-radius: 18px;
  }

  .section-title {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 16px 18px;
    font-size: 20px;
    letter-spacing: 0.02em;
  }

  .home-landing {
    margin: 18px auto 8px;
    padding: 0 12px;
  }

  .home-landing-card {
    padding: 18px;
    border-radius: 18px;
  }

  .home-landing-top,
  .home-landing-bottom {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .home-landing-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .home-live-grid,
  .home-support-panels {
    grid-template-columns: 1fr;
  }

  .home-summary-cards,
  #homeSummaryCards > div {
    padding: 12px !important;
    gap: 14px !important;
  }

  .table-container,
  .barangay-rainfall-table-wrap,
  #incident-log,
  #mdrrmo-calendar .calendar-overlay {
    overflow-x: auto;
  }

  .incident-table,
  #incident-log table {
    min-width: 640px;
  }

  #map {
    height: 300px !important;
  }

  .full-width-section iframe {
    width: 100%;
    height: 340px;
  }

  .calendar-overlay .calendar-weekdays,
  #mdrrmo-calendar .calendar-grid {
    min-width: 840px;
  }

  .calendar-day {
    min-height: 110px;
    font-size: 12px;
  }

  footer {
    padding-bottom: 76px;
  }
}

@media (max-width: 480px) {
  .site-policy-links {
    padding-bottom: 86px;
  }

  .policy-consent label,
  .privacy-notice-banner,
  .privacy-notice-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .policy-consent label {
    gap: 8px;
  }

  .privacy-notice-banner {
    bottom: 64px;
    left: 10px;
    right: 10px;
  }

  .privacy-notice-actions button {
    width: 100%;
  }

  .header-nav .nav-links {
    grid-template-columns: 1fr;
  }

  .utility-menu {
    grid-column: auto;
  }

  #heroSlider {
    height: 220px;
  }

  /* 📱 Small Mobile Gallery Display Fixes */
  #heroSlider .slide {
    background-size: cover !important;
    background-position: center !important;
  }

  /* 📱 Small Mobile img elements for gallery */
  #heroSlider .slide img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
  }

  #heroSlider .home-slide-tag {
    font-size: 11px !important;
    padding: 5px 8px !important;
    margin: 8px !important;
  }

  #heroSlider .home-slide-tag strong {
    font-size: 12px !important;
  }

  #heroSlider .home-slide-tag small {
    font-size: 10px !important;
  }

  .slider-btn {
    padding: 6px 8px !important;
    font-size: 14px !important;
  }

  .header-title .location {
    flex-direction: column;
    align-items: center;
  }

  .header-badge {
    width: 100%;
    justify-content: center;
  }

  .home-landing-title {
    font-size: 16vw;
  }

  .slider-dots {
    bottom: 8px;
  }

  .full-width-section iframe {
    height: 280px;
  }
}
/* ===== DASHBOARD GRID (RESPONSIVE FIX) ===== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
  margin-bottom: 40px;

  width: 100%;
  max-width: 100%;        /* 🔥 ADD */
  overflow: hidden;       /* 🔥 ADD */
}
/* ✅ ADD THIS RIGHT BELOW */
.dashboard-grid {
  margin-bottom: 30px;
}
/* 📱 MOBILE FIX: STACK CARDS */
@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}
/* ===== MOBILE ACCORDION FOR DASHBOARD CARDS ===== */
@media (max-width: 768px) {

  .accordion-card {
    padding: 0;
    overflow: hidden;
  }

  .accordion-header {
    padding: 16px;
    font-weight: bold;
    background: #f4f7fb;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .accordion-header span {
    font-size: 16px;
  }

  .accordion-header::after {
    content: "➕";
    font-size: 18px;
  }

  .accordion-card.active .accordion-header::after {
    content: "➖";
  }

  .accordion-content {
    display: none;
    padding: 16px;
    border-top: 1px solid #ddd;
  }

  .accordion-card.active .accordion-content {
    display: block;
  }
}
/* 🚨 INCIDENT SCROLLING TICKER */
.incident-ticker {
  background: #fff3cd;
  color: #664d03;
  overflow: hidden;
  white-space: normal;
  padding: 0;
  font-weight: bold;
}

.ticker-text {
  display: inline-block;
  padding-left: 100%;
  animation: tickerMove 18s linear infinite;
}

.hotline-action-bar{
  position:fixed;
  bottom:0;
  left:0;
  width:100%;
  min-height:38px;
  overflow:hidden;
  white-space:nowrap;
  padding:8px 18px calc(8px + env(safe-area-inset-bottom, 0px));
  display:flex;
  align-items:center;
  justify-content:flex-start;
  background:linear-gradient(135deg, #fff200, #ffb703);
  color:#231307;
  z-index:9999;
  box-shadow:0 -6px 14px rgba(245, 158, 11, 0.24);
  text-align:center;
}

.hotline-action-copy{
  display:inline-flex;
  align-items:center;
  justify-content:flex-start;
  gap:14px;
  width:max-content;
  max-width:none;
  min-width:max-content;
  padding:0;
  margin:0;
  animation:siteNoticeMarquee 30s linear infinite;
  transform:translateX(100vw);
  white-space:nowrap;
  will-change:transform;
}

.hotline-action-title{
  flex:0 0 auto;
  font-size:14px;
  line-height:1.2;
  font-weight:900;
  display:block;
}

.hotline-action-note{
  min-width:0;
  font-size:13px;
  line-height:1.25;
  color:#3a2500;
  display:block;
  margin-left:0;
  font-weight:800;
  overflow-wrap:break-word;
}

@keyframes siteNoticeMarquee {
  from {
    transform: translateX(100vw);
  }
  to {
    transform: translateX(-100%);
  }
}

@media (max-width: 768px) {
  .hotline-action-bar {
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    overflow: visible !important;
    white-space: normal !important;
    text-align: left !important;
  }

  .hotline-action-copy {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    animation: none !important;
    transform: none !important;
    white-space: normal !important;
  }

  .hotline-action-title,
  .hotline-action-note {
    display: block !important;
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    text-align: left !important;
  }

  .hotline-action-title {
    font-size: 14px !important;
    line-height: 1.25 !important;
  }

  .hotline-action-note {
    margin-top: 4px !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
  }
}


@keyframes tickerMove {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}
/* 📞 Emergency Hotline Card – Image Overlay */
.hotline-card {
  position: relative;
  background: linear-gradient(145deg, rgba(255,255,255,0.96), rgba(240,247,255,0.94));
  color: #16324f;
  border-left: 6px solid #0d6efd;
}

/* Ensure text stays above the image */
.hotline-card * {
  position: relative;
  z-index: 1;
}

.public-service-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.96), rgba(244,248,252,0.94));
  color: #16324f;
  border-left: 6px solid #083b7a;
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

.public-service-card h3,
.public-service-card p,
.public-service-card li,
.public-service-card a,
.public-service-card span,
.public-service-card strong {
  color: #16324f !important;
}

.public-service-card ul {
  margin: 0;
  padding-left: 20px;
}

#citizen-charter{
  display:none !important;
}

.public-service-card li {
  margin-bottom: 10px;
  line-height: 1.5;
}

.hotline-card h3 {
  margin-top: 0;
  font-size: 24px;
}

.hotline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.public-tools-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  margin-bottom: 22px;
}

.public-tool-panel {
  background: rgba(8,59,122,0.05);
  border: 1px solid rgba(8,59,122,0.12);
  border-radius: 16px;
  padding: 16px;
}

.public-tool-panel h3 {
  margin: 0 0 10px;
  color: #083b7a !important;
}

.contact-flow-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:16px;
}

.contact-flow-card{
  border-radius:18px;
  padding:18px;
  box-shadow:0 10px 24px rgba(0,0,0,0.12);
}

.contact-flow-card h3{
  margin:0 0 8px 0;
  font-size:20px;
}

.contact-flow-card p,
.contact-flow-card strong,
.contact-flow-card span{
  color: inherit;
}

.contact-flow-card.emergency{
  background:linear-gradient(145deg,#c62828,#8e0000);
}

.contact-flow-card.message{
  background:linear-gradient(145deg,#f9a825,#ef6c00);
}

.contact-flow-card.report{
  background:linear-gradient(145deg,#2e7d32,#1b5e20);
}

.contact-flow-tag{
  display:inline-block;
  margin-bottom:10px;
  font-size:12px;
  font-weight:800;
  letter-spacing:0.08em;
  text-transform:uppercase;
  opacity:0.92;
}

.contact-flow-action{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-top:14px;
  padding:12px 16px;
  border-radius:999px;
  font-weight:800;
  text-decoration:none;
  border:none;
  cursor:pointer;
  background:#fff;
  color:#16324f !important;
  box-shadow:0 8px 18px rgba(0,0,0,0.18);
}

.public-service-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.public-service-actions button,
.public-service-actions select,
.public-service-actions a {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}

.public-service-actions button,
.public-service-actions a {
  background: linear-gradient(135deg, #0d6efd, #083b7a);
  color: #fff !important;
  text-align: center;
}

.public-service-actions select {
  border: 1px solid rgba(8,59,122,0.16);
  background: rgba(255,255,255,0.96);
  color: #16324f;
}

.public-service-output {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(8,59,122,0.12);
  color: #18344f;
}

.public-service-output strong {
  display: block;
  margin-bottom: 6px;
}

.hotline-item {
  background: rgba(8, 59, 122, 0.08);
  border: 1px solid rgba(8, 59, 122, 0.14);
  border-radius: 12px;
  padding: 14px;
}

.hotline-item-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.hotline-item-actions button,
.hotline-item-actions a {
  flex: 1;
  border: none;
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.hotline-item-actions button {
  background: rgba(8,59,122,0.10);
  color: #083b7a;
}

.hotline-item-actions a {
  background: linear-gradient(135deg, #198754, #146c43);
  color: #fff !important;
}

.hotline-item .label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #355070 !important;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.hotline-item a {
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
}

.hotline-note,
.service-note {
  margin-top: 14px;
  font-size: 13px;
  color: #496581 !important;
}

.go-bag-list {
  list-style: none;
  padding-left: 0 !important;
  margin-top: 14px !important;
  display: grid;
  gap: 10px;
}

.go-bag-list li {
  margin: 0;
}

.go-bag-list label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(8,59,122,0.06);
  border: 1px solid rgba(8,59,122,0.10);
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 700;
}

.go-bag-progress {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(25,135,84,0.10);
  border: 1px solid rgba(25,135,84,0.16);
  color: #146c43 !important;
  font-weight: 800;
}

@media (max-width: 768px) {
  .public-tools-grid,
  .public-service-actions {
    grid-template-columns: 1fr;
  }

  .hotline-item-actions {
    flex-direction: column;
  }
}

.evacuation-card {
  border-left-color: #198754;
}

.evacuation-list {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  list-style: none;
  padding-left: 0 !important;
  margin-top: 14px !important;
}

.evacuation-list li {
  background: rgba(25, 135, 84, 0.08);
  border: 1px solid rgba(25, 135, 84, 0.14);
  border-radius: 12px;
  padding: 14px;
  font-weight: 700;
}

.evacuation-center-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.evacuation-center-card {
  min-height: 190px;
  padding: 18px;
  border-radius: 8px;
  border: 1px solid rgba(20, 184, 166, 0.24);
  background: linear-gradient(135deg, rgba(240, 253, 250, 0.96), rgba(255, 255, 255, 0.98));
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.evacuation-center-card h4 {
  margin: 0 0 8px;
  color: #0f3f46;
  font-size: 18px;
  font-weight: 950;
}

.evacuation-center-card p {
  margin: 0 0 14px;
  color: #315164 !important;
  line-height: 1.45;
  font-weight: 700;
}

.evacuation-center-card dl {
  display: grid;
  gap: 9px;
  margin: 0;
}

.evacuation-center-card dl div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 10px;
}

.evacuation-center-card dt {
  color: #0f766e;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.evacuation-center-card dd {
  margin: 0;
  color: #16324f;
  font-weight: 800;
  line-height: 1.35;
}

.evacuation-status-pill {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #064e3b !important;
  background: rgba(20, 184, 166, 0.14);
  border: 1px solid rgba(20, 184, 166, 0.28);
  font-size: 12px;
  font-weight: 950;
}

.evacuation-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 8px 0 18px;
}

.evacuation-page-btn {
  min-width: 108px;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  color: #ffffff;
  background: #0f766e;
  font-weight: 900;
  cursor: pointer;
}

.evacuation-page-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.evacuation-page-status {
  color: #16324f;
  font-size: 13px;
  font-weight: 900;
}

.evacuation-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid rgba(8, 59, 122, 0.14);
  background: #ffffff;
}

.evacuation-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.evacuation-table th,
.evacuation-table td {
  padding: 12px 11px;
  border-bottom: 1px solid rgba(8, 59, 122, 0.1);
  text-align: left;
  vertical-align: top;
  line-height: 1.35;
}

.evacuation-table th {
  color: #083b7a !important;
  background: rgba(8, 59, 122, 0.07);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.evacuation-table td {
  color: #16324f !important;
  font-weight: 700;
}

@media (max-width: 768px) {
  .evacuation-center-grid {
    grid-template-columns: 1fr;
  }

  .evacuation-center-card dl div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

.drrm-downloads-card {
  border-left-color: #fd7e14;
}

.download-list {
  list-style: none;
  padding-left: 0 !important;
  margin-top: 14px !important;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.download-list li {
  margin-bottom: 0;
}

.download-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  background: rgba(253, 126, 20, 0.08);
  border: 1px solid rgba(253, 126, 20, 0.18);
  border-radius: 12px;
  padding: 14px 16px;
  min-height: 100%;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(15,23,42,0.06);
}

.download-link span {
  color: #fd7e14 !important;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.download-link p{
  margin: 0;
  color: #16324f !important;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
}

.iec-source-meta{
  display:inline-flex;
  align-items:center;
  width:100%;
  min-height:30px;
  border-radius:8px;
  padding:6px 10px;
  background:rgba(14,116,144,0.10);
  border:1px solid rgba(14,116,144,0.18);
  color:#0f4f5f !important;
  font-size:12px;
  font-weight:900;
  line-height:1.35;
}

.iec-card-header{
  display:flex;
  align-items:center;
  gap:12px;
  width:100%;
}

.iec-illustration{
  width:52px;
  height:52px;
  border-radius:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:28px;
  background:linear-gradient(135deg, rgba(253,126,20,0.18), rgba(251,191,36,0.30));
  flex-shrink:0;
}

.iec-card-title{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.iec-card-title strong{
  color:#083b7a !important;
}

.iec-card-tips{
  margin: 6px 0 0 0;
  padding-left: 18px;
  color:#16324f !important;
  font-size:13px;
  line-height:1.5;
}

.iec-card-actions{
  width:100%;
  display:grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items:center;
  gap:8px;
  margin-top:auto;
}

.iec-download-btn{
  border:none;
  border-radius:10px;
  padding:10px 14px;
  background:linear-gradient(135deg, #fd7e14, #b45309);
  color:#fff;
  font-weight:800;
  cursor:pointer;
  width:100%;
}

.iec-source-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  border-radius:10px;
  padding:9px 12px;
  background:#eef9ff;
  border:1px solid rgba(14,116,144,0.22);
  color:#075985 !important;
  font-size:12px;
  font-weight:900;
  text-decoration:none;
  white-space:nowrap;
}

.iec-source-link:hover,
.iec-source-link:focus-visible{
  background:#dff3ff;
  color:#0c4a6e !important;
}

@media (max-width: 768px) {
  .download-list {
    grid-template-columns: 1fr;
  }

  .iec-card-actions{
    grid-template-columns:1fr;
  }
}

.citizen-charter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.charter-item {
  background: rgba(8,59,122,0.06);
  border: 1px solid rgba(8,59,122,0.10);
  border-radius: 14px;
  padding: 16px;
}

.charter-item strong,
.charter-item span,
.charter-item p {
  display: block;
  color: #16324f !important;
}

.charter-item strong {
  margin-bottom: 6px;
}

.charter-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(25,135,84,0.12);
  color: #166534 !important;
  font-size: 12px;
  font-weight: 800;
}

.earthquake-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.96), rgba(250,246,238,0.94));
  color: #16324f;
  border-left: 6px solid #f0ad4e !important;
}

.earthquake-card h3,
.earthquake-card p,
.earthquake-card li,
.earthquake-card a {
  color: #16324f !important;
}

.quake-feed {
  margin-top: 14px;
  padding-left: 20px;
}

.quake-feed li {
  margin-bottom: 10px;
}

/* 📺 24 ORAS NEWS CARD – IMAGE BACKGROUND */
.news-24oras-card {
  position: relative;
  background: linear-gradient(145deg, rgba(239,246,255,0.97), rgba(219,234,254,0.95));
  color: #16324f;
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

/* Ensure text is readable */
.news-24oras-card h3,
.news-24oras-card p,
.news-24oras-card a {
  color: #16324f !important;
}

/* 📺 TV PATROL – IMAGE BACKGROUND CARD */
.tv-patrol-card {
  position: relative;
  background: linear-gradient(145deg, rgba(255,241,242,0.97), rgba(255,228,230,0.95));
  color: #16324f;
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

/* Ensure text is readable */
.tv-patrol-card h3,
.tv-patrol-card p,
.tv-patrol-card a {
  color: #16324f !important;
}

/* 🧑‍🤝‍🧑 CITIZEN INCIDENT REPORTING CARD BACKGROUND */
.incident-card {
  position: relative;

  background: rgba(255,255,255,0.92);
  color: #222;
}
/* Ensure text stays readable */
.incident-card h2,
.incident-card p,
.incident-card a {
  color: #083b7a !important;
}

/* Button contrast fix */
.incident-card a {
  display: inline-block;
  margin-top: 10px;
  background: #083b7a;
  color: #ffffff !important;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
}
/* OPCEN empty log text visibility fix */
#incidentTableMain td {
  color: #ffffff;
  font-weight: bold;
}
.map-controls-container {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  align-items: center;
  flex-wrap: wrap;
}

.map-controls-container input {
  flex: 1 1 260px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #b6c2d1;
  background: rgba(255,255,255,0.96);
  color: #083b7a;
  font-weight: 600;
}

.map-controls-container button {
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}

.ops-panel-title {
  color: #083b7a;
  margin: 0 0 12px;
}

.ops-helper-text {
  color: #355070;
  font-size: 13px;
  margin: 8px 0 0;
}

.incident-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 12px;
}

.incident-table td {
  padding: 4px 12px;
  font-size: 14px;
}

.incident-table th {
  padding: 12px 10px;
}

.incident-link {
  color: #9ad1ff;
  font-weight: 700;
  text-decoration: underline;
}

.incident-action-btn {
  border: none;
  border-radius: 6px;
  padding: 6px 8px;
  margin-right: 6px;
  cursor: pointer;
  font-weight: 700;
}

.incident-action-btn.edit {
  background: #ffc107;
  color: #222;
}

.incident-action-btn.delete {
  background: #dc3545;
  color: #fff;
}

.incident-action-btn.save {
  background: #198754;
  color: #fff;
}

.incident-action-btn.save.pending {
  background: #0d6efd;
}

.incident-action-btn:disabled {
  cursor: wait;
  opacity: 0.68;
}

.incident-action-stack {
  display: grid;
  gap: 8px;
  min-width: 180px;
  max-width: 240px;
}

.incident-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.incident-deployment-select {
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(14, 165, 233, 0.35);
  border-radius: 6px;
  background: #f8fafc;
  color: #0f172a;
  font-weight: 800;
  padding: 7px 9px;
  font-size: 13px;
}

.incident-deployment-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(241, 245, 249, 0.95);
  color: #334155;
  border: 1px solid rgba(148, 163, 184, 0.35);
  font-size: 12px;
  font-weight: 850;
  white-space: normal;
}

.ops-filter-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 18px;
}

.ops-filter-bar select,
.ops-filter-bar button,
.ops-workspace-card input,
.ops-workspace-card select,
.ops-workspace-card textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #bfd0e2;
  background: rgba(255,255,255,0.96);
  color: #16324f;
  font-weight: 600;
}

.ops-filter-bar button {
  border: none;
  background: linear-gradient(135deg, #64748b, #475569);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.ops-workspace-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
  margin-top: 26px;
}

.ops-workspace-card {
  grid-column: span 4;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(243,247,252,0.96));
  border: 1px solid rgba(8,59,122,0.12);
  border-left: 6px solid #0d6efd;
  border-radius: 20px;
  box-shadow: 0 12px 24px rgba(5,23,45,0.14);
  padding: 20px;
}

.ops-workspace-card.wide {
  grid-column: span 8;
}

.ops-workspace-card.full {
  grid-column: 1 / -1;
}

.ops-workspace-card h3 {
  margin: 0 0 12px;
  color: #083b7a;
}

.ops-workspace-card p,
.ops-workspace-card li,
.ops-workspace-card span,
.ops-workspace-card strong,
.ops-workspace-card label {
  color: #18344f;
}

.ops-workspace-card label {
  display: blo4k;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 6px;
}

.ops-hidden-note {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255,193,7,0.16);
  color: #7a5200;
  font-weight: 700;
  border: 1px solid rgba(255,193,7,0.22);
}

.incident-log-shell {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(243,247,252,0.96));
  border: 1px solid rgba(8,59,122,0.12);
  border-left: 6px solid #0d6efd;
  border-radius: 20px;
  box-shadow: 0 12px 24px rgba(5,23,45,0.14);
  padding: 20px;
}

.incident-log-shell h2,
.incident-log-shell p,
.incident-log-shell label,
.incident-log-shell strong,
.incident-log-shell span {
  color: #16324f;
}

.ops-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ops-form-grid .full-row {
  grid-column: 1 / -1;
}

.ops-resource-grid .full-row,
.ops-counter-grid .full-row {
  grid-column: 1 / -1;
}

.ops-workspace-card textarea {
  min-height: 96px;
  resize: vertical;
}

.ops-primary-btn,
.ops-secondary-btn {
  border: none;
  border-radius: 12px;
  padding: 11px 14px;
  font-weight: 800;
  cursor: pointer;
}

.ops-primary-btn {
  background: linear-gradient(135deg, #0d6efd, #083b7a);
  color: #fff;
}

.ops-secondary-btn {
  background: linear-gradient(135deg, #64748b, #475569);
  color: #fff;
}

.ops-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.ops-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(13,110,253,0.08);
  border: 1px solid rgba(13,110,253,0.14);
  color: #0b5fc4;
  font-size: 13px;
  font-weight: 800;
}

.ops-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.ops-list-item {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(8,59,122,0.05);
  border: 1px solid rgba(8,59,122,0.10);
}

.ops-list-item strong {
  display: block;
  margin-bottom: 4px;
}

.ops-list-item small {
  display: block;
  color: #556d86;
  line-height: 1.45;
}

.ops-item-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.ops-priority-high {
  border-left: 5px solid #dc3545;
}

.ops-priority-medium {
  border-left: 5px solid #fd7e14;
}

.ops-priority-low {
  border-left: 5px solid #198754;
}

.ops-resource-grid,
.ops-counter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ops-kpi {
  padding: 14px;
  border-radius: 16px;
  background: rgba(8,59,122,0.06);
  border: 1px solid rgba(8,59,122,0.10);
}

.ops-kpi-label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #56708a;
}

.disaster-report-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.disaster-report-card {
  grid-column: span 4;
}

.disaster-report-card.wide {
  grid-column: span 8;
}

.ops-kpi-value {
  display: block;
  margin-top: 8px;
  font-size: 26px;
  font-weight: 900;
  color: #083b7a;
}

.ops-trigger-list {
  margin: 12px 0 0;
  padding-left: 18px;
}

.ops-trigger-list li + li {
  margin-top: 8px;
}

.ops-sitrep-output {
  white-space: pre-wrap;
  background: rgba(8,59,122,0.06);
  border: 1px solid rgba(8,59,122,0.10);
  border-radius: 16px;
  padding: 16px;
  margin-top: 12px;
  color: #16324f;
  line-height: 1.55;
}

@media (max-width: 1024px) {
  .ops-workspace-card,
  .ops-workspace-card.wide {
    grid-column: span 6;
  }
}

@media (max-width: 768px) {
  .ops-filter-bar,
  .ops-form-grid,
  .ops-resource-grid,
  .ops-counter-grid,
  .disaster-report-grid {
    grid-template-columns: 1fr;
  }

  .ops-workspace-grid {
    grid-template-columns: 1fr;
  }

  .ops-workspace-card,
  .ops-workspace-card.wide,
  .ops-workspace-card.full,
  .disaster-report-card,
  .disaster-report-card.wide {
    grid-column: auto;
  }
}

.status-badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.status-badge.ongoing {
  background: rgba(255, 193, 7, 0.2);
  color: #ffd54f;
}

.status-badge.responding {
  background: rgba(13, 110, 253, 0.2);
  color: #8ec5ff;
}

.status-badge.resolved {
  background: rgba(25, 135, 84, 0.2);
  color: #81e6a3;
}

.weather-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.15px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.weather-badge.sky-clear {
  background: rgba(255, 193, 7, 0.22);
  color: #7a4b00;
  border-color: rgba(255, 193, 7, 0.42);
}

.weather-badge.sky-partly {
  background: rgba(13, 110, 253, 0.16);
  color: #0b56b8;
  border-color: rgba(13, 110, 253, 0.28);
}

.weather-badge.sky-cloudy {
  background: rgba(108, 117, 125, 0.18);
  color: #4b5563;
  border-color: rgba(108, 117, 125, 0.28);
}

.weather-badge.sky-rain {
  background: rgba(23, 162, 184, 0.18);
  color: #0f6b7b;
  border-color: rgba(23, 162, 184, 0.3);
}

.weather-badge.sky-storm {
  background: rgba(111, 66, 193, 0.2);
  color: #53318d;
  border-color: rgba(111, 66, 193, 0.32);
}

.weather-badge.rain-none {
  background: rgba(25, 135, 84, 0.16);
  color: #146c43;
  border-color: rgba(25, 135, 84, 0.3);
}

.weather-badge.rain-light {
  background: rgba(255, 193, 7, 0.2);
  color: #8a6500;
  border-color: rgba(255, 193, 7, 0.36);
}

.weather-badge.rain-moderate {
  background: rgba(13, 110, 253, 0.18);
  color: #0b56b8;
  border-color: rgba(13, 110, 253, 0.32);
}

.weather-badge.rain-heavy {
  background: rgba(253, 126, 20, 0.2);
  color: #9a4e00;
  border-color: rgba(253, 126, 20, 0.34);
}

.weather-badge.rain-intense {
  background: rgba(220, 53, 69, 0.18);
  color: #a61e2d;
  border-color: rgba(220, 53, 69, 0.34);
}

.pagasa-feed-card{
  grid-column: 1 / -1;
}

.pagasa-feed-shell{
  display:grid;
  grid-template-columns:minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap:18px;
  align-items:start;
}

.pagasa-feed-main,
.pagasa-feed-side{
  background:linear-gradient(180deg, rgba(255,255,255,0.90), rgba(244,248,252,0.84));
  border:1px solid rgba(8,59,122,0.10);
  border-radius:18px;
  padding:18px;
  box-shadow: var(--card-shadow-soft);
}

.pagasa-feed-type{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  letter-spacing:0.04em;
  margin-bottom:12px;
}

.pagasa-feed-type.general{
  background:rgba(13,110,253,0.16);
  color:#0b56b8;
}

.pagasa-feed-type.thunderstorm{
  background:rgba(253,126,20,0.18);
  color:#9a4e00;
}

.pagasa-feed-type.rainfall{
  background:rgba(23,162,184,0.18);
  color:#0f6b7b;
}

.pagasa-feed-type.cyclone{
  background:rgba(220,53,69,0.16);
  color:#a61e2d;
}

.pagasa-feed-type.marine{
  background:rgba(108,117,125,0.18);
  color:#495057;
}

.pagasa-feed-headline{
  margin:0 0 10px;
  color:#083b7a;
  font-size:24px;
  line-height:1.2;
}

.pagasa-feed-summary{
  margin:0 0 14px;
  color:#274060;
  line-height:1.6;
}

.pagasa-feed-meta{
  display:grid;
  gap:8px;
  margin-bottom:14px;
}

.pagasa-feed-meta div{
  font-size:13px;
  color:#35516f;
}

.pagasa-feed-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  border-radius:12px;
  background:linear-gradient(135deg, #0d6efd, #083b7a);
  color:#ffffff !important;
  text-decoration:none;
  font-weight:800;
}

.pagasa-feed-side h4{
  margin:0 0 12px;
  color:#083b7a;
  font-size:15px;
  text-transform:uppercase;
  letter-spacing:0.04em;
}

.pagasa-feed-list{
  display:grid;
  gap:10px;
  margin:0;
  padding:0;
  list-style:none;
}

.pagasa-feed-list li{
  padding:12px 14px;
  border-radius:12px;
  background:rgba(8,59,122,0.06);
  border:1px solid rgba(8,59,122,0.08);
  color:#274060;
  line-height:1.45;
}

.pagasa-feed-list strong{
  display:block;
  color:#083b7a;
  margin-bottom:4px;
}

.pagasa-feed-list-item{
  padding:12px 14px;
  border-radius:12px;
  background:rgba(8,59,122,0.06);
  border:1px solid rgba(8,59,122,0.08);
  color:#274060;
  line-height:1.45;
}

.pagasa-feed-list-item strong{
  display:block;
  color:#083b7a;
  margin-bottom:4px;
}

.pagasa-feed-list-item span{
  color:#49627f;
  font-size:12px;
  font-weight:700;
}

.pagasa-facebook-card{
  background: linear-gradient(180deg, rgba(255,255,255,0.97), rgba(243,248,255,0.97));
}

.civil-defense-facebook-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,248,236,0.96));
}

.civil-defense-watch-shell {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(180, 83, 9, 0.18);
}

.civil-defense-summary {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(180, 83, 9, 0.18);
}

.civil-defense-summary span {
  display: block;
  margin-bottom: 5px;
  color: #92400e !important;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.civil-defense-summary strong {
  display: block;
  color: #0f172a !important;
  font-size: 16px;
  line-height: 1.25;
}

.civil-defense-summary p {
  margin: 5px 0 0;
  color: #374151 !important;
  font-size: 13px;
  line-height: 1.55;
}

.civil-defense-embed-window {
  height: 850px;
  overflow: hidden;
  border-radius: 14px;
  background: #ffffff;
}

.civil-defense-embed-frame {
  min-height: 850px;
  height: 850px !important;
}

.civil-defense-link {
  background: linear-gradient(135deg, #f59e0b, #b45309) !important;
}

.civil-defense-link:hover {
  background: #92400e !important;
}

.facebook-embed-shell{
  background: rgba(8,59,122,0.05);
  border: 1px solid rgba(8,59,122,0.12);
  border-radius: 18px;
  padding: 14px;
}

.facebook-embed-note{
  margin: 0 0 12px;
  color: #294766;
  font-size: 0.95rem;
  line-height: 1.5;
}

.facebook-embed-frame{
  width: 100%;
  min-height: 620px;
  border: 0;
  border-radius: 14px;
  background: #ffffff;
}

.facebook-embed-actions{
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.facebook-embed-actions span{
  color: #4a6078;
  font-size: 0.88rem;
}

.facebook-embed-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: #1877f2;
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(24,119,242,0.22);
}

.facebook-embed-link:hover{
  background: #0f63d1;
  color: #ffffff;
}

.cyclone-watch-card{
  background: linear-gradient(180deg, rgba(255,255,255,0.97), rgba(255,248,243,0.97));
}

.cyclone-watch-shell{
  background: rgba(198,40,40,0.05);
  border: 1px solid rgba(198,40,40,0.12);
  border-radius: 18px;
  padding: 16px;
}

.cyclone-watch-status{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(198,40,40,0.1);
  color: #8f1f1f;
  font-weight: 800;
  margin-bottom: 12px;
}

.cyclone-watch-summary{
  margin: 0 0 12px;
  color: #294766;
  line-height: 1.6;
}

.cyclone-watch-panel{
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(198,40,40,0.12);
  border-radius: 14px;
  padding: 14px;
}

.cyclone-watch-headline{
  margin: 0 0 8px;
  color: #7a1520;
  font-size: 1rem;
  font-weight: 800;
}

.cyclone-watch-text{
  margin: 0;
  color: #334e68;
  line-height: 1.65;
  white-space: pre-wrap;
}

.cyclone-watch-meta{
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cyclone-watch-fetched{
  color: #5d7288;
  font-size: 0.88rem;
}

.cyclone-watch-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: #c62828;
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(198,40,40,0.18);
}

.cyclone-watch-link:hover{
  background: #a61f1f;
  color: #ffffff;
}

.barangay-rainfall-card {
  grid-column: 1 / -1;
}

#layer1Page .barangay-rainfall-card {
  width: min(100% - 48px, 1120px);
  margin: 28px auto 34px;
}

.adjacent-rainfall-card {
  grid-column: 1 / -1;
}

#layer1Page .adjacent-rainfall-card {
  width: min(100% - 48px, 1120px);
  margin: 28px auto 34px;
}

.barangay-rainfall-table-wrap {
  width: 100%;
  overflow-x: hidden;
  overflow-y: hidden;
  border-radius: 12px;
  border: 1px solid rgba(8, 59, 122, 0.14);
  background: rgba(255,255,255,0.96);
}

.adjacent-rainfall-table-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 12px;
  border: 1px solid rgba(8, 59, 122, 0.14);
  background: rgba(255,255,255,0.96);
}

#brgyRainTable,
#adjacentRainTable {
  width: auto;
  min-width: 1000px;
  max-width: none;
  margin: 0 auto;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 18px;
}

#layer1Page #adjacentRainTable {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: 14px;
}

#layer1Page #adjacentRainTable th,
#layer1Page #adjacentRainTable td {
  padding: 10px 9px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

#layer1Page #adjacentRainTable thead th {
  font-size: 13px;
  white-space: normal;
}

#layer1Page #adjacentRainTable th:nth-child(1),
#layer1Page #adjacentRainTable td:nth-child(1) { width: 10%; }
#layer1Page #adjacentRainTable th:nth-child(2),
#layer1Page #adjacentRainTable td:nth-child(2) { width: 8%; }
#layer1Page #adjacentRainTable th:nth-child(3),
#layer1Page #adjacentRainTable td:nth-child(3) { width: 20%; }
#layer1Page #adjacentRainTable th:nth-child(4),
#layer1Page #adjacentRainTable td:nth-child(4) { width: 13%; }
#layer1Page #adjacentRainTable th:nth-child(5),
#layer1Page #adjacentRainTable td:nth-child(5),
#layer1Page #adjacentRainTable th:nth-child(6),
#layer1Page #adjacentRainTable td:nth-child(6) { width: 7%; }
#layer1Page #adjacentRainTable th:nth-child(7),
#layer1Page #adjacentRainTable td:nth-child(7),
#layer1Page #adjacentRainTable th:nth-child(8),
#layer1Page #adjacentRainTable td:nth-child(8) { width: 6%; }
#layer1Page #adjacentRainTable th:nth-child(9),
#layer1Page #adjacentRainTable td:nth-child(9) { width: 17%; }
#layer1Page #adjacentRainTable th:nth-child(10),
#layer1Page #adjacentRainTable td:nth-child(10) { width: 6%; }

#layer1Page #adjacentRainTable .weather-badge {
  max-width: 100%;
  white-space: normal;
  font-size: 13px;
  line-height: 1.2;
  padding: 5px 8px;
}

#layer1Page #brgyRainTable {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: 13px;
}

#layer1Page #brgyRainTable th,
#layer1Page #brgyRainTable td {
  padding: 8px 7px;
  line-height: 1.32;
}

#layer1Page #brgyRainTable .weather-badge {
  max-width: 100%;
  white-space: normal;
  font-size: 12px;
  line-height: 1.2;
  padding: 4px 7px;
}

#layer1Page #brgyRainTable thead th,
#layer1Page #brgyRainTable tbody td {
  min-width: 0 !important;
  white-space: normal;
  overflow-wrap: anywhere;
}

#layer1Page #brgyRainTable th:nth-child(1),
#layer1Page #brgyRainTable td:nth-child(1) { width: 11%; }
#layer1Page #brgyRainTable th:nth-child(2),
#layer1Page #brgyRainTable td:nth-child(2) { width: 21%; }
#layer1Page #brgyRainTable th:nth-child(3),
#layer1Page #brgyRainTable td:nth-child(3) { width: 15%; }
#layer1Page #brgyRainTable th:nth-child(4),
#layer1Page #brgyRainTable td:nth-child(4) { width: 8%; }
#layer1Page #brgyRainTable th:nth-child(5),
#layer1Page #brgyRainTable td:nth-child(5) { width: 10%; }
#layer1Page #brgyRainTable th:nth-child(6),
#layer1Page #brgyRainTable td:nth-child(6) { width: 7%; }
#layer1Page #brgyRainTable th:nth-child(7),
#layer1Page #brgyRainTable td:nth-child(7) { width: 7%; }
#layer1Page #brgyRainTable th:nth-child(8),
#layer1Page #brgyRainTable td:nth-child(8) { width: 14%; }
#layer1Page #brgyRainTable th:nth-child(9),
#layer1Page #brgyRainTable td:nth-child(9) { width: 7%; }

#brgyRainTable th,
#brgyRainTable td,
#adjacentRainTable th,
#adjacentRainTable td {
  padding: 16px 18px;
  vertical-align: middle;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

#brgyRainTable thead th,
#adjacentRainTable thead th {
  background: #0b3552 !important;
  color: #ffffff !important;
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  font-size: 16px;
  line-height: 1.25;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  white-space: nowrap;
}

#brgyRainTable thead th:nth-child(1),
#adjacentRainTable thead th:nth-child(1) {
  min-width: 180px;
  text-align: left;
}

#brgyRainTable thead th:nth-child(2),
#adjacentRainTable thead th:nth-child(3) {
  min-width: 230px;
}

#brgyRainTable thead th:nth-child(3),
#adjacentRainTable thead th:nth-child(4) {
  min-width: 150px;
  white-space: normal;
}

#brgyRainTable thead th:nth-child(4),
#brgyRainTable thead th:nth-child(5),
#adjacentRainTable thead th:nth-child(5),
#adjacentRainTable thead th:nth-child(6),
#brgyRainTable thead th:nth-child(6),
#brgyRainTable thead th:nth-child(7),
#adjacentRainTable thead th:nth-child(7),
#adjacentRainTable thead th:nth-child(8) {
  min-width: 110px;
}

#brgyRainTable thead th:nth-child(8),
#adjacentRainTable thead th:nth-child(9) {
  min-width: 220px;
  white-space: normal;
}

#brgyRainTable thead th:nth-child(9),
#adjacentRainTable thead th:nth-child(10) {
  min-width: 120px;
}

.barangay-rainfall-table-wrap,
.adjacent-rainfall-table-wrap {
  display: block;
}



/* Keep Travel Note and Warning large and wrapped */
#adjacentRainTable th:nth-child(9),
#adjacentRainTable th:nth-child(10),
#adjacentRainTable td:nth-child(9),
#adjacentRainTable td:nth-child(10) {
  white-space: normal;
  min-width: 250px;
  line-height: 1.6;
}

#layer1Page #adjacentRainTable th:nth-child(9),
#layer1Page #adjacentRainTable th:nth-child(10),
#layer1Page #adjacentRainTable td:nth-child(9),
#layer1Page #adjacentRainTable td:nth-child(10) {
  min-width: 0;
  white-space: normal;
  line-height: 1.45;
}

#brgyRainTable tbody tr:nth-child(even) {
  background: rgba(8, 59, 122, 0.03);
}

#adjacentRainTable tbody tr:nth-child(even) {
  background: rgba(8, 59, 122, 0.03);
}

.ops-empty-state {
  text-align: center;
  padding: 22px 16px;
  color: #ffffff;
  font-weight: 700;
}

#adminOnlyForm label,
#adminOnlyForm strong,
#adminOnlyForm h3,
#adminOnlyForm span {
  color: #ffffff !important;
}

#adminOnlyForm input,
#adminOnlyForm select {
  background: rgba(255,255,255,0.96);
  color: #083b7a;
  border: 1px solid #d9e2ec;
}

#adminOnlyForm option {
  color: #083b7a;
}

#incidentPreview {
  border: 2px solid rgba(255,255,255,0.9);
}

@media (max-width: 768px) {
  .map-controls-container {
    flex-direction: column;
    align-items: stretch;
  }

  .map-controls-container button {
    width: 100%;
  }

  .facebook-embed-frame{
    min-height: 540px;
  }
}

/* 🌍 VENTUSKY FORECAST MAP – IMAGE BACKGROUND CARD */
.ventusky-card {
  position: relative;

  background:
    linear-gradient(
      rgba(0, 0, 0, 0.55),
      rgba(0, 0, 0, 0.55)
    ),
    url("images/ventusky_forecast.jpg") center / cover no-repeat;

  color: #ffffff;
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}

/* Force text visibility */
.ventusky-card h3,
.ventusky-card p,
.ventusky-card a {
  color: #222 !important;
}

/* 🏫 EVACUATION CENTERS CARD – IMAGE BACKGROUND */
.evacuation-card {
  position: relative;
  background: linear-gradient(145deg, rgba(255,255,255,0.96), rgba(244,250,246,0.94));
  color: #16324f;
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

/* Ensure text readability */
.evacuation-card h3,
.evacuation-card li,
.evacuation-card p {
  color: #16324f !important;
}

/* 📅 MDRRMO PLAIN IMAGE BACKGROUND (NO OVERLAY) */
.plain-image-card {
  position: relative;
  background-image: url("images/GAWIS-AY.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  box-shadow: 0 8px 22px rgba(0,0,0,0.35);
  border-radius: 12px;
}

.home-planner-card,
.home-activity-card {
  background:
    linear-gradient(145deg, rgba(255,255,255,0.96), rgba(240,247,255,0.92)),
    radial-gradient(circle at top right, rgba(13,110,253,0.10), transparent 42%);
  background-blend-mode: normal;
  background-image: none;
  border: 1px solid rgba(8, 59, 122, 0.12);
  box-shadow: 0 16px 32px rgba(6, 44, 99, 0.18);
}

.home-planner-card .image-overlay,
.home-activity-card .image-overlay {
  background: linear-gradient(135deg, rgba(8,59,122,0.92), rgba(20,78,74,0.84));
  max-width: 100%;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
}

.home-planner-card .calendar-overlay {
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.18), transparent 35%),
    linear-gradient(145deg, rgba(8,59,122,0.88), rgba(11,94,215,0.64));
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 18px 32px rgba(4,27,61,0.28);
}

.home-planner-card .calendar-weekdays {
  background: rgba(255,255,255,0.14);
}

.home-planner-card .hint-text,
.home-activity-card .hint-text {
  color: #e2ecff;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Ensure text readability */
.plain-image-card h2,
.plain-image-card h3,
.plain-image-card p,
.plain-image-card label {
  color: #083b7a;
  font-weight: bold;
}

/* Inputs remain readable */
.plain-image-card input,
.plain-image-card textarea,
.plain-image-card select {
  background: rgba(255,255,255,0.95);
  color: #083b7a;
  border-radius: 6px;
}

/* 🔤 IMAGE TEXT OVERLAY (LIKE EVACUATION & DOWNLOADS SECTIONS) */
.image-overlay {
  background: rgba(0, 0, 0, 0.45); /* semi-transparent */
  padding: 18px 24px;
  border-radius: 10px;
  max-width: 85%;
}

/* Text styles on image */
.image-overlay h2 {
  margin: 0;
  font-size: 26px;
  color: #ffffff;
}

.image-overlay p {
  margin: 6px 0;
  color: #f1f1f1;
  font-size: 14px;
}

.image-overlay .hint-text {
  font-size: 13px;
  color: #e0e0e0;
}

#activityDetails .hint-text {
  color: #dbeafe !important;
  text-shadow: none !important;
  font-weight: 600;
}

/* 📅 CALENDAR OVERLAY CONTAINER */
.calendar-overlay {
  background: rgba(0, 0, 0, 0.45);
  padding: 20px;
  border-radius: 12px;
  margin-top: 15px;
}

/* Ensure calendar grid stays readable */
.calendar-overlay .calendar-day {
  background: rgba(255,255,255,0.95);
}

/* Mobile spacing fix */
@media (max-width: 768px) {
  .calendar-overlay {
    padding: 15px;
  }
}

/* 🔐 LOCK NOTICE VISIBILITY FIX */
.calendar-overlay .hint-text {
  color: #ffffff;
  font-weight: bold;
  background: rgba(0, 0, 0, 0.55);
  padding: 8px 12px;
  border-radius: 6px;
  display: inline-block;
}

/* 📅 WEEKDAY HEADER VISIBILITY FIX */
.calendar-overlay .calendar-weekdays {
  background: rgba(0, 0, 0, 0.55);
  border-radius: 8px;
  padding: 8px 0;
  margin-bottom: 10px;
}

.calendar-overlay .calendar-weekdays div {
  color: #ffffff;
  font-weight: bold;
  font-size: 14px;
}

/* 📌 CONTENT PLATE FOR IMAGE BACKGROUND CARDS */

/* Title emphasis */
.image-content-panel h2 {
  margin-top: 0;
  font-size: 24px;
}

/* Instruction text */
.image-content-panel .hint-text {
  font-size: 13px;
  color: #555;
  margin-top: 6px;
}

/* 📅 MDRRMO MONTHLY PLANNED ACTIVITIES – IMAGE BACKGROUND */
/* 📰 MDRRMO ACTIVITY DOCUMENTATION – IMAGE BACKGROUND */

/* Ensure text readability */
.gawis-bg-card h2,
.gawis-bg-card h3,
.gawis-bg-card p,
.gawis-bg-card label {
  color: #222 !important;
}

/* Inputs & selects stay light (same behavior as other cards) */
.gawis-image-card select,
.gawis-bg-card input,
.gawis-bg-card textarea {
  background: rgba(255,255,255,0.95);
  color: #083b7a;
  border-radius: 6px;
  font-weight: bold;
}

/* 🏅 GAWIS RECOGNITION – SINGLE CONSISTENT BACKGROUND */
.gawis-bg-card {
  position: relative;

  background:
    linear-gradient(
      to bottom,
      rgba(255,255,255,0.88) 0%,
      rgba(255,255,255,0.70) 35%,
      rgba(255,255,255,0.45) 55%,
      rgba(255,255,255,0.70) 80%,
      rgba(255,255,255,0.88) 100%
    ),
    url("images/GAWIS-AY.jpg") center 35% / cover no-repeat;

  box-shadow: 0 12px 30px rgba(0,0,0,0.45);
}

/* Text safety (shared) */
.gawis-bg-card h2,
.gawis-bg-card h3,
.gawis-bg-card p,
.gawis-bg-card label {
  color: #083b7a !important;
  font-weight: bold;
}

.gawis-bg-card input,
.gawis-bg-card textarea,
.gawis-bg-card select {
  background: rgba(255,255,255,0.95);
  color: #083b7a;
  border-radius: 6px;
}

/* 📥 OFFICIAL DRRM ADVISORIES & DOWNLOADS – IMAGE CARD */
.drrm-downloads-card {
  position: relative;
  background: linear-gradient(145deg, rgba(255,255,255,0.96), rgba(255,247,239,0.95));
  color: #16324f;
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

/* Force readable text */
.drrm-downloads-card h2,
.drrm-downloads-card h3,
.drrm-downloads-card li,
.drrm-downloads-card a {
  color: #16324f !important;
  font-weight: 700;
}

/* NATIONAL NEWS COMPACT GRID */

.news-monitor-grid{
display:grid;
grid-template-columns:1fr 1fr;
gap:20px;
margin-top:15px;
}

.news-monitor-status{
padding:12px 14px;
border-radius:12px;
background:rgba(255,255,255,0.94);
border-left:5px solid #083b7a;
color:#0f2942;
font-weight:700;
margin:0 0 16px;
box-shadow:0 8px 18px rgba(5,23,45,0.08);
line-height:1.55;
}

.news-source-grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
gap:18px;
margin-top:18px;
}

.news-source-card{
background:rgba(255,255,255,0.94);
border-radius:16px;
padding:18px;
box-shadow:0 8px 18px rgba(15,23,42,0.08);
border:1px solid rgba(8,59,122,0.08);
}

.news-source-card h3{
margin:0 0 10px;
color:#083b7a;
}

.news-source-note{
margin:0 0 12px;
font-size:13px;
color:#52606d;
line-height:1.5;
}

.news-source-meta{
display:flex;
justify-content:space-between;
align-items:center;
gap:12px;
margin-top:14px;
font-size:12px;
color:#52606d;
flex-wrap:wrap;
}

.news-headline-list{
margin:0;
padding-left:18px;
line-height:1.55;
}

.news-headline-list li{
margin-bottom:10px;
}

.news-btn{
display:inline-block;
padding:10px 16px;
border-radius:8px;
color:white;
font-weight:bold;
text-decoration:none;
}

.news-btn.blue{
background:#0d6efd;
}

.news-btn.red{
background:#dc3545;
}

/* MOBILE */
@media (max-width:768px){
.news-monitor-grid{
grid-template-columns:1fr;
}
}
/* 🌍 FULL-WIDTH WEATHER MAP SECTIONS — OPTION B */
.full-width-section {
  width: 100%;
  position: relative;
  left: 0;
  margin-left: 0;
}

.full-width-section iframe {
  width: 80%;          /* ✅ LIMIT MAP WIDTH TO 80% */
  height: 520px;
  border: none;
  display: block;      /* ✅ REQUIRED FOR CENTERING */
  margin: 0 auto;      /* ✅ CENTER THE MAP */
}

/* 📅 MDRRMO CALENDAR */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.calendar-weekdays div {
  padding: 6px 0;
}

/* 📆 WEEKDAY HEADER ROW */
.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 8px;
  text-align: center;
  font-weight: bold;
  color: #083b7a;
}

.calendar-day {
  background: rgba(255,255,255,0.92);
  border-radius: 10px;
  padding: 10px;
  min-height: 120px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
  font-size: 13px;
}

.home-planner-card .calendar-day {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(226,240,255,0.93));
  border: 1px solid rgba(8,59,122,0.10);
  box-shadow: 0 8px 18px rgba(5,33,73,0.12);
}

.home-planner-card #calendarMonthLabel {
  color: #f8fbff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.28);
}

.calendar-day strong {
  display: block;
  margin-bottom: 6px;
  color: #083b7a;
}

.calendar-day ul {
  padding-left: 15px;
  margin: 0;
}

.calendar-day li {
  font-size: 12px;
  margin-bottom: 4px;
}

.calendar-day button {
  margin-top: 6px;
  font-size: 11px;
  padding: 4px 6px;
  border: none;
  border-radius: 6px;
  background: #0d6efd;
  color: #fff;
  cursor: pointer;
}

/* 📱 MOBILE CALENDAR SCROLL FIX */
@media (max-width: 768px) {

  #mdrrmo-calendar .calendar-grid {
    max-height: 70vh;        /* limits height on mobile */
    overflow-y: auto;        /* vertical scrollbar */
    padding-right: 6px;      /* space for scrollbar */
  }

}

/* QUICK ACCESS PANEL */
.quick-access {
  background: #ffffff;
  border-left: 6px solid #083b7a;
  border-radius: 12px;
  padding: 20px;
  margin: 20px auto;
  max-width: 1200px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.quick-access h3 {
  background: #083b7a;
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 8px;
  display: inline-block;
  font-size: 20px;
  font-weight: 800;
}

.quick-access .subtitle {
  margin: 10px 0 14px;
  font-size: 14px;
  font-weight: bold;
  color: #083b7a;
}

.quick-links,
.quick-sections {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-access a {
  background: #f4f7fb;
  color: #083b7a;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
}

.quick-access a:hover {
  background: #083b7a;
  color: #ffffff;
}

.quick-access hr {
  border: none;
  height: 2px;
  background: #083b7a;
  margin: 18px 0;
}

/* 🔗 QUICK ACCESS HEADER VISIBILITY FIX */
.quick-access h3 {
  background: #083b7a;        /* MDRRMO blue */
  color: #ffffff;             /* strong contrast */
  padding: 10px 14px;
  border-radius: 8px;
  display: inline-block;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

/* Slightly darker container so links stand out */
.quick-access {
  background: rgba(255, 255, 255, 0.96);
}

/* Improve link visibility */
.quick-access a {
  font-weight: 700;
  color: #083b7a;
}

/* Divider emphasis */
.quick-access hr {
  border: none;
  height: 2px;
  background: #083b7a;
  margin: 18px 0;
}
/* 🔗 HEADER QUICK ACCESS STRIP — HIGH VISIBILITY */
.header-quick-access {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;

  background: #0a2f6b;              /* darker blue */
  padding: 12px 14px;
  border-top: 3px solid #ffffff;
  border-bottom: 3px solid #ffeb3b; /* visual separator */

  box-shadow: 0 4px 10px rgba(0,0,0,0.35);
}

/* Buttons */
.header-quick-access a {
  background: #ffffff;
  color: #0a2f6b;
  text-decoration: none;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  transition: all 0.2s ease;
}

/* Hover */
.header-quick-access a:hover {
  background: #ffeb3b;
  color: #000;
}

/* Divider */
.header-quick-access .divider {
  width: 2px;
  height: 24px;
  background: rgba(255,255,255,0.6);
  margin: 0 6px;
}

/* 📱 MOBILE STACK */
@media (max-width: 768px) {
  .header-quick-access {
    overflow-x: auto;
    justify-content: flex-start;
  }
}

/* ✅ FORCE PAGASA META TEXT TO MATCH OTHER CARD TEXT */
.pagasa-cyclone-card .meta-info,
.pagasa-cyclone-card .meta-info p,
.pagasa-cyclone-card .meta-info span {
  color: #222 !important;     /* same as other text */
  font-size: 14px !important;    /* match body text */
  font-weight: 500 !important;
  opacity: 1 !important;         /* REMOVE fading */
}

/* Match label emphasis used elsewhere */
.pagasa-cyclone-card .meta-info strong {
  color: #222 !important;
  font-weight: 700 !important;
}

/* Source text – still readable, not gray */
.pagasa-cyclone-card .meta-info .source {
  color: #222 !important;
  font-size: 13px !important;
  opacity: 1 !important;
}
/* Siguraduhin na ang labels sa loob ng Activity Documentation ay puti at malinaw */
#activityDetails h3, 
#activityDetails label, 
#activityDetails p {
  color: #222 !important; /* Puting text */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8); /* Itim na anino para madaling basahin */
  font-weight: bold;
}

#activityDetails label {
  display: block;
  margin-top: 15px;
  font-size: 16px;
}
/* Image Preview Styling */
#incidentPreviewContainer {
  flex: 1;
  min-width: 280px;
  border: 1px dashed rgba(255,255,255,0.5);
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  background: rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#incidentPreview {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 10px;
  border: 2px solid white;
}
.map-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.map-controls input {
    flex-grow: 1;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.map-controls button {
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    font-weight: bold;
}

.layer-header{
  background:#062c63;
  color:white;
  padding:12px;
  margin:80px 0 15px 0;   /* 🔥 INCREASE TOP SPACE */
  border-radius:8px;
  font-size:18px;
  font-weight:bold;
  text-align:center;
  box-shadow:0 3px 8px rgba(0,0,0,0.25);
}
.home-section{
  position: relative;
  z-index: 1;
}
.page:not(.active) .home-section {
  display: none !important;
}
/* 🎬 Smooth transitions */
.layer-header,
.page {
  transition: all 0.3s ease;
}

/* Optional fade effect */

.page.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  position: relative;
}
/* ✅ Hide inactive layer headers */
.layer-header.hidden {
  display: none !important;
}
/* 🔥 ADD THIS DIRECTLY BELOW */
.layer-header.active {
  background: #0d6efd;
}
.layer-desc{
text-align:center;
margin-bottom:20px;
font-size:14px;
color:#083b7a;
font-weight:bold;
}
#typhoon-dashboard {
  margin-bottom: 80px;   /* 🔥 stronger spacing */
}

.monitoring-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.monitoring-toolbar button {
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #0d6efd, #083b7a);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
}

.monitoring-last-sync {
  color: #d9ecff;
  font-size: 13px;
  font-weight: 700;
}

.monitoring-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

 .monitoring-stat {
  background: linear-gradient(145deg, rgba(255,255,255,0.96), rgba(241,247,255,0.94));
  border-left: 6px solid #083b7a;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

.monitoring-stat h3 {
  margin: 0 0 10px;
  color: #355070;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.monitoring-stat strong,
.monitoring-stat span,
.monitoring-stat p {
  color: #16324f !important;
}

.monitoring-stat .value {
  display: block;
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
}

.monitoring-stat .note {
  font-size: 14px;
  color: #4c6a88 !important;
}

.home-landing {
  max-width: 1200px;
  margin: 26px auto 10px;
  padding: 0 20px;
}

.home-landing-card {
  background:
    linear-gradient(135deg, rgba(8,59,122,0.92), rgba(19,78,74,0.92)),
    radial-gradient(circle at top right, rgba(255,255,255,0.18), transparent 35%);
  color: #ffffff;
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 18px 36px rgba(0,0,0,0.22);
  overflow: hidden;
}

.home-landing-grid {
  display: grid;
  gap: 24px;
  align-items: stretch;
}

.home-landing-top {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 24px;
  align-items: start;
}

.home-landing-main {
  display: flex;
  flex-direction: column;
}

.home-landing-card h2,
.home-landing-card h3,
.home-landing-card p,
.home-landing-card span,
.home-landing-card strong {
  color: #ffffff !important;
}

.home-landing-title {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
}

.home-landing-subtitle {
  margin: 0 0 16px;
  max-width: 720px;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255,255,255,0.92) !important;
}

.home-landing-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.home-landing-tags span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
}

.home-landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.home-landing-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 180px;
  padding: 12px 16px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 800;
  color: #ffffff !important;
  box-shadow: 0 10px 18px rgba(0,0,0,0.18);
}

.home-action-primary {
  background: linear-gradient(135deg, #0d6efd, #083b7a);
}

.home-action-secondary {
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.16);
}

.home-live-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.home-live-card {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 18px;
  padding: 20px;
}

.home-live-label {
  display: block;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.86) !important;
  margin-bottom: 12px;
}

.home-live-value {
  display: block;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 900;
}

.home-live-note {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255,255,255,0.94) !important;
}

.home-landing-side {
  display: grid;
  gap: 14px;
  align-self: start;
}

.home-landing-bottom {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: start;
}

.home-support-panels {
  display: grid;
  gap: 14px;
}

.home-mini-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.10));
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

.home-mini-panel h3 {
  margin: 0 0 10px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.home-status-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.14);
  font-size: 14px;
}

.home-status-line:last-child {
  border-bottom: none;
}

.home-quick-links {
  display: grid;
  gap: 10px;
}

.home-quick-links a {
  display: block;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.14);
  color: #ffffff !important;
  text-decoration: none;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 700;
}

.home-feed-list {
  display: grid;
  gap: 10px;
}

.home-feed-item {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.12);
}

.home-feed-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

@media (max-width: 768px) {
  .home-landing {
    padding: 0 15px;
  }

  .home-landing-card {
    padding: 22px 18px;
    border-radius: 20px;
  }

  .home-landing-grid {
    gap: 18px;
  }

  .home-landing-top,
  .home-landing-bottom {
    grid-template-columns: 1fr;
  }

  .home-landing-actions a {
    width: 100%;
    min-width: 0;
  }

  .home-live-grid {
    grid-template-columns: 1fr;
  }

  .home-editor-grid,
  .home-manager-item {
    grid-template-columns: 1fr;
  }
}

.heat-index-pill {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.heat-index-pill.safe {
  background: rgba(25, 135, 84, 0.14);
  color: #167c45 !important;
}

.heat-index-pill.caution {
  background: rgba(255, 193, 7, 0.18);
  color: #9a6700 !important;
}

.heat-index-pill.danger {
  background: rgba(220, 53, 69, 0.16);
  color: #b42318 !important;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

/* EOC navigation must reveal the selected operational screen immediately. */
.page,
.page.active,
.layer-header,
.eoc-nav-panel,
.nav-submenu {
  transition-delay: 0s !important;
}

.page {
  transition: none !important;
}

/* Large EOC pages contain many operational modules. Render off-screen
   modules only as they approach the viewport so navigation is not blocked
   by full-page layout and paint work. */
.page.active > section,
.page.active > .card,
.page.active > .home-section,
.page.active > .dashboard-shell,
.page.active > .operations-workspace {
  content-visibility: auto;
  contain-intrinsic-size: auto 640px;
}

.page.active > section:target,
.page.active > section[aria-live="polite"] {
  content-visibility: visible;
}
/* 🎯 COLOR-CODED LAYER HEADERS (MATCH NAV BUTTONS) */

.layer-header.dashboard {
  background: #0d6efd;   /* BLUE */
}

.layer-header.operations {
  background: #dc3545;   /* RED */
}

.layer-header.public {
  background: #198754;   /* GREEN */
}

.layer-header.intelligence {
  background: #fd7e14;   /* ORANGE */
}

.layer-header.news {
  background: #1d4ed8;
}

.layer-header.dost {
  background: #0f766e;
}

.layer-header.disaster-report {
  background: #b91c1c;
}

.layer-header.plans-frameworks {
  background: #0f766e;
}

.layer-header.citizen-charter {
  background: #7c3aed;
}

.layer-header.training {
  background: #7c3aed;
}
.layer-tile {
  border: none;
  border-radius: 16px;
  padding: 22px 18px;
  color: white;
  text-align: left;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 8px 20px rgba(0,0,0,0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.layer-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.35);
}

.layer-tile span {
  display: block;
  font-size: 14px;
  line-height: 1.5;
  margin-top: 8px;
  opacity: 0.95;
}

.layer-tile.monitoring { background: linear-gradient(135deg, #0d6efd, #083b7a); }
.layer-tile.dashboard { background: linear-gradient(135deg, #facc15, #ca8a04); color:#2f2500; }
.layer-tile.operations { background: linear-gradient(135deg, #dc3545, #8b0000); }
.layer-tile.public { background: linear-gradient(135deg, #198754, #0f5132); }
.layer-tile.intelligence { background: linear-gradient(135deg, #fd7e14, #b45309); }
.layer-tile.news { background: linear-gradient(135deg, #1d4ed8, #1e3a8a); }
.layer-tile.agency-tools { background: linear-gradient(135deg, #0f766e, #115e59); }
.layer-tile.disaster-report { background: linear-gradient(135deg, #b91c1c, #7f1d1d); }
.layer-tile.citizen-charter { background: linear-gradient(135deg, #8b5a2b, #5c3b1e); }
.layer-tile.training { 
  background: linear-gradient(135deg, #8b5cf6, #7c3aed); 
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  border: 2px solid rgba(255,255,255,0.1);
  position: relative;
  overflow: hidden;
}
.layer-tile.communication { background: linear-gradient(135deg, #06b6d4, #0891b2); }

/* Enhanced Training Button Hover Effect */
.layer-tile.training:hover {
  background: linear-gradient(135deg, #9333ea, #8b5cf6);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 15px 30px rgba(139, 92, 246, 0.4);
  border-color: rgba(255,255,255,0.2);
}

.layer-tile.training::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.5s ease;
}

.layer-tile.training:hover::before {
  left: 100%;
}

/* Pulse animation for training button */
@keyframes trainingPulse {
  0% {
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.28);
  }
  50% {
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.28), 0 0 0 4px rgba(139, 92, 246, 0.1);
  }
  100% {
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.28);
  }
}

.layer-tile.training {
  animation: trainingPulse 3s ease-in-out infinite;
}
.layer-tile.utility { background: linear-gradient(135deg, #475569, #1e293b); }
.nav-links .layer-tile {
  padding: 10px 14px;
  border-radius: 999px;
  box-shadow: none;
  font-size: 13px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
}

.nav-links .layer-tile span {
  display: none;
}

/* REMOVED: Conflicting active state rules - using clean styling above */
.forecast-grid {
  display: flex;
  overflow-x: auto;
  gap: 15px;
  padding: 10px 0;
}

.dost-intro {
  margin: 12px 0 20px 0;
  padding: 14px 16px;
  background: linear-gradient(135deg, #eefbf8, #f6fffd);
  border-left: 5px solid #0f766e;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: #244047;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.08);
}

.dost-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.dost-card {
  background: linear-gradient(180deg, #ffffff, #f7fbfb);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  border-top: 4px solid #0f766e;
}

.dost-card h3 {
  margin: 0 0 10px 0;
  font-size: 16px;
  color: #0f766e;
}

.dost-card p {
  font-size: 13px;
  color: #46545c;
  line-height: 1.6;
  margin-bottom: 16px;
}

.dost-link-btn {
  display: inline-block;
  text-decoration: none;
  background: #0f766e;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  transition: 0.2s ease;
}

.dost-link-btn:hover {
  background: #115e59;
  transform: translateY(-2px);
}

.dost-note {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #12304a;
  padding: 12px 14px;
  background: rgba(255,255,255,0.92);
  border-radius: 12px;
  border: 1px solid rgba(8,59,122,0.10);
}

#citizenCharterPage {
  padding: 20px;
}

.charter-hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  background: #eef4fb;
  border-left: 5px solid #062c63;
  border-radius: 12px;
  padding: 18px;
  margin: 14px 0 18px 0;
}

.charter-hero h2 {
  margin: 0 0 8px 0;
  color: #062c63;
}

.charter-hero p {
  margin: 0;
  color: #333;
  line-height: 1.6;
}

.charter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.charter-btn {
  display: inline-block;
  background: #062c63;
  color: #fff;
  text-decoration: none;
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: bold;
  cursor: pointer;
}

.charter-btn.secondary {
  background: #0b5ed7;
}

.charter-note {
  margin: 0 0 18px 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff8e1;
  border-left: 5px solid #f0ad4e;
  color: #333;
}

.charter-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.summary-card,
.charter-service-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.summary-card strong {
  display: block;
  color: #062c63;
  margin-bottom: 6px;
}

.summary-card span {
  color: #333;
  line-height: 1.5;
}

.charter-service-card {
  margin-bottom: 18px;
}

.service-title {
  font-size: 20px;
  font-weight: 700;
  color: #062c63;
  margin-bottom: 12px;
}

.charter-table,
.charter-process-table {
  width: 100%;
  border-collapse: collapse;
}

.charter-table th,
.charter-table td,
.charter-process-table th,
.charter-process-table td {
  border: 1px solid #d6dde8;
  padding: 10px;
  vertical-align: middle;
}

.charter-table th {
  width: 220px;
  text-align: left;
  background: #dfeaf6;
  color: #1d2d44;
}

.charter-process-table th {
  background: #062c63;
  color: #fff;
  text-align: center;
}

.charter-process-table td:first-child,
.charter-process-table td:nth-child(4),
.charter-process-table td:nth-child(5) {
  text-align: center;
}

.flow-heading {
  margin: 16px 0 10px 0;
  color: #062c63;
}

.flow-row {
  display: grid;
  grid-template-columns: 1fr 40px 1fr 40px 1fr 40px 1fr;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}

.flow-step {
  background: #f4f8fc;
  border: 1px solid #d6dde8;
  border-radius: 12px;
  padding: 12px;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #243b53;
  line-height: 1.45;
}

.flow-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #062c63;
  color: #fff;
  font-weight: bold;
  margin-bottom: 8px;
}

.flow-arrow {
  text-align: center;
  font-size: 22px;
  color: #0b5ed7;
  font-weight: bold;
}

.table-wrap {
  overflow-x: auto;
}

.feedback-form-wrap {
  margin-top: 16px;
  background: #eef4fb;
  border-radius: 12px;
  padding: 16px;
}

.feedback-form-wrap h4 {
  margin: 0 0 12px 0;
  color: #062c63;
}

.feedback-helper {
  margin: 0 0 12px 0;
  color: #355070;
  line-height: 1.55;
  font-size: 14px;
}

.feedback-form .form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.feedback-form label {
  display: block;
  font-weight: 600;
  color: #243b53;
  margin-bottom: 10px;
}

.feedback-form input,
.feedback-form select,
.feedback-form textarea {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid #c5d0dd;
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
}

.feedback-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.feedback-status {
  font-size: 14px;
  color: #2e7d32;
  font-weight: 600;
}

.incident-other-input {
  display: none;
  margin-top: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #c5d0dd;
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
}

.windy-launch-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.94), rgba(232,245,255,0.95));
  border: 1px solid rgba(8,59,122,0.12);
  border-radius: 18px;
  padding: 22px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 12px 24px rgba(8,59,122,0.08);
}

.windy-launch-visual {
  min-height: 190px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(6,44,99,0.76), rgba(11,94,215,0.42)),
    url("images/windy_background.jpg") center center / cover no-repeat;
  display: flex;
  align-items: flex-end;
  padding: 18px;
  color: #fff;
  font-weight: 700;
}

.windy-launch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.windy-launch-btn {
  border: none;
  border-radius: 10px;
  padding: 11px 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #083b7a;
  color: #fff;
}

.windy-launch-btn.secondary {
  background: #e8f1fb;
  color: #083b7a;
}

.windy-status-note {
  font-size: 13px;
  color: #475569;
  line-height: 1.6;
}

.windy-embed-shell{
  margin-top:14px;
  border-radius:16px;
  overflow:hidden;
  background:#dbeafe;
  min-height:420px;
  border:1px solid rgba(8,59,122,0.14);
}

.windy-embed-shell iframe{
  width:100%;
  height:420px;
  border:0;
  display:block;
}

.windy-embed-toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:14px;
  margin-bottom:8px;
}

.windy-embed-btn{
  border:none;
  border-radius:999px;
  padding:10px 14px;
  font-weight:700;
  cursor:pointer;
  background:#083b7a;
  color:#fff;
}

.windy-embed-btn.secondary{
  background:#dbeafe;
  color:#083b7a;
}

.pagasa-satellite-card {
  border-top: 4px solid #0b5394;
}

.pagasa-satellite-shell {
  border: 1px solid rgba(8, 59, 122, 0.14);
  border-radius: 16px;
  overflow: hidden;
  background: #071421;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.pagasa-satellite-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #0b3552, #145da0);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.pagasa-satellite-toolbar span {
  flex: 1 1 260px;
}

.pagasa-satellite-toolbar button,
.pagasa-satellite-toolbar a {
  border: 0;
  border-radius: 999px;
  padding: 9px 13px;
  background: #ffffff;
  color: #083b7a;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.pagasa-andrr-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.05fr) minmax(320px, 0.95fr);
  gap: 18px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9)),
    radial-gradient(circle at 35% 30%, rgba(59, 130, 246, 0.18), transparent 40%);
}

.pagasa-himawari-panel,
.pagasa-context-panel {
  min-height: clamp(420px, 58vh, 620px);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: #0f172a;
  border: 1px solid rgba(226, 232, 240, 0.2);
}

.pagasa-panel-label {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.82);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.pagasa-himawari-panel img,
.pagasa-context-map {
  display: block;
  width: 100%;
  height: 100%;
}

.pagasa-himawari-panel img {
  object-fit: contain;
  background: #111827;
}

.pagasa-panel-fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 70px 24px 24px;
  text-align: center;
  background: #eaf3fb;
  color: #17324d;
}

.pagasa-panel-fallback[hidden] {
  display: none;
}

.pagasa-panel-fallback a {
  padding: 10px 14px;
  border-radius: 8px;
  background: #0b5d91;
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
}

.pagasa-context-map {
  min-height: clamp(420px, 58vh, 620px);
}

.pagasa-himawari-cloud-overlay {
  mix-blend-mode: screen;
  filter: contrast(1.08) saturate(0.88);
}

.weather-action-level {
  margin: 18px 0;
  border: 1px solid #aebdca;
  border-top: 5px solid #15803d;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 35, 55, 0.12);
}

.weather-action-level[data-level="MONITOR"] { border-top-color: #d5a10b; }
.weather-action-level[data-level="PREPARE"] { border-top-color: #ea580c; }
.weather-action-level[data-level="ACT"] { border-top-color: #c81e1e; }

.weather-advisory-card {
  container-type: inline-size;
}

.weather-action-level-current {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 16px 14px;
  background: #eaf7ef;
  color: #172033;
}

.weather-action-level[data-level="MONITOR"] .weather-action-level-current { background: #fff8d9; }
.weather-action-level[data-level="PREPARE"] .weather-action-level-current { background: #fff0e7; }
.weather-action-level[data-level="ACT"] .weather-action-level-current { background: #ffebeb; }

.weather-action-level-current > span:first-child {
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

#weatherActionLevel {
  padding: 9px 12px;
  border-radius: 6px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.2);
}

#weatherActionLevel[data-level="NORMAL"] { background: #15803d; }
#weatherActionLevel[data-level="MONITOR"] { background: #a16207; }
#weatherActionLevel[data-level="PREPARE"] { background: #c2410c; }
#weatherActionLevel[data-level="ACT"] { background: #b91c1c; }

#weatherActionMeaning {
  font-size: 15px;
  font-weight: 900;
  line-height: 1.35;
}

.weather-action-level-scale {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: #dbe3ea;
  border-top: 1px solid #dbe3ea;
  border-bottom: 1px solid #dbe3ea;
}

.weather-action-level-scale > span {
  min-height: 64px;
  padding: 12px 13px;
  background: #ffffff;
  color: #334155;
  border-left: 5px solid transparent;
  font-size: 13px;
  line-height: 1.4;
}

.weather-action-level-scale > span[data-level="NORMAL"] {
  border-left-color: #15803d;
  background: #f0fdf4;
}

.weather-action-level-scale > span[data-level="MONITOR"] {
  border-left-color: #d5a10b;
  background: #fffbeb;
}

.weather-action-level-scale > span[data-level="PREPARE"] {
  border-left-color: #ea580c;
  background: #fff7ed;
}

.weather-action-level-scale > span[data-level="ACT"] {
  border-left-color: #c81e1e;
  background: #fef2f2;
}

.weather-action-level-scale strong {
  display: block;
  margin-bottom: 3px;
  color: #172033;
  font-size: 14px;
  font-weight: 950;
}

.weather-action-level-note {
  margin: 0 !important;
  padding: 14px;
  border-top: 1px solid #b9d4eb;
  background: #e8f4ff;
  color: #24415f !important;
  font-size: 13px !important;
  line-height: 1.6;
}

.weather-action-level-note strong {
  display: block;
  margin-bottom: 3px;
  color: #0b4f7c !important;
  font-size: 15px !important;
}

@media (max-width: 600px) {
  .weather-action-level-current {
    grid-template-columns: auto 1fr;
  }

  #weatherActionMeaning {
    grid-column: 1 / -1;
  }

  .weather-action-level-scale {
    grid-template-columns: 1fr;
  }
}

@container (max-width: 420px) {
  .weather-action-level-current {
    grid-template-columns: auto 1fr;
  }

  #weatherActionMeaning {
    grid-column: 1 / -1;
  }

  .weather-action-level-scale {
    grid-template-columns: 1fr;
  }
}

.status-anchor-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

#dashboardPage .dashboard-weather-overview {
  margin: 0 auto 26px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#dashboardPage .dashboard-monitoring-toolbar {
  margin: 0 auto 18px;
}

#layer1Page .weather-layer-overview-legacy {
  display: none !important;
}

#dashboardPage .dashboard-redundant-weather-card {
  display: none !important;
}

#dashboardPage .dashboard-ops-transfer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 22px 0 0;
}

#dashboardPage .dashboard-analytics-admin-mount {
  margin: 22px 0 0;
}

#dashboardPage .dashboard-analytics-admin-mount .analytics-section {
  margin: 0 !important;
}

#dashboardPage .dashboard-ops-transfer-grid > .card {
  margin: 0 !important;
  min-width: 0;
}

#dashboardPage .dashboard-ops-transfer-grid .pagasa-eoc-card,
#dashboardPage .dashboard-ops-transfer-grid .travel-route-card {
  align-self: stretch;
}

#dashboardPage .dashboard-ops-transfer-grid .weather-impact-card,
#dashboardPage .dashboard-ops-transfer-grid .duty-decision-card {
  grid-column: span 1;
}

@media (max-width: 1000px) {
  #dashboardPage .dashboard-weather-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #dashboardPage .dashboard-ops-transfer-grid {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 900px) {
  .pagasa-andrr-grid {
    grid-template-columns: 1fr;
  }
}

.pagasa-satellite-note {
  padding: 10px 14px;
  background: #e8f1fb;
  color: #0f2f4a;
  font-size: 12px;
  font-weight: 700;
}

#dost-tools .section-title{
  font-size:32px;
  font-weight:900;
  letter-spacing:0.02em;
  color:#062c63;
  text-shadow:0 2px 0 rgba(255,255,255,0.55);
}

#dost-tools .dost-intro{
  font-size:16px;
}

#dost-tools.agency-feeds-focused > .section-title,
#dost-tools.agency-feeds-focused > .dost-intro,
#dost-tools.agency-feeds-focused > .dost-grid,
#dost-tools.agency-feeds-focused > .dost-note {
  display: none !important;
}

#agencyAdvisoriesFacebookFeeds[hidden] {
  display: none !important;
}

.agency-facebook-updates-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 22px;
  align-items: start;
  margin: 28px 0;
}

.agency-facebook-updates-grid > .card {
  margin: 0 !important;
  min-width: 0;
}

.agency-facebook-updates-grid .section-title {
  font-size: 22px !important;
}

.earthquake-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(340px, 1.4fr);
  gap: 18px;
  align-items: stretch;
}

.earthquake-feed-panel,
.earthquake-map-panel {
  background: rgba(255,255,255,0.82);
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,0.08);
  padding: 16px;
  box-shadow: 0 8px 18px rgba(15,23,42,0.06);
}

.earthquake-map-panel h4,
.earthquake-feed-panel h4 {
  margin: 0 0 10px 0;
  color: #083b7a;
}

.earthquake-map-status {
  margin-bottom: 10px;
  font-size: 13px;
  color: #52606d;
}

.earthquake-map-shell {
  height: clamp(560px, 72vh, 760px);
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid #083b7a;
  background: linear-gradient(180deg, rgba(226,232,240,0.7), rgba(203,213,225,0.55));
}

#earthquakeMap {
  width: 100%;
  height: 100% !important;
}

.quake-feed {
  margin: 0;
  padding-left: 18px;
}

.quake-feed li {
  margin-bottom: 12px;
  line-height: 1.5;
}

.volcano-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.97), rgba(255,247,237,0.95));
  border-top: 4px solid #c2410c;
}

.volcano-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.volcano-stat {
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(194,65,12,0.18);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 8px 18px rgba(15,23,42,0.06);
}

.volcano-stat .stat-label {
  display: block;
  color: #7c2d12 !important;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.volcano-stat .stat-value {
  color: #172033 !important;
  font-size: 18px;
  font-weight: 900;
}

.volcano-eruption-notice {
  margin: 14px 0;
  padding: 14px 16px;
  border-radius: 14px;
  font-weight: 800;
  border: 1px solid rgba(245,158,11,0.35);
  background: rgba(254,243,199,0.92);
  color: #713f12 !important;
}

.volcano-eruption-notice.active {
  background: rgba(254,226,226,0.95);
  border-color: rgba(220,38,38,0.4);
  color: #7f1d1d !important;
}

.volcano-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 18px;
}

.volcano-actions button,
.volcano-actions a {
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #9a3412, #c2410c);
  color: #fff !important;
  font-weight: 800;
  padding: 10px 14px;
  text-decoration: none;
  cursor: pointer;
}

.volcano-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
  align-items: stretch;
}

.volcano-table-panel,
.volcano-map-panel {
  background: rgba(255,255,255,0.84);
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 18px rgba(15,23,42,0.06);
}

.volcano-filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.volcano-filter-bar label {
  font-weight: 900;
  color: #7c2d12 !important;
}

.volcano-filter-bar select {
  border: 1px solid rgba(194,65,12,0.25);
  border-radius: 10px;
  padding: 8px 10px;
  font-weight: 700;
}

.volcano-table-wrap {
  max-height: 540px;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,0.08);
}

.volcano-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.volcano-table th {
  position: sticky;
  top: 0;
  background: #7c2d12;
  color: #fff;
  text-align: left;
  padding: 10px;
  z-index: 1;
}

.volcano-table td {
  padding: 10px;
  border-bottom: 1px solid rgba(15,23,42,0.08);
  color: #172033 !important;
}

.volcano-alert-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  border-radius: 999px;
  padding: 5px 9px;
  font-weight: 900;
  font-size: 12px;
}

.volcano-alert-pill.normal { background: #dcfce7; color: #14532d !important; }
.volcano-alert-pill.watch { background: #fef3c7; color: #92400e !important; }
.volcano-alert-pill.high { background: #fed7aa; color: #9a3412 !important; }
.volcano-alert-pill.critical { background: #fee2e2; color: #991b1b !important; }

.volcano-map-status {
  color: #52606d !important;
  font-size: 13px;
  margin-bottom: 10px;
}

.volcano-map {
  height: clamp(420px, 56vh, 620px);
  border-radius: 14px;
  border: 2px solid #9a3412;
  background: #e5e7eb;
  overflow: hidden;
}

.volcano-source-note {
  margin-top: 14px;
  color: #52606d !important;
  font-size: 13px;
}

.charter-guidelines-note {
  margin: 0 0 18px 0;
  padding: 14px 16px;
  background: #f5f3ff;
  border-left: 5px solid #7c3aed;
  border-radius: 12px;
  color: #3b2f63;
  line-height: 1.65;
}

.charter-org-card {
  background: #fff;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  margin-bottom: 18px;
}

.org-chart-grid {
  display: grid;
  gap: 14px;
}

.org-section-title {
  margin: 18px 0 10px 0;
  color: #062c63;
  font-size: 17px;
  font-weight: 700;
}

.org-table-wrap {
  overflow-x: auto;
}

.org-structure-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.org-structure-table th,
.org-structure-table td {
  border: 1px solid #d6dde8;
  padding: 12px;
  vertical-align: top;
}

.org-structure-table th {
  background: #062c63;
  color: #fff;
  text-align: left;
  font-size: 13px;
}

.org-structure-table td {
  background: #fff;
  color: #334155;
  font-size: 13px;
  line-height: 1.6;
}

.org-structure-table td strong {
  display: block;
  color: #062c63;
  margin-bottom: 6px;
  font-size: 14px;
}

.org-unit-list {
  margin: 0;
  padding-left: 18px;
}

.org-unit-list li {
  margin-bottom: 6px;
}

.functional-chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.functional-chart-card {
  background: linear-gradient(145deg, #f8fbff, #eef4fb);
  border: 1px solid #d6dde8;
  border-radius: 12px;
  padding: 14px;
}

.functional-chart-card strong {
  display: block;
  color: #062c63;
  margin-bottom: 8px;
}

.functional-chart-card p {
  margin: 0;
  color: #46556a;
  font-size: 13px;
  line-height: 1.6;
}

.org-chart-document-layout {
  --org-brown: #6f3600;
  --org-gold: #ffe36f;
  --org-line: #6f3600;
  --org-funding: #ff2a17;
  --org-occupied: #090909;
  --org-proposed: #2f90b7;
  --org-vacant: #696d65;
  padding: 20px;
}

#aboutPage .org-chart-document-layout {
  width: min(100%, calc(100vw - 360px));
  max-width: 1480px;
}

.org-reference-note {
  margin: 4px 0 14px;
  color: #52606d;
  font-size: 13px;
}

.org-status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid #d9e1ec;
  border-radius: 12px;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.org-status-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.org-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.9), 0 0 0 4px rgba(15,23,42,0.08);
}

.org-dot-occupied { background: var(--org-occupied); }
.org-dot-funding { background: var(--org-funding); }
.org-dot-proposed { background: var(--org-proposed); }
.org-dot-vacant { background: var(--org-vacant); }

.pdf-org-chart {
  position: relative;
  overflow-x: auto;
  padding: 26px 14px 18px;
  border: 1px solid #d9e1ec;
  border-radius: 16px;
  background:
    linear-gradient(176deg, rgba(255,219,57,0.92) 0 46px, transparent 47px),
    linear-gradient(184deg, transparent 0 58px, rgba(111,54,0,0.95) 59px 75px, transparent 76px),
    radial-gradient(circle at 22% 30%, rgba(15,23,42,0.045), transparent 18%),
    radial-gradient(circle at 76% 62%, rgba(15,23,42,0.05), transparent 20%),
    linear-gradient(180deg, #ffffff 0%, #f6f7f8 100%);
}

.pdf-org-chart::before {
  content: "ORGANIZATIONAL STRUCTURE AND STAFFING PATTERN";
  position: absolute;
  top: 90px;
  right: 26px;
  max-width: 340px;
  color: rgba(17, 24, 39, 0.18);
  font-family: "Montserrat", sans-serif;
  font-weight: 900;
  font-size: 22px;
  line-height: 1.08;
  text-align: right;
  letter-spacing: 0.08em;
  pointer-events: none;
}

.org-node {
  position: relative;
  width: min(100%, 310px);
  margin: 0 auto 22px;
  text-align: center;
  z-index: 1;
}

.org-node::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -22px;
  width: 5px;
  height: 22px;
  transform: translateX(-50%);
  background: var(--org-line);
}

.org-node:last-child::after,
.org-paired-nodes .org-node::after {
  display: none;
}

.org-node-top {
  margin-top: 36px;
  margin-bottom: 58px;
}

.org-node-top::after {
  height: 58px;
  bottom: -58px;
}

.org-avatar,
.org-node img {
  width: 96px;
  height: 96px;
  margin: 0 auto -10px;
  border-radius: 50%;
  border: 7px solid #fff;
  background: currentColor;
  box-shadow: 0 12px 24px rgba(15,23,42,0.18);
  object-fit: cover;
  display: block;
}

.org-status-occupied { color: var(--org-occupied); }
.org-status-funding { color: var(--org-funding); }
.org-status-proposed { color: var(--org-proposed); }
.org-status-vacant { color: var(--org-vacant); }

.org-label {
  position: relative;
  min-height: 48px;
  padding: 8px 10px 9px;
  background: var(--org-brown);
  border: 1px solid rgba(255,227,111,0.4);
  color: #f8e9a5;
  box-shadow: 0 10px 18px rgba(62, 31, 0, 0.16);
}

.org-label strong {
  display: block;
  color: var(--org-gold);
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-transform: uppercase;
}

.org-label span {
  display: block;
  color: #fff1b8;
  font-size: 11px;
  line-height: 1.25;
}

.org-main-branches {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 34px;
  min-width: 920px;
  padding-top: 34px;
}

.org-main-branches::before {
  content: "";
  position: absolute;
  left: calc(16.66% + 8px);
  right: calc(16.66% + 8px);
  top: 0;
  height: 5px;
  background: var(--org-line);
}

.org-branch {
  position: relative;
  padding-top: 0;
}

.org-branch::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -34px;
  width: 5px;
  height: 34px;
  transform: translateX(-50%);
  background: var(--org-line);
}

.org-branch-title {
  margin: 0 auto 20px;
  width: min(100%, 330px);
  padding: 10px 12px;
  background: var(--org-brown);
  color: var(--org-gold);
  font-family: "Montserrat", sans-serif;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 8px 16px rgba(62, 31, 0, 0.12);
}

.org-paired-nodes {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 18px;
  align-items: start;
  margin: 0 auto;
}

.org-paired-nodes::before {
  content: "";
  position: absolute;
  left: 25%;
  right: 25%;
  top: -11px;
  height: 5px;
  background: var(--org-line);
}

.org-paired-nodes .org-node {
  width: 100%;
  margin-bottom: 0;
}

.org-paired-nodes .org-node::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -11px;
  width: 5px;
  height: 11px;
  transform: translateX(-50%);
  background: var(--org-line);
}

.org-paired-nodes .org-avatar,
.org-paired-nodes .org-node img {
  width: 84px;
  height: 84px;
}

.org-paired-nodes .org-label strong {
  font-size: 11px;
}

.org-paired-nodes .org-label span {
  font-size: 10px;
}

.mdrrmc-org-chart {
  --mdrrmc-blue: #a9ddea;
  --mdrrmc-blue-border: #75b4c4;
  --mdrrmc-green: #c8efca;
  --mdrrmc-green-border: #8bc58d;
  --mdrrmc-line: #1b1f24;
  display: grid;
  justify-items: center;
  gap: 12px;
  width: 100%;
  padding: 24px 28px;
  border: 1px solid #d9e7ee;
  border-radius: 16px;
  background:
    radial-gradient(circle at top right, rgba(192, 231, 229, 0.52), transparent 26%),
    radial-gradient(circle at bottom left, rgba(196, 238, 221, 0.5), transparent 24%),
    linear-gradient(180deg, #ffffff, #f8fcfc);
}

.mdrrmc-org-chart,
.mdrrmc-org-chart * {
  box-sizing: border-box;
}

.mdrrmc-node,
.mdrrmc-person,
.mdrrmc-unit-title,
.mdrrmc-branch h4 {
  position: relative;
  border-radius: 12px;
  border: 1px solid var(--mdrrmc-blue-border);
  background: linear-gradient(180deg, #dff4f8, var(--mdrrmc-blue));
  color: #071f31;
  text-align: center;
  box-shadow: 0 8px 18px rgba(7, 31, 49, 0.12);
}

.mdrrmc-node {
  min-width: min(100%, 340px);
  padding: 14px 18px;
}

.mdrrmc-photo {
  display: block;
  width: 92px;
  height: 92px;
  margin: 0 auto 10px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.95);
  object-fit: cover;
  object-position: center top;
  background: #eef6f8;
  box-shadow: 0 8px 16px rgba(7, 31, 49, 0.18);
}

.mdrrmc-photo-blank {
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.7), rgba(225,242,247,0.9)),
    #eef6f8;
  border-style: dashed;
  box-shadow: inset 0 0 0 1px rgba(117, 180, 196, 0.25), 0 8px 16px rgba(7, 31, 49, 0.1);
}

.mdrrmc-photo-blank::before {
  content: "No ID photo";
  max-width: 58px;
  color: #60717a;
  font-family: "Source Sans 3", sans-serif;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.05;
  text-transform: uppercase;
}

.mdrrmc-node-kicker {
  display: inline-block;
  margin: 0 auto 6px;
  padding: 5px 16px;
  border-radius: 10px 10px 0 0;
  background: #9fd2df;
  border: 1px solid var(--mdrrmc-blue-border);
  color: #071f31;
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.mdrrmc-node strong,
.mdrrmc-person strong {
  display: block;
  font-family: "Montserrat", sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.15;
}

.mdrrmc-node small,
.mdrrmc-person small {
  display: block;
  margin-top: 2px;
  color: #111827;
  font-size: 12px;
  line-height: 1.2;
}

.mdrrmc-head::before,
.mdrrmc-unit::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -13px;
  width: 2px;
  height: 13px;
  background: var(--mdrrmc-line);
}

.mdrrmc-unit {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
}

.mdrrmc-unit-title {
  padding: 8px 22px;
  background: linear-gradient(180deg, #cef6ef, #9fded7);
  font-family: "Montserrat", sans-serif;
  font-weight: 900;
  text-transform: uppercase;
}

.mdrrmc-pair,
.mdrrmc-eoc-members {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 10px;
}

.mdrrmc-person {
  min-width: 170px;
  padding: 14px 12px;
}

.mdrrmc-person.support {
  background: linear-gradient(180deg, #e5f9e5, var(--mdrrmc-green));
  border-color: var(--mdrrmc-green-border);
}

.mdrrmc-branches {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 28px;
  width: 100%;
  padding-top: 28px;
  margin-top: 8px;
}

.mdrrmc-branches::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: var(--mdrrmc-line);
}

.mdrrmc-branch {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  align-self: start;
  height: auto;
  gap: 12px;
}

/* Chart branches are <section> elements; neutralize the site's global
   section padding and auto margins so every officer starts on one row. */
.mdrrmc-branches > .mdrrmc-branch {
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.mdrrmc-branch::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -20px;
  width: 2px;
  height: 20px;
  background: var(--mdrrmc-line);
}

.mdrrmc-branch h4 {
  width: 100%;
  min-height: 52px;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 8px 12px;
  font-size: 14px;
  line-height: 1.08;
  text-transform: uppercase;
}

.mdrrmc-eoc-members {
  grid-template-columns: repeat(3, minmax(128px, 1fr));
  gap: 12px;
  width: 100%;
}

.mdrrmc-eoc-members .mdrrmc-person {
  min-width: 0;
  padding: 12px 8px;
}

.mdrrmc-eoc-members .mdrrmc-photo {
  width: 82px;
  height: 82px;
  border-width: 3px;
}

.mdrrmc-eoc-members .mdrrmc-person strong {
  font-size: 11.5px;
}

.mdrrmc-nested-eoc {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 12px;
  width: 100%;
  padding-top: 20px;
}

.mdrrmc-nested-eoc::before,
.mdrrmc-nested-eoc > .mdrrmc-eoc-leader-row::before,
.mdrrmc-nested-eoc > .mdrrmc-eoc-members::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 20px;
  background: var(--mdrrmc-line);
}

.mdrrmc-nested-eoc > h4 {
  width: 100%;
}

.mdrrmc-nested-eoc > .mdrrmc-eoc-leader-row,
.mdrrmc-nested-eoc > .mdrrmc-eoc-members {
  position: relative;
  margin-top: 8px;
}

.mdrrmc-nested-eoc > .mdrrmc-eoc-leader-row::before,
.mdrrmc-nested-eoc > .mdrrmc-eoc-members::before {
  top: -20px;
  height: 20px;
}

.mdrrmc-nested-eoc .mdrrmc-eoc-members {
  grid-template-columns: repeat(3, minmax(100px, 1fr));
}

.mdrrmc-eoc-leader-row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 12px;
  width: 100%;
  padding-top: 20px;
}

/* EOC branches equally to Glenmar and Edgar. */
.mdrrmc-nested-eoc > .mdrrmc-eoc-leader-row::before {
  left: 50%;
  top: -20px;
  height: 30px;
}

.mdrrmc-eoc-leader-row::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 25%;
  right: 25%;
  height: 2px;
  background: var(--mdrrmc-line);
}

.mdrrmc-eoc-leader-row > .mdrrmc-person::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -10px;
  width: 2px;
  height: 10px;
  background: var(--mdrrmc-line);
}

/* Only Glenmar's side continues to Abe, Drimar, and Kheysa. */
.mdrrmc-nested-eoc > .mdrrmc-eoc-members {
  padding-top: 20px;
}

.mdrrmc-nested-eoc > .mdrrmc-eoc-members::before {
  left: 25%;
  top: -20px;
  height: 30px;
}

.mdrrmc-eoc-members::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 16.666%;
  right: 16.666%;
  height: 2px;
  background: var(--mdrrmc-line);
}

.mdrrmc-eoc-members > .mdrrmc-person::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -10px;
  width: 2px;
  height: 10px;
  background: var(--mdrrmc-line);
}

.mdrrmc-nested-eoc .mdrrmc-eoc-additional-members {
  grid-template-columns: repeat(4, minmax(88px, 1fr));
  width: 100%;
  padding-top: 20px;
}

.mdrrmc-nested-eoc > .mdrrmc-eoc-additional-members::before {
  left: 50%;
  top: -20px;
  height: 30px;
}

.mdrrmc-eoc-additional-members::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: var(--mdrrmc-line);
}

.mdrrmc-photo-placeholder {
  display: grid;
  place-items: center;
  border: 3px solid #ffffff;
  background: linear-gradient(145deg, #dff6ef, #b8e8d5);
  color: #14532d;
  font-size: 1rem;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.mdrrmc-eoc-additional-members .mdrrmc-photo {
  object-position: center 22%;
}

@media (max-width: 640px) {
  .mdrrmc-nested-eoc .mdrrmc-eoc-additional-members {
    grid-template-columns: repeat(2, minmax(110px, 1fr));
  }

  .mdrrmc-eoc-additional-members::after,
  .mdrrmc-eoc-additional-members > .mdrrmc-person::before {
    display: none;
  }
}

/* Mobile EOC navigation: off-canvas drawer + always-reachable quick actions. */
.mobile-nav-backdrop,
.mobile-eoc-dock { display: none; }

@media (max-width: 980px) {
  body { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important; }
  body.mobile-menu-open { overflow: hidden !important; touch-action: none; }

  .site-header nav.layer-top-nav.header-nav,
  nav.layer-top-nav.header-nav,
  .site-header .layer-top-nav.header-nav,
  .layer-top-nav.header-nav {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    width: min(88vw, 360px) !important;
    max-width: 360px !important;
    height: 100dvh !important;
    padding: calc(12px + env(safe-area-inset-top, 0px)) 12px calc(24px + env(safe-area-inset-bottom, 0px)) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
    background: linear-gradient(180deg, #071426, #0f2037) !important;
    box-shadow: 18px 0 48px rgba(2, 6, 23, .38) !important;
    transform: translateX(-105%) !important;
    transition: transform 220ms ease !important;
    z-index: 10020 !important;
  }
  .layer-top-nav.header-nav.mobile-nav-open { transform: translateX(0) !important; }
  .mobile-eoc-quick-nav { position: sticky !important; top: 0; z-index: 3; border-radius: 12px 12px 0 0; }

  #mobileNavToggle,
  .site-header #mobileNavToggle,
  .mobile-nav-toggle {
    position: sticky !important;
    top: calc(64px + env(safe-area-inset-top, 0px)) !important;
    z-index: 3 !important;
    min-height: 50px !important;
    border-radius: 0 0 12px 12px !important;
  }

  .layer-top-nav.header-nav #mobilePrimaryNav,
  .layer-top-nav.header-nav.mobile-nav-open #mobilePrimaryNav,
  .layer-top-nav.header-nav.mobile-nav-collapsed #mobilePrimaryNav {
    position: static !important;
    display: grid !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    padding: 12px 0 28px !important;
    overflow: visible !important;
  }

  .mobile-nav-backdrop {
    position: fixed; inset: 0; width: 100%; height: 100%; padding: 0; border: 0;
    background: rgba(2, 6, 23, .62); backdrop-filter: blur(2px); opacity: 0;
    pointer-events: none; transition: opacity 180ms ease; z-index: 10010;
  }
  body.mobile-menu-open .mobile-nav-backdrop { display: block; opacity: 1; pointer-events: auto; }

  .mobile-eoc-dock {
    position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    z-index: 9990; min-height: 64px; padding: 6px; display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px;
    border: 1px solid rgba(148, 163, 184, .35); border-radius: 17px;
    background: rgba(7, 20, 38, .96); box-shadow: 0 12px 34px rgba(2, 6, 23, .42);
    backdrop-filter: blur(14px);
  }
  .mobile-eoc-dock button,
  .mobile-eoc-dock a {
    min-width: 0 !important; min-height: 52px !important; padding: 5px 2px !important;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    border: 0 !important; border-radius: 11px !important; color: #eaf2ff !important;
    background: transparent !important; text-decoration: none; font-size: 20px !important; line-height: 1 !important;
  }
  .mobile-eoc-dock small { font-size: 10px; line-height: 1.15; font-weight: 850; white-space: nowrap; }
  .mobile-eoc-dock [data-mobile-action="alerts"] span,
  .mobile-eoc-dock a span { color: #fbbf24; }
  .mobile-eoc-dock [aria-expanded="true"],
  .mobile-eoc-dock button:active,
  .mobile-eoc-dock a:active { background: rgba(56, 189, 248, .2) !important; }
  body.mobile-menu-open .mobile-eoc-dock { visibility: hidden; }

  .eoc-nav-group-toggle,
  .eoc-nav-group .layer-tile,
  .eoc-nav-group .layer-btn,
  .eoc-nav-group .nav-submenu-item,
  .eoc-accordion-nav > .layer-tile,
  .eoc-accordion-nav > .layer-btn { min-height: 48px !important; }
}

/* Keep the complete seven-member EOC team on one organizational level. */
@media (min-width: 1001px) {
  .mdrrmc-nested-eoc .mdrrmc-eoc-all-members {
    grid-template-columns: repeat(7, minmax(105px, 1fr));
  }

  .mdrrmc-eoc-all-members::after {
    left: 7.142%;
    right: 7.142%;
  }
}

.mdrrmc-eoc-full-width {
  margin-top: 32px;
  padding-top: 24px;
}

.mdrrmc-eoc-full-width::before {
  left: 20.5%;
  top: 0;
  height: 24px;
}

@media (min-width: 1001px) {
  .mdrrmc-eoc-full-width::before {
    top: -220px;
    height: 244px;
  }
}

.mdrrmc-eoc-full-width > h4 {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  min-height: 56px;
  margin: 0;
  place-items: center;
  border: 1px solid var(--mdrrmc-blue-border);
  border-radius: 12px;
  background:
    linear-gradient(100deg, #c8eef5 0%, #a9dfeb 48%, #c8eef5 100%);
  color: #071f31;
  box-shadow: 0 8px 18px rgba(7, 31, 49, 0.12);
  font-family: "Montserrat", sans-serif;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.035em;
  text-align: center;
  text-transform: uppercase;
}

.mdrrmc-eoc-full-width > h4::before {
  content: "OPERATIONS AND WARNING SECTION";
  display: block;
  margin-bottom: 2px;
  color: #16718a;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.mdrrmc-eoc-full-width > .mdrrmc-eoc-leader-row {
  max-width: 720px;
}

.mdrrmc-eoc-full-width > .mdrrmc-eoc-all-members::before {
  left: 50%;
}

.mdrrmc-eoc-full-width > .mdrrmc-eoc-all-members {
  margin-top: 14px;
}

@media (max-width: 1000px) {
  #aboutPage .org-chart-document-layout {
    width: min(100%, calc(100vw - 32px));
  }

  .mdrrmc-branches {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .mdrrmc-branches::before {
    display: none;
  }
}

@media (max-width: 620px) {
  .mdrrmc-org-chart {
    padding: 14px;
  }

  .mdrrmc-branches,
  .mdrrmc-pair,
  .mdrrmc-eoc-members {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .pdf-org-chart {
    padding-left: 10px;
    padding-right: 10px;
  }

  .pdf-org-chart::before {
    position: static;
    display: block;
    max-width: none;
    margin: 22px 0 10px;
    text-align: center;
    font-size: 15px;
  }

  .org-node-top {
    margin-top: 10px;
  }
}

.contact-service-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.96), rgba(239,248,255,0.95));
}

.contact-service-card a {
  color: #083b7a;
  font-weight: 700;
}

.contact-lines {
  display: grid;
  gap: 10px;
}

.contact-line strong {
  display: inline-block;
  min-width: 130px;
  color: #062c63;
}

.about-page {
  max-width: 1320px;
  padding-top: 18px;
}

.layer-header.about {
  background: linear-gradient(135deg, #0f3a5b, #16837a, #d8992f);
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
}

.about-hero-panel {
  display: grid;
  grid-template-columns: minmax(300px, 370px) minmax(0, 1fr);
  gap: 0;
  margin: 24px auto 28px;
  border-radius: 22px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.95), rgba(241,248,250,0.95)),
    radial-gradient(circle at top right, rgba(56,189,248,0.16), transparent 36%);
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.16);
  border: 1px solid rgba(15, 95, 120, 0.14);
  max-width: 1180px;
}

.about-logo-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  padding: 34px 28px;
  background:
    linear-gradient(180deg, rgba(9, 51, 78, 0.95), rgba(15, 83, 71, 0.94)),
    url("images/site_background.jpg") center / cover no-repeat;
  text-align: center;
  isolation: isolate;
}

.about-logo-panel::before {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.11), rgba(255,255,255,0.04));
  z-index: -1;
}

.about-logo-panel img {
  width: min(230px, 78%);
  max-height: 250px;
  object-fit: contain;
  margin-bottom: 24px;
  padding: 18px;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 24px;
  box-shadow: 0 18px 34px rgba(0,0,0,0.28);
}

.about-logo-panel h2 {
  margin: 0 0 8px;
  color: #ffffff !important;
  font-size: 30px;
  font-weight: 950;
  letter-spacing: 0.01em;
  text-shadow: 0 3px 10px rgba(0,0,0,0.35);
}

.about-logo-panel p {
  margin: 0 0 24px;
  color: rgba(236, 253, 245, 0.9) !important;
  font-weight: 800;
  line-height: 1.55;
}

.about-logo-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 210px;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 999px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #f8b84e, #c87918) !important;
  color: #fff !important;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 14px 28px rgba(5, 18, 29, 0.28);
  cursor: pointer;
  font: inherit;
}

.partner-agency-strip {
  width: 100%;
  max-width: 300px;
  margin-top: 24px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.58);
  box-shadow: 0 14px 26px rgba(5, 18, 29, 0.24);
}

.partner-strip-title {
  display: block;
  margin-bottom: 10px;
  color: #0f3a5b !important;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.partner-agency-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.partner-agency-logo {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.about-logo-panel .partner-agency-logo img {
  width: 46px;
  height: 46px;
  max-height: none;
  margin: 0;
  padding: 5px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid rgba(15, 58, 91, 0.12);
  border-radius: 50%;
  box-shadow: 0 8px 14px rgba(15, 23, 42, 0.16);
}

.partner-agency-logo span {
  color: #17324a !important;
  font-size: 10px;
  font-weight: 950;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.partner-agency-badge strong {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f8fafc, #dbeafe);
  border: 1px solid rgba(15, 58, 91, 0.16);
  box-shadow: 0 8px 14px rgba(15, 23, 42, 0.16);
  color: #0f3a5b;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  text-align: center;
}

.news-activity-gallery-panel {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(14, 165, 233, 0.28);
  border-radius: 8px;
  background: #f8fafc;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.news-gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.news-gallery-header strong,
.news-gallery-empty strong {
  display: block;
  color: #0f172a;
  font-size: 16px;
  font-weight: 900;
}

.news-gallery-header span,
.news-gallery-empty span {
  display: block;
  color: #475569;
  font-size: 13px;
  margin-top: 3px;
}

.news-gallery-header button {
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  background: #a66f2b;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.news-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.news-gallery-image {
  display: block;
  text-decoration: none;
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
}

.news-gallery-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #e2e8f0;
}

.news-gallery-image span {
  display: block;
  margin-top: 5px;
}

#aboutPage .about-logo-panel .partner-agency-logo img {
  width: 46px !important;
  height: 46px !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 5px !important;
  object-fit: contain !important;
  background: #ffffff !important;
  border: 1px solid rgba(15, 58, 91, 0.12) !important;
  border-radius: 50% !important;
  box-shadow: 0 8px 14px rgba(15, 23, 42, 0.16) !important;
}

.about-menu-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(230px, 1fr));
  gap: 18px;
  padding: 44px;
  align-content: center;
  justify-content: center;
  justify-items: center;
  background:
    radial-gradient(circle at top left, rgba(14,165,233,0.10), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,0.72), rgba(248,250,252,0.9));
}

.about-menu-card {
  --about-card-accent: #0ea5e9;
  width: 100%;
  max-width: 320px;
  min-height: 154px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 18px;
  text-align: center;
  text-decoration: none;
  color: #17324a !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.96)) !important;
  border: 1px solid rgba(15, 65, 95, 0.12) !important;
  border-top: 5px solid var(--about-card-accent) !important;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  cursor: pointer;
  font: inherit;
  overflow: hidden;
}

.about-menu-card:nth-child(1) { --about-card-accent: #0ea5e9; }
.about-menu-card:nth-child(2) { --about-card-accent: #14b8a6; }
.about-menu-card:nth-child(3) { --about-card-accent: #8b5cf6; }
.about-menu-card:nth-child(4) { --about-card-accent: #f59e0b; }
.about-menu-card:nth-child(5) { --about-card-accent: #22c55e; }

.about-menu-card::after {
  content: "";
  position: absolute;
  inset: auto -24px -40px auto;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--about-card-accent) 16%, transparent);
  pointer-events: none;
}

.about-menu-card:hover,
.about-menu-card.active {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--about-card-accent) 45%, white) !important;
  box-shadow: 0 20px 38px rgba(15,23,42,0.16);
}

.about-menu-card.active {
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--about-card-accent) 12%, white), #ffffff) !important;
}

.about-menu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--about-card-accent) 16%, white);
  border: 1px solid color-mix(in srgb, var(--about-card-accent) 22%, white);
  font-size: 28px;
  line-height: 1;
  filter: none;
}

.about-menu-card strong {
  display: block;
  color: #12324a !important;
  font-size: 20px;
  font-weight: 950;
}

.about-menu-card small {
  max-width: 260px;
  color: #475569 !important;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.45;
}

.about-section-grid,
.about-objectives-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 22px 0;
}

.about-info-card,
.about-guidelines-card,
.about-targets-card,
.about-objective-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.96));
  border: 1px solid rgba(15, 65, 95, 0.12);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 16px 34px rgba(15,23,42,0.08);
}

.about-info-card.wide {
  min-height: 230px;
  border-top: 5px solid #0ea5e9;
}

.about-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 6px 10px;
  color: #075985 !important;
  background: #e0f2fe;
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about-info-card h3,
.about-guidelines-card h3,
.about-targets-card h3,
.about-objective-card h4 {
  margin: 0 0 12px;
  color: #102f47 !important;
  font-weight: 950;
}

.about-info-card p,
.about-guidelines-card p,
.about-objective-card p {
  margin: 0;
  color: #334155 !important;
  line-height: 1.7;
  font-weight: 650;
}

.about-info-card p + p,
.about-guidelines-card p + p,
.about-objective-card p + p {
  margin-top: 14px;
}

.about-guidelines-card {
  display: grid;
  grid-template-columns: 0.9fr 1.3fr;
  gap: 24px;
  align-items: start;
  border-left: 6px solid #14b8a6;
}

.about-goal-list {
  display: grid;
  gap: 10px;
}

.about-goal-list span {
  display: block;
  padding: 11px 13px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8fafc, #ecfeff);
  color: #1f2937 !important;
  font-weight: 750;
  border: 1px solid rgba(14, 116, 144, 0.12);
}

.about-target-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.about-target-grid div {
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(145deg, #ecfdf5, #eff6ff);
  border: 1px solid rgba(20,83,45,0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
}

.about-target-grid strong {
  display: block;
  color: #0f766e !important;
  font-size: 28px;
  font-weight: 950;
  margin-bottom: 6px;
}

.about-target-grid span {
  color: #334155 !important;
  font-weight: 700;
  line-height: 1.45;
}

.about-citizen-charter-anchor {
  height: 1px;
  scroll-margin-top: 90px;
}

.about-detail-section {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

#about-logo.about-detail-section {
  margin-bottom: 96px;
}

#about-logo p {
  line-height: 1.78;
}

#aboutPage .charter-hero,
#aboutPage .charter-note,
#aboutPage .charter-guidelines-note,
#aboutPage .charter-service-card,
#aboutPage .charter-org-card,
#aboutPage .charter-summary-grid {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.messenger-link-btn{
  border:none;
  background:#0084ff;
  color:#fff;
  padding:10px 14px;
  border-radius:999px;
  font-weight:700;
  cursor:pointer;
  box-shadow:0 6px 16px rgba(0,132,255,0.22);
}

.messenger-link-btn:hover{
  background:#006fe0;
}

@media (max-width: 900px) {
  .about-hero-panel,
  .about-guidelines-card,
  .about-section-grid,
  .about-objectives-grid,
  .about-target-grid {
    grid-template-columns: 1fr;
  }

  .about-logo-panel {
    min-height: auto;
  }

  .partner-agency-strip {
    max-width: 340px;
  }

  .about-logo-panel .partner-agency-logo img {
    width: 50px;
    height: 50px;
  }

  .about-menu-panel {
    grid-template-columns: 1fr;
    padding: 28px 20px;
  }

  .charter-hero {
    flex-direction: column;
  }

  .earthquake-layout {
    grid-template-columns: 1fr;
  }

  .volcano-layout,
  .volcano-summary-grid,
  .agency-facebook-updates-grid {
    grid-template-columns: 1fr;
  }

  .flow-row {
    grid-template-columns: 1fr;
  }

  .flow-arrow {
    transform: rotate(90deg);
  }

  .header-badge.live-clock {
    min-width: 0;
  }
}
/* 🔥 FIX: HEAT INDEX GRID WRAP */
#heatIndexGrid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.forecast-card {
  min-width: 90px;
  background: #f8f9fa;
  padding: 10px;
  border-radius: 10px;
  text-align: center;
  border: 1px solid #dee2e6;
}
@media (max-width: 768px){
  .dashboard-grid > div {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .card {
    position: relative;
    z-index: 1;

    backdrop-filter: blur(2px);
    background: rgba(255, 255, 255, 0.92);
    padding: 20px;
    border-left: 6px solid #083b7a;
    margin-top: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);

    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  /* 🔥 BONUS FIX — EXACT LOCATION (INSIDE MOBILE BLOCK) */
  .pagasa-typhoon-card,
  .pagasa-cyclone-card,
  .weather-advisory-card,
  .windy-card,
  .earthquake-card,
  .opcen-log-card,
  .incident-card,
  .news-24oras-card,
  .tv-patrol-card,
  .ventusky-card,
  .evacuation-card,
  .drrm-downloads-card {
        backdrop-filter: none !important;
  }
}

/* Additional author CSS from body style block */
/* NATIONAL NEWS WIDTH CONTROL */

.news-wrapper{
max-width:900px;   /* controls total width */
margin:auto;       /* center horizontally */
}

.news-monitor-grid{
display:grid;
grid-template-columns:1fr 1fr;
gap:20px;
margin-top:15px;
}

@media (max-width:768px){
.news-monitor-grid{
grid-template-columns:1fr;
}
}
.layer-top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 10px 16px;
  background: linear-gradient(135deg, #062c63, #083b7a);

  border-bottom: 3px solid #ffeb3b;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}

/* INTERACTIVE NAVIGATION STYLING - HIGH SPECIFICITY */
.layer-top-nav .nav-links a,
.layer-top-nav .nav-links button,
.header-nav .nav-links a,
.header-nav .nav-links button {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 12px 16px !important;
  border-radius: 12px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #e5e7eb !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer !important;
  text-align: left !important;
  width: 100% !important;
  position: relative !important;
  overflow: hidden !important;
  transform: translateX(0) !important;
}

.layer-top-nav .nav-links a::before,
.layer-top-nav .nav-links button::before,
.header-nav .nav-links a::before,
.header-nav .nav-links button::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: -100% !important;
  width: 100% !important;
  height: 100% !important;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent) !important;
  transition: left 0.5s ease !important;
}

.layer-top-nav .nav-links a:hover::before,
.layer-top-nav .nav-links button:hover::before,
.header-nav .nav-links a:hover::before,
.header-nav .nav-links button:hover::before {
  left: 100% !important;
}

.layer-top-nav .nav-links a:hover,
.layer-top-nav .nav-links button:hover,
.header-nav .nav-links a:hover,
.header-nav .nav-links button:hover {
  background: rgba(255,255,255,0.12) !important;
  transform: translateX(4px) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

.layer-top-nav .nav-links a:active,
.layer-top-nav .nav-links button:active,
.header-nav .nav-links a:active,
.header-nav .nav-links button:active {
  transform: translateX(2px) scale(0.98) !important;
  transition: all 0.1s ease !important;
}

.layer-top-nav .nav-links a.active,
.layer-top-nav .nav-links button.active,
.header-nav .nav-links a.active,
.header-nav .nav-links button.active {
  background: linear-gradient(135deg, #b17a3a, #9a6a32) !important;
  color: #fff !important;
  box-shadow: 0 6px 20px rgba(177, 122, 58, 0.3) !important;
  transform: translateX(4px) !important;
}

.layer-top-nav .nav-links a.active::after,
.layer-top-nav .nav-links button.active::after,
.header-nav .nav-links a.active::after,
.header-nav .nav-links button.active::after {
  content: '' !important;
  position: absolute !important;
  left: 0 !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 4px !important;
  height: 24px !important;
  background: #fff !important;
  border-radius: 2px !important;
  animation: pulse 2s infinite !important;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.layer-top-nav .nav-links a i,
.layer-top-nav .nav-links button i,
.header-nav .nav-links a i,
.header-nav .nav-links button i {
  width: 20px !important;
  text-align: center !important;
  font-size: 18px !important;
  transition: transform 0.3s ease !important;
}

.layer-top-nav .nav-links a:hover i,
.layer-top-nav .nav-links button:hover i,
.header-nav .nav-links a:hover i,
.header-nav .nav-links button:hover i {
  transform: scale(1.2) rotate(5deg) !important;
}

.layer-top-nav .nav-links a.active i,
.layer-top-nav .nav-links button.active i,
.header-nav .nav-links a.active i,
.header-nav .nav-links button.active i {
  transform: scale(1.1) !important;
  animation: iconBounce 0.6s ease !important;
}

@keyframes iconBounce {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.3) rotate(-5deg); }
}

/* RIPPLE EFFECT FOR NAVIGATION */
.nav-links a,
.nav-links button {
  position: relative;
  overflow: hidden;
}

.nav-links a .ripple,
.nav-links button .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: scale(0);
  animation: ripple 0.6s ease-out;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ENHANCED MOBILE NAVIGATION */
.mobile-nav-toggle {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.mobile-nav-toggle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
}

.mobile-nav-toggle:hover::before {
  width: 100%;
  height: 100%;
}

.mobile-nav-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.mobile-nav-toggle:active {
  transform: scale(0.98);
}

/* MOBILE NAVIGATION SLIDE-IN ANIMATION */
@media (max-width: 768px) {
  .header-nav.mobile-nav-collapsed .nav-links {
    transform: translateX(-100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .header-nav:not(.mobile-nav-collapsed) .nav-links {
    transform: translateX(0);
    opacity: 1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .nav-links button,
  .nav-links a {
    transform: translateX(-20px);
    opacity: 0;
    animation: slideInNav 0.4s ease-out forwards;
  }
  
  .nav-links button:nth-child(1),
  .nav-links a:nth-child(1) { animation-delay: 0.1s; }
  .nav-links button:nth-child(2),
  .nav-links a:nth-child(2) { animation-delay: 0.15s; }
  .nav-links button:nth-child(3),
  .nav-links a:nth-child(3) { animation-delay: 0.2s; }
  .nav-links button:nth-child(4),
  .nav-links a:nth-child(4) { animation-delay: 0.25s; }
  .nav-links button:nth-child(5),
  .nav-links a:nth-child(5) { animation-delay: 0.3s; }
  .nav-links button:nth-child(6),
  .nav-links a:nth-child(6) { animation-delay: 0.35s; }
  .nav-links button:nth-child(7),
  .nav-links a:nth-child(7) { animation-delay: 0.4s; }
  .nav-links button:nth-child(8),
  .nav-links a:nth-child(8) { animation-delay: 0.45s; }
  .nav-links button:nth-child(9),
  .nav-links a:nth-child(9) { animation-delay: 0.5s; }
  .nav-links button:nth-child(10),
  .nav-links a:nth-child(10) { animation-delay: 0.55s; }
}

@keyframes slideInNav {
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* NAVIGATION BADGE ANIMATIONS */
.nav-links button[data-page].new-item::after,
.nav-links a[data-page].new-item::after {
  content: 'NEW';
  position: absolute;
  right: 12px;
  top: 8px;
  background: #ef4444;
  color: white;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 10px;
  animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* NAVIGATION LOADING STATES */
.nav-links a.loading,
.nav-links button.loading {
  pointer-events: none;
  opacity: 0.7;
}

.nav-links a.loading::after,
.nav-links button.loading::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

/* SIDEBAR LAYOUT FIX */
.layer-top-nav {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.utility-menu {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.nav-brand {
  color: white;
  font-weight: bold;
}

.nav-status {
  color: white;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.layer-btn {
  background: white;
  border: none;
  padding: 8px 14px;
  border-radius: 20px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.layer-btn:hover {
  background: #ffc107;
}
.layer-btn.active {
  background: #0d6efd;
  color: white;
}

/* ✅ ADD IT HERE — EXACT SPOT */
.layer-header {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.layer-header:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.3);
}

.layer-btn {
  transition: transform 0.2s ease;
}

.layer-btn:active {
  transform: scale(0.95);
}
/* 🎯 COLOR-CODED EOC BUTTONS */

.dashboard-btn {
  background: #0d6efd;   /* BLUE */
  color: white;
}

.operations-btn {
  background: #dc3545;   /* RED */
  color: white;
}

.public-btn {
  background: #198754;   /* GREEN */
  color: white;
}

.intelligence-btn {
  background: #fd7e14;   /* ORANGE */
  color: white;
}

/* Hover effect */
.layer-btn:hover {
  opacity: 0.85;
}

/* ACTIVE STATE (STRONGER) */
.layer-btn.active {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  border: 2px solid #fff;
}
@keyframes pulseBtn {
  0% {
    box-shadow: 0 0 0 0 rgba(13,110,253, 0.7);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(13,110,253, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(13,110,253, 0);
  }
}

/* 🌦 WEATHER UI (LEVEL 1) */
.weather-selector{
  display:flex;
  gap:10px;
  margin-bottom:15px;
}

.weather-selector div{
  flex:1;
  display:flex;
  flex-direction:column;
}

.weather-selector select{
  padding:6px;
  border-radius:6px;
  border:1px solid #ccc;
}

.indicator-row{
  display:flex;
  gap:10px;
  overflow-x:auto;
  margin-bottom:15px;
}

.indicator{
  min-width:80px;
  background:#f5f5f5;
  border-radius:10px;
  padding:10px;
  text-align:center;
  font-size:12px;
}

.forecast-grid{
  display:grid;
  grid-template-columns: repeat(2,1fr);
  gap:10px;
}



/* 🌦 FORECAST GRID (INTEGRATED) */
.forecast-grid{
  display:grid;
  grid-template-columns: repeat(2,1fr);
  gap:10px;
  margin-top:10px;
}

.forecast-card{
  background:#eaf5e6;
  border-radius:10px;
  padding:10px;
  text-align:center;
}

@media (min-width:768px){
  .forecast-grid{
    grid-template-columns: repeat(5,1fr);
  }
}
/* 🔧 FIX: WEATHER FORECAST TEXT VISIBILITY */
.forecast-card,
.forecast-card * {
  color: #083b7a !important;   /* MDRRMO blue */
  opacity: 1 !important;
  text-shadow: none !important;
}

/* Restore readable text inside light weather cards while keeping title ribbons white */
.pagasa-typhoon-card p,
.pagasa-typhoon-card li,
.pagasa-typhoon-card span,
.pagasa-typhoon-card strong,
.pagasa-cyclone-card p,
.pagasa-cyclone-card li,
.pagasa-cyclone-card span,
.pagasa-cyclone-card strong,
.weather-advisory-card p,
.weather-advisory-card li,
.weather-advisory-card span,
.weather-advisory-card strong {
  color: #16324f !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

.pagasa-typhoon-card .section-title,
.pagasa-cyclone-card .section-title,
.weather-advisory-card .section-title {
  color: #ffffff !important;
}

/* Improve readability */
.forecast-card .date {
  font-weight: bold;
  font-size: 14px;
}

.forecast-card .temp {
  font-size: 16px;
  font-weight: bold;
}

.forecast-card .rain {
  font-size: 12px;
}
/* 🔧 WEATHER CARD BACKGROUND FIX */
.forecast-card{
  background:#ffffff;   /* clean readable */
}
/* 🔧 INDICATOR TEXT FIX */
.indicator,
.indicator * {
  color: #083b7a !important;
  opacity: 1 !important;
}
#forecast-grid {
  position: relative;
  z-index: 5;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(150px, 1fr)) !important;
  gap: 12px !important;
  align-items: stretch;
}

#forecastRiskBanner {
  position: relative;
  z-index: 5;
}

.forecast-risk-banner {
  padding: 14px 16px;
  border-radius: 8px;
  color: #ffffff !important;
  font-weight: 950;
  margin-bottom: 14px;
  text-align: center;
  background: #198754;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.forecast-briefing {
  display: grid;
  grid-template-columns: 1.25fr 1.25fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.forecast-briefing > div {
  min-height: 96px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(8, 59, 122, 0.24);
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a !important;
}

.forecast-briefing-label {
  display: block;
  margin-bottom: 8px;
  color: #063970 !important;
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}

.forecast-briefing strong {
  display: block;
  color: #0f172a !important;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 850;
}

.forecast-card {
  min-height: 252px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px !important;
  border: 1px solid rgba(8, 59, 122, 0.24);
  border-radius: 12px !important;
  background: #ffffff !important;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.forecast-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.forecast-card-head strong {
  color: #062c63 !important;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 950;
}

.forecast-risk-chip {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  color: #ffffff !important;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.32);
}

.forecast-condition {
  color: #172033 !important;
  font-size: 15px;
  font-weight: 900;
}

.forecast-temp {
  color: #062c63 !important;
  font-size: 28px;
  line-height: 1.05;
  font-weight: 950;
}

.forecast-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.forecast-metrics span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 8px;
  background: #eef4fb;
  color: #0f172a !important;
  border: 1px solid rgba(8, 59, 122, 0.1);
}

.forecast-metrics b {
  color: #062c63 !important;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 950;
}

.forecast-metrics small {
  color: #26384f !important;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 900;
}

.forecast-action {
  margin: auto 0 0;
  color: #101828 !important;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 750;
}

.forecast-loading {
  grid-column: 1 / -1;
  padding: 18px;
  border-radius: 10px;
  background: rgba(255,255,255,0.84);
  color: #062c63;
  font-size: 16px;
  font-weight: 950;
  text-align: center;
}

.forecast-error {
  color: #b42318;
}

@media (max-width: 1200px) {
  #forecast-grid {
    grid-template-columns: repeat(3, minmax(160px, 1fr)) !important;
  }
}

@media (max-width: 768px) {
  .forecast-briefing {
    grid-template-columns: 1fr;
  }

  #forecast-grid {
    grid-template-columns: 1fr !important;
  }
}
#globalAlertBar{
  text-align:center;
  padding:12px 14px;
  font-weight:bold;
  font-size:18px;
  transition:0.3s;
  border-radius:14px;
}

/* ===================================== */
   /* TRAINING & ONBOARDING STYLING */
/* ===================================== */

/* Training Hero Section */
.training-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #083b7a, #0d6efd);
  color: white !important;
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 30px;
}

.training-hero h3 {
  margin: 0 0 10px 0;
  font-size: 24px !important;
  font-weight: 700 !important;
  color: white !important;
}

.training-hero p {
  color: white !important;
  font-size: 16px !important;
  line-height: 1.5 !important;
}

.training-progress-overview {
  min-width: 200px;
}

.progress-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.progress-title {
  font-size: 14px;
  opacity: 0.9;
}

.progress-percentage {
  font-weight: bold;
  font-size: 16px;
}

.progress-bar {
  background: rgba(255, 255, 255, 0.2);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  background: #4caf50;
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.training-progress-detail {
  margin-top: 9px;
  font-size: 0.78rem;
  font-weight: 800;
  opacity: 0.9;
}

.training-pathways,
.training-readiness-check {
  margin: 20px 0 24px;
  border: 1px solid rgba(8, 59, 122, 0.14);
  border-radius: 14px;
  background: #ffffff;
  padding: 22px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.training-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.training-section-heading h3,
.training-readiness-check h3 {
  margin: 3px 0 0;
  color: #102a43;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  line-height: 1.2;
}

.training-section-heading p {
  max-width: 520px;
  margin: 0;
  color: #475569;
  line-height: 1.5;
}

.training-eyebrow,
.training-path-role {
  display: block;
  color: #0b5aa5;
  font-size: 0.75rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.training-path-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.training-path-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  min-width: 0;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-top: 5px solid #0d6efd;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  padding: 18px;
}

.training-path-card.officer-path { border-top-color: #b45309; }
.training-path-card.network-path { border-top-color: #15803d; }

.training-path-number {
  color: rgba(8, 59, 122, 0.22);
  font-size: 2rem;
  font-weight: 950;
  line-height: 1;
}

.training-path-card h4 {
  margin: 7px 0 10px;
  color: #0f172a;
  font-size: 1.08rem;
  line-height: 1.3;
}

.training-path-card ul {
  margin: 0;
  padding-left: 20px;
  color: #475569;
  line-height: 1.5;
}

.training-path-card li + li { margin-top: 6px; }

.training-path-card button,
.training-simulation-shortcut {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 9px;
  background: #083b7a;
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
}

.training-readiness-check {
  display: grid;
  grid-template-columns: minmax(210px, 0.7fr) minmax(0, 1.6fr) minmax(170px, 0.45fr);
  align-items: center;
  gap: 22px;
  background: linear-gradient(135deg, #eff6ff, #f0fdf4);
}

.training-readiness-check ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: readiness;
}

.training-readiness-check li {
  counter-increment: readiness;
  position: relative;
  min-width: 0;
  padding-left: 34px;
  color: #475569;
  line-height: 1.4;
}

.training-readiness-check li::before {
  content: counter(readiness);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #0b5aa5;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 950;
}

.training-readiness-check li strong,
.training-readiness-check li span {
  display: block;
}

@media (max-width: 980px) {
  .training-path-grid,
  .training-readiness-check {
    grid-template-columns: 1fr;
  }

  .training-section-heading {
    display: grid;
    align-items: start;
  }
}

@media (max-width: 620px) {
  .training-pathways,
  .training-readiness-check {
    padding: 15px;
    border-radius: 10px;
  }

  .training-readiness-check ol {
    grid-template-columns: 1fr;
  }
}

.training-update-panel {
  margin: 18px 0 22px;
  padding: 18px;
  border: 1px solid rgba(22, 163, 74, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(236, 253, 245, 0.96), rgba(255, 251, 235, 0.92)),
    #ffffff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.training-update-panel h3 {
  margin: 0 0 14px;
  color: #102a21;
  font-size: 1.25rem;
  font-weight: 950;
}

.training-update-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.training-update-grid article {
  padding: 14px;
  border-left: 5px solid #16a34a;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.training-update-grid strong,
.training-update-grid span {
  display: block;
}

.training-update-grid strong {
  color: #14532d;
  font-weight: 950;
}

.training-update-grid span {
  margin-top: 6px;
  color: #334155;
  font-size: 0.92rem;
  line-height: 1.45;
  font-weight: 700;
}

/* Training Tabs */
.training-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 0;
}

.tab-btn {
  background: #f8f9fa !important;
  border: 1px solid #e0e0e0 !important;
  padding: 12px 20px !important;
  cursor: pointer;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #333 !important;
  border-bottom: 3px solid transparent !important;
  transition: all 0.3s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px 8px 0 0 !important;
  margin-right: 2px;
}

.tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #f5f5f5;
  border-radius: 6px;
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #083b7a !important;
  border: 1px solid #e0e0e0;
}

.tab-btn:hover {
  color: #083b7a !important;
  background: #e3f2fd !important;
  border-color: #083b7a !important;
}

.tab-btn:hover .tab-icon {
  background: #083b7a !important;
  color: white !important;
  border-color: #083b7a !important;
}

.tab-btn.active {
  color: white !important;
  border-bottom-color: #083b7a !important;
  background: #083b7a !important;
  border-color: #083b7a !important;
}

.tab-btn.active .tab-icon {
  background: white !important;
  color: #083b7a !important;
  border-color: white !important;
}

/* Training Content */
.training-content {
  display: none;
}

.training-content.active {
  display: block;
}

/* Tutorial Grid */
.tutorial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.tutorial-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tutorial-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.tutorial-icon {
  font-size: 48px;
  margin-bottom: 15px;
  text-align: center;
}

.tutorial-card h4 {
  margin: 0 0 10px 0;
  color: #083b7a !important;
  font-size: 18px !important;
  font-weight: 700 !important;
}

.tutorial-card p {
  margin: 0 0 15px 0;
  color: #333 !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
}

.tutorial-meta {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.difficulty {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.difficulty.beginner {
  background: #e8f5e8;
  color: #2e7d32;
}

.difficulty.intermediate {
  background: #fff3e0;
  color: #f57c00;
}

.difficulty.advanced {
  background: #ffebee;
  color: #c62828;
}

.duration {
  padding: 4px 8px;
  background: #f5f5f5;
  border-radius: 12px;
  font-size: 12px;
  color: #666;
}

.tutorial-btn {
  background: linear-gradient(135deg, #083b7a, #0d6efd);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  width: 100%;
  transition: all 0.3s ease;
}

.tutorial-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Simulation Styles */
.simulation-header {
  text-align: center;
  margin-bottom: 30px;
}

.simulation-header h3 {
  color: #083b7a;
  margin-bottom: 10px;
}

.simulation-scenarios {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.scenario-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.scenario-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.scenario-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.scenario-header h4 {
  margin: 0;
  color: #083b7a;
  font-size: 18px;
}

.scenario-type {
  background: #e3f2fd;
  color: #1565c0;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.scenario-description p {
  margin: 0 0 15px 0;
  color: #666;
  line-height: 1.5;
}

.scenario-details {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.participants {
  padding: 4px 8px;
  background: #f5f5f5;
  border-radius: 12px;
  font-size: 12px;
  color: #666;
}

.simulation-btn {
  background: linear-gradient(135deg, #4caf50, #66bb6a);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  width: 100%;
  transition: all 0.3s ease;
}

.simulation-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.simulation-controls {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
}

.control-panel h4 {
  margin: 0 0 15px 0;
  color: #083b7a;
}

.setting-group {
  margin-bottom: 10px;
}

.setting-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
}

.setting-group input[type="checkbox"] {
  margin: 0;
}

/* Knowledge Base Styles */
.knowledge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.knowledge-header h3 {
  color: #083b7a;
  margin: 0;
}

.knowledge-search {
  display: flex;
  gap: 10px;
}

.knowledge-search input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  width: 250px;
}

.search-btn {
  background: #083b7a;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.knowledge-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.category-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.category-icon {
  font-size: 36px;
  margin-bottom: 15px;
  text-align: center;
}

.category-card h4 {
  margin: 0 0 10px 0;
  color: #083b7a;
  font-size: 18px;
}

.category-card p {
  margin: 0 0 10px 0;
  color: #666;
  font-size: 14px;
  line-height: 1.5;
}

.article-count {
  background: #f5f5f5;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  color: #666;
  margin-bottom: 15px;
  display: inline-block;
}

.category-btn {
  background: linear-gradient(135deg, #083b7a, #0d6efd);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.category-btn:hover {
  opacity: 0.9;
}

.knowledge-articles {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
}

/* FAQ Styles */
.faq-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.faq-header h3 {
  color: #083b7a;
  margin: 0;
}

.faq-search {
  display: flex;
  gap: 10px;
}

.faq-search input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  width: 250px;
}

.faq-categories {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.faq-cat-btn {
  background: #f5f5f5;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.faq-cat-btn:hover {
  background: #e0e0e0;
}

.faq-cat-btn.active {
  background: #083b7a;
  color: white;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}

.faq-question {
  padding: 15px 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
  transition: background 0.3s ease;
}

.faq-question:hover {
  background: #e9ecef;
}

.faq-toggle {
  font-size: 20px;
  font-weight: bold;
  transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
  padding: 15px 20px;
  max-height: 500px;
}

.faq-answer p {
  margin: 0;
  color: #666;
  line-height: 1.6;
}

/* Video Guides Styles */
.videos-header {
  text-align: center;
  margin-bottom: 30px;
}

.videos-header h3 {
  color: #083b7a;
  margin-bottom: 10px;
}

.video-section {
  margin-bottom: 40px;
}

.video-section h4 {
  color: #083b7a;
  margin-bottom: 20px;
  font-size: 20px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.video-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.video-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
  position: relative;
  height: 180px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-placeholder {
  font-size: 48px;
  color: #666;
  cursor: pointer;
}

.video-card h5 {
  margin: 15px 20px 10px 20px;
  color: #083b7a;
  font-size: 16px;
}

.video-card p {
  margin: 0 20px 15px 20px;
  color: #666;
  font-size: 14px;
  line-height: 1.5;
}

.video-meta {
  display: flex;
  gap: 10px;
  margin: 0 20px 15px 20px;
}

.level {
  padding: 4px 8px;
  background: #e8f5e8;
  color: #2e7d32;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.video-btn {
  background: linear-gradient(135deg, #083b7a, #0d6efd);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  margin: 0 20px 20px 20px;
  width: calc(100% - 40px);
  transition: all 0.3s ease;
}

.video-btn:hover {
  opacity: 0.9;
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.modal-content {
  background: white;
  border-radius: 12px;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
  margin: 0;
  color: #083b7a;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: #333;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 20px;
  border-top: 1px solid #e0e0e0;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.modal-footer button {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  min-width: 100px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-footer button:not(.primary):not(:disabled) {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  color: #495057;
  border: 2px solid #dee2e6;
}

.modal-footer button:not(.primary):not(:disabled):hover {
  background: linear-gradient(135deg, #e9ecef, #dee2e6);
  color: #212529;
  border-color: #adb5bd;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-footer button:not(.primary):active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.modal-footer button.primary {
  background: linear-gradient(135deg, #0d6efd, #083b7a);
  color: white;
  border: 2px solid transparent;
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.modal-footer button.primary:hover {
  background: linear-gradient(135deg, #0b5ed7, #063866);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(13, 110, 253, 0.4);
}

.modal-footer button.primary:active {
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(13, 110, 253, 0.3);
}

.modal-footer button:disabled {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef) !important;
  color: #adb5bd !important;
  border-color: #dee2e6 !important;
  cursor: not-allowed !important;
  opacity: 0.6 !important;
  transform: none !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

/* Tutorial specific button enhancements */
#tutorialPrevBtn {
  background: linear-gradient(135deg, #6c757d, #495057);
  color: white;
  border: 2px solid #495057;
}

#tutorialPrevBtn:not(:disabled):hover {
  background: linear-gradient(135deg, #5a6268, #343a40);
  border-color: #343a40;
}

#tutorialNextBtn {
  background: linear-gradient(135deg, #198754, #146c43);
  color: white;
  border: 2px solid #146c43;
  font-weight: 700;
}

#tutorialNextBtn:hover {
  background: linear-gradient(135deg, #157347, #125530);
  border-color: #125530;
}

#tutorialCompleteBtn {
  background: linear-gradient(135deg, #0d6efd, #083b7a);
  color: white;
  border: 2px solid #083b7a;
  font-weight: 700;
}

#tutorialCompleteBtn:hover {
  background: linear-gradient(135deg, #0b5ed7, #063866);
  border-color: #063866;
}

/* Tutorial Modal Specific */
.tutorial-progress {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

/* Simulation Modal Specific */
.simulation-modal {
  max-width: 1000px;
}

.simulation-status {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-top: 20px;
}

.status-indicators {
  display: flex;
  gap: 20px;
}

.status-item {
  font-weight: 500;
}

/* Video Modal Specific */
.video-modal {
  max-width: 900px;
}

.video-player {
  margin-bottom: 20px;
}

.video-placeholder-large {
  height: 400px;
  background: #f5f5f5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 24px;
  color: #666;
}

.video-info h4 {
  color: #083b7a;
  margin-bottom: 10px;
}

.video-resources {
  margin-top: 15px;
}

.video-resources h5 {
  color: #083b7a;
  margin-bottom: 8px;
}

.video-resources ul {
  margin: 0;
  padding-left: 20px;
}

.video-resources li {
  margin-bottom: 5px;
  color: #666;
}

/* ===================================== */
   /* REAL-TIME COMMUNICATION STYLING */
/* ===================================== */

/* Communication Hero Section */
.communication-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  color: white !important;
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 30px;
}

.communication-hero h3 {
  margin: 0 0 10px 0;
  font-size: 24px !important;
  font-weight: 700 !important;
  color: white !important;
}

.communication-hero p {
  color: white !important;
  font-size: 16px !important;
  line-height: 1.5 !important;
}

/* Communication Status Overview */
.communication-status-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.status-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  text-align: center;
}

.status-card h4 {
  margin: 0 0 10px 0;
  font-size: 16px;
  color: white;
}

.status-value {
  font-size: 32px;
  font-weight: 700;
  color: white;
  margin-bottom: 5px;
}

.status-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}

/* Communication Tabs */
.communication-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 0;
}

.comm-tab-btn {
  background: #f8f9fa !important;
  border: 1px solid #e0e0e0 !important;
  padding: 12px 20px !important;
  cursor: pointer;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #333 !important;
  border-bottom: 3px solid transparent !important;
  transition: all 0.3s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px 8px 0 0 !important;
  margin-right: 2px;
}

.comm-tab-btn:hover {
  color: #06b6d4 !important;
  background: #e0f2fe !important;
  border-color: #06b6d4 !important;
}

.comm-tab-btn.active {
  color: white !important;
  border-bottom-color: #06b6d4 !important;
  background: #06b6d4 !important;
  border-color: #06b6d4 !important;
}

/* Communication Content */
.communication-content {
  display: none;
}

.communication-content.active {
  display: block;
}

/* Communication Overview Section */
.communication-overview {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 30px;
}

.overview-header {
  text-align: center;
  margin-bottom: 30px;
}

.overview-header h4 {
  margin: 0 0 10px 0;
  font-size: 20px;
  font-weight: 700;
  color: #06b6d4;
}

.overview-header p {
  margin: 0;
  font-size: 16px;
  color: #666;
  line-height: 1.5;
}

.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.capability-card {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.capability-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  border-color: #06b6d4;
}

.capability-icon {
  font-size: 32px;
  margin-bottom: 15px;
  color: #06b6d4;
}

.capability-card h5 {
  margin: 0 0 10px 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.capability-card p {
  margin: 0;
  font-size: 14px;
  color: #666;
  line-height: 1.4;
}

/* Live Chat Interface */
.chat-container {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  height: 600px;
}

.chat-sidebar {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
}

.chat-channels {
  height: 100%;
  overflow-y: auto;
}

.channel-item {
  padding: 15px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background 0.3s ease;
}

.channel-item:hover {
  background: #f8f9fa;
}

.channel-item.active {
  background: #e0f2fe;
  border-left: 4px solid #06b6d4;
}

.channel-name {
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
}

.channel-status {
  font-size: 12px;
  color: #666;
}

.channel-unread {
  background: #06b6d4;
  color: white;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 10px;
}

.chat-main {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  padding: 15px 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header h4 {
  margin: 0;
  color: #333;
}

.chat-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #666;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4caf50;
}

.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: #fafafa;
}

.message {
  margin-bottom: 15px;
  display: flex;
  gap: 10px;
}

.message.own {
  flex-direction: row-reverse;
}

.message-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #06b6d4;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.message-content {
  max-width: 70%;
}

.message-header {
  display: flex;
  gap: 10px;
  margin-bottom: 5px;
  font-size: 12px;
  color: #666;
}

.message-text {
  background: white;
  padding: 12px 15px;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
  line-height: 1.4;
}

.message.own .message-text {
  background: #06b6d4;
  color: white;
  border-color: #06b6d4;
}

.chat-input {
  padding: 15px 20px;
  background: white;
  border-top: 1px solid #e0e0e0;
  display: flex;
  gap: 10px;
}

.chat-input input {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  font-size: 14px;
}

.chat-input button {
  background: #06b6d4;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s ease;
}

.chat-input button:hover {
  background: #0891b2;
}

/* Broadcast Messaging */
.broadcast-container {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.broadcast-form {
  display: grid;
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-weight: 600;
  color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 10px 15px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.broadcast-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.btn-primary {
  background: #06b6d4;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s ease;
}

.btn-primary:hover {
  background: #0891b2;
}

.btn-secondary {
  background: #f5f5f5;
  color: #666;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s ease;
}

.btn-secondary:hover {
  background: #e0e0e0;
}

.broadcast-history {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
}

.broadcast-history h4 {
  margin: 0;
  padding: 15px 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
  color: #333;
}

.broadcast-list {
  max-height: 400px;
  overflow-y: auto;
}

.broadcast-item {
  padding: 15px 20px;
  border-bottom: 1px solid #f0f0f0;
}

.broadcast-item:last-child {
  border-bottom: none;
}

.broadcast-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.broadcast-type {
  background: #06b6d4;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.broadcast-time {
  font-size: 12px;
  color: #666;
}

.broadcast-message {
  color: #333;
  line-height: 1.4;
  margin-bottom: 10px;
}

.broadcast-status {
  display: flex;
  gap: 15px;
  font-size: 12px;
  color: #666;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* SMS Gateway */
.sms-container {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.sms-panel {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
}

.sms-panel h4 {
  margin: 0 0 15px 0;
  color: #333;
}

.sms-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.sms-stat {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
}

.sms-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #06b6d4;
  margin-bottom: 5px;
}

.sms-stat-label {
  font-size: 12px;
  color: #666;
}

.sms-messages {
  max-height: 300px;
  overflow-y: auto;
}

.sms-message {
  padding: 10px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 10px;
}

.sms-message:last-child {
  border-bottom: none;
}

.sms-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.sms-sender {
  font-weight: 600;
  color: #333;
}

.sms-time {
  font-size: 12px;
  color: #666;
}

.sms-text {
  color: #333;
  line-height: 1.4;
}

.sms-type {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  margin-top: 5px;
}

.sms-type.incoming {
  background: #4caf50;
  color: white;
}

.sms-type.outgoing {
  background: #06b6d4;
  color: white;
}

/* Voice Alert System */
.voice-container {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.voice-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.voice-btn {
  padding: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.voice-btn:hover {
  border-color: #06b6d4;
  background: #f0fdff;
}

.voice-btn.active {
  border-color: #06b6d4;
  background: #06b6d4;
  color: white;
}

.voice-btn-icon {
  font-size: 24px;
  margin-bottom: 10px;
}

.voice-btn-text {
  font-weight: 600;
  color: #333;
}

.voice-btn.active .voice-btn-text {
  color: white;
}

.voice-status {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.voice-status h4 {
  margin: 0 0 10px 0;
  color: #333;
}

.voice-indicators {
  display: flex;
  gap: 20px;
}

.voice-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.indicator-light {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ccc;
}

.indicator-light.active {
  background: #4caf50;
}

.indicator-light.recording {
  background: #f44336;
  animation: pulse 1s infinite;
}

.voice-history {
  max-height: 300px;
  overflow-y: auto;
}

.voice-alert {
  padding: 15px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 10px;
}

.voice-alert:last-child {
  border-bottom: none;
}

.alert-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.alert-type {
  background: #f44336;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.alert-time {
  font-size: 12px;
  color: #666;
}

.alert-message {
  color: #333;
  line-height: 1.4;
  margin-bottom: 10px;
}

.alert-audio {
  background: #f8f9fa;
  padding: 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.audio-controls {
  display: flex;
  gap: 5px;
}

.audio-btn {
  background: #06b6d4;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.audio-btn:hover {
  background: #0891b2;
}

/* Responsive Design */
@media (max-width: 768px) {
  .training-hero {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }
  
  .training-tabs {
    overflow-x: auto;
    white-space: nowrap;
  }
  
  .tutorial-grid,
  .simulation-scenarios,
  .knowledge-categories,
  .video-grid {
    grid-template-columns: 1fr;
  }
  
  .knowledge-header,
  .faq-header {
    flex-direction: column;
    gap: 15px;
  }
  
  .knowledge-search input,
  .faq-search input {
    width: 100%;
  }
  
  .scenario-details {
    flex-direction: column;
  }
  
  .modal-content {
    width: 95%;
    margin: 10px;
  }
  
  .status-indicators {
    flex-direction: column;
    gap: 10px;
  }
  
  /* Communication Responsive */
  .communication-hero {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }
  
  .communication-status-overview {
    grid-template-columns: 1fr;
  }
  
  .communication-overview {
    padding: 20px;
  }
  
  .capabilities-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .capability-card {
    padding: 15px;
  }
  
  .communication-tabs {
    overflow-x: auto;
    white-space: nowrap;
  }
  
  .chat-container {
    grid-template-columns: 1fr;
    height: auto;
  }
  
  .chat-sidebar {
    height: 200px;
  }
  
  .chat-main {
    height: 400px;
  }
  
  .sms-container {
    grid-template-columns: 1fr;
  }
  
  .voice-controls {
    grid-template-columns: 1fr;
  }
  
  .voice-indicators {
    flex-direction: column;
    gap: 10px;
  }
}

.alert-normal{ background:#198754; color:white; }
.alert-monitoring{ background:#ffc107; color:black; }
.alert-blue{ background:#0d6efd; color:white; }
.alert-red{ background:#dc3545; color:white; }

.messenger-float-btn{
  position:fixed;
  right:18px;
  bottom:58px;
  z-index:9999;
  border:none;
  background:linear-gradient(135deg,#0084ff,#0068ff);
  color:#fff;
  padding:12px 16px;
  border-radius:999px;
  font-weight:700;
  box-shadow:0 10px 24px rgba(0,102,255,0.28);
  cursor:pointer;
}

.messenger-float-btn:hover{
  transform:translateY(-2px);
}

@media (max-width:768px){
  .messenger-float-btn{
    right:12px;
    bottom:88px;
    padding:11px 14px;
    font-size:13px;
  }
}

/* ===================================== */
/* 2026 WHOLE-SITE VISUAL REDESIGN       */
/* ===================================== */
:root {
  --portal-primary: #0b3552;
  --portal-primary-strong: #071f31;
  --portal-primary-soft: #145da0;
  --portal-bg: #dfe8f1;
  --portal-surface: rgba(248, 251, 253, 0.96);
  --portal-surface-strong: #fdfefe;
  --portal-border: rgba(11, 53, 82, 0.18);
  --portal-border-strong: rgba(7, 31, 49, 0.32);
  --portal-text: #18222d;
  --portal-muted: #556474;
  --portal-shadow: 0 16px 32px rgba(6, 23, 36, 0.16);
  --portal-shadow-soft: 0 8px 18px rgba(6, 23, 36, 0.12);
  --portal-radius: 16px;
  --portal-radius-lg: 22px;
  --portal-command-accent: linear-gradient(135deg, #071f31, #0b3552 55%, #145da0 100%);
  --portal-alert: #b42318;
  --portal-warning: #d48a10;
  --portal-safe: #26643a;
  --portal-info: #0c74b6;
}

html {
  background:
    radial-gradient(circle at top left, rgba(20, 93, 160, 0.12), transparent 24%),
    radial-gradient(circle at top right, rgba(7, 31, 49, 0.12), transparent 22%),
    linear-gradient(180deg, #e8eef4 0%, #dde6ee 40%, #d6e0e9 100%);
}

body {
  font-family: "Source Sans 3", sans-serif;
  color: var(--portal-text);
  background:
    radial-gradient(circle at top left, rgba(20, 93, 160, 0.09), transparent 20%),
    radial-gradient(circle at right 10% top 12%, rgba(7, 31, 49, 0.1), transparent 18%),
    linear-gradient(180deg, #e9eef4 0%, #e0e8ef 38%, #d7e1ea 100%) !important;
}

h1, h2, h3, h4, h5, h6,
.section-title,
.ops-panel-title,
.control-card-label,
.top-status-label,
.layer-tile span:first-child,
.iec-card-title strong,
.org-section-title {
  font-family: "Montserrat", sans-serif;
  letter-spacing: 0.01em;
}

a {
  color: var(--portal-primary);
}

section,
.page,
.hero-container,
.top-status-board,
.monitoring-toolbar,
.monitoring-overview,
.ops-workspace,
.intelligence-grid,
.communication-overview,
.training-hero,
.charter-hero {
  position: relative;
}

.site-header {
  background:
    linear-gradient(135deg, rgba(7, 31, 49, 0.98), rgba(11, 53, 82, 0.96) 45%, rgba(20, 93, 160, 0.88));
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 40px rgba(6, 23, 36, 0.28);
  backdrop-filter: blur(10px);
}

.layer-header,
.map-title-bar {
  background: var(--portal-command-accent) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  box-shadow: 0 14px 28px rgba(6, 23, 36, 0.2);
}

.header-nav .nav-links > button,
.layer-tile,
nav a,
button,
.public-service-actions button,
.hotline-item-actions button,
.home-editor-actions button,
.home-manager-item-actions button,
.ops-filter-bar button,
.hazard-toolbar button,
.control-card button {
  border-radius: 14px;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

button:hover,
.layer-tile:hover,
.header-nav .nav-links > button:hover,
.public-service-actions button:hover,
.home-editor-actions button:hover,
.home-manager-item-actions button:hover,
.ops-filter-bar button:hover,
.hazard-toolbar button:hover,
.control-card button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(10, 37, 64, 0.14);
}

.layer-tile {
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(7, 31, 49, 0.86) !important;
  box-shadow: 0 10px 20px rgba(6, 23, 36, 0.24);
  color: #fff !important;
}

.layer-tile.dashboard,
.layer-tile.monitoring,
.layer-tile.operations,
.layer-tile.intelligence,
.layer-tile.public,
.layer-tile.news,
.layer-tile.disaster-report,
.layer-tile.citizen-charter,
.layer-tile.training,
.layer-tile.utility,
.layer-tile.agency-tools {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02)),
    linear-gradient(135deg, rgba(7, 31, 49, 0.98), rgba(11, 53, 82, 0.94), rgba(20, 93, 160, 0.7)) !important;
}

.utility-panel,
.control-card,
.home-mini-panel,
.home-live-card,
.monitoring-stat,
.public-tool-panel,
.contact-flow-card,
.summary-card,
.charter-service-card,
.charter-org-card,
.functional-chart-card,
.progress-card,
.capability-card,
.chat-sidebar,
.chat-main,
.sms-container,
.voice-controls,
.embed-card,
.intelligence-panel,
.ops-workspace-card,
.forecast-card,
.communication-tabs,
.hotline-item,
.service-card,
.training-module-card {
  background: var(--portal-surface) !important;
  border: 1px solid var(--portal-border) !important;
  border-radius: var(--portal-radius) !important;
  box-shadow: var(--portal-shadow-soft) !important;
  color: var(--portal-text) !important;
  backdrop-filter: blur(6px);
}

.card,
.top-status-card,
.control-card,
.ops-workspace-card,
.public-service-card,
.intelligence-panel,
.embed-card,
.forecast-card,
.charter-service-card,
.charter-org-card,
.summary-card,
.functional-chart-card,
.contact-flow-card,
.home-live-card,
.home-mini-panel,
.monitoring-stat,
.public-tool-panel,
.incident-card,
.earthquake-card,
.opcen-log-card,
.weather-advisory-card,
.pagasa-cyclone-card,
.pagasa-eoc-card,
.travel-route-card,
.hotline-card,
.evacuation-card,
.drrm-downloads-card,
.disaster-report-card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(252,253,254,0.98), rgba(241,246,250,0.97)) !important;
  border: 1px solid var(--portal-border-strong) !important;
  border-radius: var(--portal-radius) !important;
  box-shadow: var(--portal-shadow) !important;
  color: var(--portal-text) !important;
  overflow: hidden;
}

.card::before,
.top-status-card::before,
.ops-workspace-card::before,
.public-service-card::before,
.monitoring-stat::before,
.home-live-card::before,
.home-mini-panel::before,
.intelligence-panel::before,
.embed-card::before,
.contact-flow-card::before,
.charter-service-card::before,
.summary-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, #145da0 0%, #0b3552 70%, #0c74b6 100%);
  opacity: 1;
}

.pagasa-eoc-card::before,
.status-red::before,
.alert-red::before,
.contact-flow-card.emergency::before {
  background: linear-gradient(90deg, #c62828, #ef5350) !important;
}

.weather-advisory-card::before,
.travel-route-card::before,
.alert-monitoring::before,
.contact-flow-card.message::before {
  background: linear-gradient(90deg, #f9a825, #ffcc57) !important;
}

.public-service-card::before,
.evacuation-card::before,
.drrm-downloads-card::before,
.contact-flow-card.report::before {
  background: linear-gradient(90deg, #2e7d32, #58a55c) !important;
}

.section-title,
.ops-panel-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background:
    linear-gradient(135deg, rgba(7, 31, 49, 0.98), rgba(11, 53, 82, 0.96), rgba(20, 93, 160, 0.86)) !important;
  color: #fff !important;
  padding: 11px 16px;
  border-radius: 999px;
  box-shadow: 0 10px 20px rgba(6, 23, 36, 0.2) !important;
  margin-bottom: 18px;
}

.top-status-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.top-status-card {
  position: relative;
  padding: 24px 22px !important;
  background:
    linear-gradient(180deg, rgba(249,252,254,0.98), rgba(237,243,248,0.98)) !important;
}

.top-status-label {
  display: inline-block;
  color: var(--portal-muted) !important;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.top-status-value {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(1.2rem, 1rem + 0.8vw, 1.7rem);
  font-weight: 800;
  line-height: 1.2;
}

.top-status-meta,
.control-status,
.home-feed-item span,
.monitoring-last-sync,
.home-status-line span:last-child,
.feedback-helper,
.feedback-status {
  color: var(--portal-muted) !important;
}

.hero-container,
.home-landing-card,
.hero-news,
.charter-hero,
.training-hero {
  border-radius: var(--portal-radius-lg);
}

.hero-container {
  background:
    linear-gradient(120deg, rgba(7, 31, 49, 0.88), rgba(11, 53, 82, 0.56)),
    radial-gradient(circle at top right, rgba(20, 93, 160, 0.18), transparent 22%);
  box-shadow: 0 20px 40px rgba(6, 23, 36, 0.22);
}

.hero-overlay {
  background: linear-gradient(180deg, rgba(8, 43, 70, 0.12), rgba(8, 43, 70, 0.55));
}

.home-feed-item,
.home-manager-item,
.ops-list-item,
.hotline-item,
.iec-card-tips li,
.intel-status-list li,
.intel-links a {
  background: rgba(233, 240, 246, 0.92) !important;
  border: 1px solid rgba(11, 53, 82, 0.12) !important;
  border-radius: 12px !important;
  padding: 14px 16px !important;
  box-shadow: none !important;
}

.monitoring-toolbar,
.monitoring-overview,
.feedback-form-wrap,
.utility-panel {
  background: rgba(245, 249, 252, 0.9);
  border: 1px solid rgba(11, 53, 82, 0.14);
  border-radius: 18px;
  box-shadow: var(--portal-shadow-soft);
  backdrop-filter: blur(6px);
}

.monitoring-stat {
  position: relative;
  padding: 22px 18px !important;
}

.monitoring-stat strong,
.monitoring-stat .value,
.summary-card strong,
.home-live-card strong {
  font-family: "Montserrat", sans-serif;
  color: var(--portal-primary) !important;
}

.public-tool-panel,
.home-editor-panel,
.feedback-form-wrap,
.ops-workspace-card,
.control-card {
  padding: 20px;
}

.public-tool-panel h3,
.ops-workspace-card h3,
.control-card-label,
.charter-service-card h3,
.charter-org-card h3,
.progress-card h3,
.capability-card h3 {
  color: var(--portal-primary) !important;
}

.status-badge,
.article-category,
.control-status,
.alert-normal,
.alert-monitoring,
.alert-blue,
.alert-red {
  border-radius: 999px !important;
  padding: 7px 12px !important;
  font-weight: 700 !important;
  border: 1px solid transparent;
}

.status-badge.responding,
.alert-red {
  background: rgba(180, 35, 24, 0.14) !important;
  color: var(--portal-alert) !important;
  border-color: rgba(180, 35, 24, 0.2) !important;
}

.status-badge.ongoing,
.alert-monitoring {
  background: rgba(212, 138, 16, 0.16) !important;
  color: #8a5a05 !important;
  border-color: rgba(212, 138, 16, 0.22) !important;
}

.alert-normal {
  background: rgba(38, 100, 58, 0.14) !important;
  color: var(--portal-safe) !important;
  border-color: rgba(38, 100, 58, 0.22) !important;
}

.alert-blue {
  background: rgba(12, 116, 182, 0.14) !important;
  color: var(--portal-info) !important;
  border-color: rgba(12, 116, 182, 0.22) !important;
}

input,
select,
textarea {
  background: rgba(243, 247, 250, 0.98) !important;
  border: 1px solid rgba(11, 53, 82, 0.18) !important;
  border-radius: 12px !important;
  color: var(--portal-text) !important;
  box-shadow: inset 0 1px 2px rgba(10, 37, 64, 0.04);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(22, 119, 200, 0.45) !important;
  box-shadow: 0 0 0 4px rgba(22, 119, 200, 0.12) !important;
}

button,
.public-service-actions button,
.hotline-item-actions button,
.home-editor-actions button,
.home-manager-item-actions button,
.ops-filter-bar button,
.control-card button,
.hazard-toolbar button {
  background: linear-gradient(135deg, #145da0, #0b3552) !important;
  color: #fff !important;
  border: none !important;
}

button.danger,
.home-manager-item-actions button.danger,
.public-service-actions .danger,
.hotline-item-actions .danger {
  background: linear-gradient(135deg, #d94141, #a61e1e) !important;
}

button.secondary,
.hazard-toolbar button.secondary {
  background: linear-gradient(135deg, #5e7286, #3f5264) !important;
}

table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(248, 251, 253, 0.98);
  border: 1px solid rgba(11, 53, 82, 0.14);
}

th {
  background: rgba(11, 53, 82, 0.1) !important;
  color: var(--portal-primary) !important;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
}

td, th {
  border-color: rgba(10, 61, 98, 0.08) !important;
  padding: 12px 14px;
}

tr:nth-child(even) td {
  background: rgba(240, 245, 249, 0.92);
}

.charter-hero,
.training-hero,
.home-landing-card,
.communication-overview {
  background:
    linear-gradient(135deg, rgba(247,250,252,0.9), rgba(236,242,247,0.96)),
    radial-gradient(circle at top right, rgba(20, 93, 160, 0.08), transparent 24%);
  border: 1px solid rgba(11, 53, 82, 0.14);
  box-shadow: var(--portal-shadow);
}

.messenger-float-btn {
  background: linear-gradient(135deg, #145da0, #0b3552);
  box-shadow: 0 12px 22px rgba(6, 23, 36, 0.24);
}

@media (max-width: 768px) {
  .card,
  .top-status-card,
  .ops-workspace-card,
  .public-service-card,
  .intelligence-panel,
  .embed-card,
  .forecast-card,
  .charter-service-card,
  .contact-flow-card {
    border-radius: 18px !important;
    padding: 18px !important;
  }

  .section-title,
  .ops-panel-title {
    width: 100%;
    justify-content: center;
    text-align: center;
    border-radius: 16px;
  }

  .top-status-board,
  .monitoring-overview,
  .intelligence-grid,
  .capabilities-grid {
    gap: 14px;
  }
}

/* ===== HOMEPAGE POLISH ===== */
body {
  background:
    radial-gradient(circle at top center, rgba(255,255,255,0.1), transparent 18%),
    radial-gradient(circle at 18% 22%, rgba(56, 189, 248, 0.16), transparent 24%),
    radial-gradient(circle at 82% 18%, rgba(250, 204, 21, 0.12), transparent 20%),
    radial-gradient(circle at 50% 72%, rgba(20, 184, 166, 0.12), transparent 30%),
    linear-gradient(180deg, #071421 0%, #0b2740 28%, #0e4b52 58%, #0b2f45 82%, #08131f 100%);
}

.site-header {
  box-shadow: 0 18px 34px rgba(0,0,0,0.24);
}

.header-logo-frame {
  box-shadow: 0 16px 28px rgba(0,0,0,0.2);
}

.header-title h1 {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(34px, 4vw, 44px);
  line-height: 1.12;
  text-shadow: 0 6px 18px rgba(0,0,0,0.18);
}

.header-title .subtitle {
  color: rgba(255,255,255,0.94);
}

.header-badge {
  background: rgba(255,255,255,0.15);
}

#heroSlider {
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 20px 40px rgba(2, 16, 34, 0.3);
}

.hero-overlay {
  background:
    linear-gradient(180deg, rgba(2,16,34,0.08), rgba(2,16,34,0.42)),
    linear-gradient(90deg, rgba(2,16,34,0.12), transparent 60%);
}

.hero-display-copy {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 72px;
  z-index: 4;
  max-width: 720px;
  color: #ffffff;
  display: none;
  text-shadow: none;
}

.hero-display-copy.active {
  display: block;
}

.hero-display-copy h2 {
  margin: 0 0 10px;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.1;
  color: #ffffff !important;
}

.hero-display-copy-date {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: rgba(255,255,255,0.92) !important;
}

.hero-display-copy-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,0.88) !important;
  max-width: 620px;
}

.hero-return-button {
  position: absolute;
  right: 20px;
  bottom: 20px;
  z-index: 5;
  border: none;
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  background: rgba(8, 59, 122, 0.92);
  color: #ffffff !important;
  box-shadow: 0 10px 20px rgba(2,16,34,0.26);
}

.hero-return-button:hover {
  background: rgba(10, 47, 90, 0.96);
}

.slider-btn {
  background: rgba(2,16,34,0.52);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  backdrop-filter: blur(8px);
}

.slider-btn:hover {
  background: rgba(2,16,34,0.74);
}

.slider-dots span {
  width: 11px;
  height: 11px;
  background: rgba(255,255,255,0.52);
  border: 1px solid rgba(255,255,255,0.24);
}

.slider-dots .active {
  background: #ffffff;
  transform: scale(1.08);
}

.hero-news .card {
  max-width: 940px;
  margin: 22px auto 0;
  border-top: 6px solid #0d6efd;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(244,248,252,0.96));
}

.hero-news .card h3 {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(24px, 3vw, 30px);
  margin-bottom: 18px;
}

#newsFeed > div {
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(8,59,122,0.05);
  border: 1px solid rgba(8,59,122,0.1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
}

.home-landing-card {
  box-shadow: 0 20px 40px rgba(2,16,34,0.28);
  border: 1px solid rgba(255,255,255,0.1);
}

.home-live-card,
.home-mini-panel {
  box-shadow: 0 12px 24px rgba(2,16,34,0.14);
}

.nav-links .layer-tile {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}

/* REMOVED: Conflicting active state rules - using clean styling above */

@media (max-width: 768px) {
  .site-header {
    box-shadow: 0 12px 22px rgba(0,0,0,0.2);
  }

  #heroSlider {
    border-radius: 18px;
  }

  .hero-news .card {
    margin-top: 18px;
  }

  .hero-news .card h3 {
    font-size: 22px;
  }
}

/* ===== DASHBOARD LAYER READABILITY FIX ===== */
#dashboardPage .top-status-card,
#dashboardPage .home-live-card,
#dashboardPage .home-mini-panel,
#dashboardPage .home-feed-item {
  color: #0f172a !important;
}

#dashboardPage .top-status-card,
#dashboardPage .home-live-card,
#dashboardPage .home-mini-panel {
  background:
    linear-gradient(180deg, rgba(252,253,254,0.99), rgba(241,246,250,0.98)) !important;
  border: 1px solid rgba(11, 53, 82, 0.16) !important;
  box-shadow: 0 12px 24px rgba(7, 31, 49, 0.10) !important;
}

#dashboardPage .top-status-card *,
#dashboardPage .home-live-card *,
#dashboardPage .home-mini-panel *,
#dashboardPage .home-feed-item * {
  color: inherit !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

#dashboardPage .home-landing-card,
#dashboardPage .home-landing-card *,
#dashboardPage .home-landing-card .home-landing-title,
#dashboardPage .home-landing-card .home-landing-subtitle,
#dashboardPage .home-landing-card .home-status-line,
#dashboardPage .home-landing-card .home-status-line span,
#dashboardPage .home-landing-card .home-status-line strong {
  color: #ffffff !important;
}

#dashboardPage .home-landing-card .home-landing-subtitle,
#dashboardPage .home-landing-card .home-status-line span,
#dashboardPage .home-landing-card .home-landing-tags span {
  color: rgba(255,255,255,0.92) !important;
}

#dashboardPage .top-status-label,
#dashboardPage .home-live-label,
#dashboardPage .home-mini-panel h3 {
  color: #4b5563 !important;
}

#dashboardPage .top-status-value,
#dashboardPage .home-live-value,
#dashboardPage .home-feed-item strong,
#dashboardPage .home-status-line strong {
  color: #0f172a !important;
}

#dashboardPage .top-status-meta,
#dashboardPage .home-live-note,
#dashboardPage .home-feed-item span {
  color: #475569 !important;
}

#dashboardPage .home-feed-item {
  background: rgba(236, 243, 248, 0.96) !important;
  border: 1px solid rgba(11, 53, 82, 0.10) !important;
}

#dashboardPage .home-action-primary,
#dashboardPage .home-action-primary * {
  color: #ffffff !important;
}

#dashboardPage .home-action-secondary {
  background: rgba(255,255,255,0.14) !important;
  border: 1px solid rgba(255,255,255,0.18) !important;
  color: #ffffff !important;
}

#dashboardPage .home-action-secondary * {
  color: #ffffff !important;
}

button[style*="background:#ffc107"],
button[style*="background: #ffc107"],
button[style*="background:#fff3cd"],
button[style*="background: #fff3cd"],
.status-yellow {
  color: #111827 !important;
}

/* ===== ADAPTIVE TYPOGRAPHY CONTRAST AUDIT ===== */
:root {
  --adaptive-text-on-light: #111827;
  --adaptive-text-on-light-fallback: #1f2937;
  --adaptive-text-on-dark: #ffffff;
  --adaptive-muted-on-light: #475569;
  --adaptive-muted-on-dark: #e5e7eb;
}

body[data-auto-contrast-audit="active"] [data-auto-contrast-processed="true"] {
  text-shadow: none !important;
  opacity: 1 !important;
}

body[data-auto-contrast-audit="active"] .text-on-light,
body[data-auto-contrast-audit="active"] [data-auto-contrast-surface="light"] {
  color: var(--adaptive-text-on-light) !important;
  -webkit-text-fill-color: var(--adaptive-text-on-light) !important;
}

body[data-auto-contrast-audit="active"] .text-on-dark,
body[data-auto-contrast-audit="active"] [data-auto-contrast-surface="dark"] {
  color: var(--adaptive-text-on-dark) !important;
  -webkit-text-fill-color: var(--adaptive-text-on-dark) !important;
}

body[data-auto-contrast-audit="active"] .muted-on-light {
  color: var(--adaptive-muted-on-light) !important;
  -webkit-text-fill-color: var(--adaptive-muted-on-light) !important;
}

body[data-auto-contrast-audit="active"] .muted-on-dark {
  color: var(--adaptive-muted-on-dark) !important;
  -webkit-text-fill-color: var(--adaptive-muted-on-dark) !important;
}

body[data-auto-contrast-audit="active"] input::placeholder,
body[data-auto-contrast-audit="active"] textarea::placeholder,
body[data-auto-contrast-audit="active"] select,
body[data-auto-contrast-audit="active"] option {
  color: var(--adaptive-muted-on-light) !important;
  opacity: 1 !important;
}

body[data-auto-contrast-audit="active"] .leaflet-popup-content,
body[data-auto-contrast-audit="active"] .leaflet-popup-content *,
body[data-auto-contrast-audit="active"] .leaflet-tooltip,
body[data-auto-contrast-audit="active"] .leaflet-tooltip *,
body[data-auto-contrast-audit="active"] .leaflet-control,
body[data-auto-contrast-audit="active"] .leaflet-control * {
  color: var(--adaptive-text-on-light) !important;
  -webkit-text-fill-color: var(--adaptive-text-on-light) !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

body[data-auto-contrast-audit="active"] .status-badge,
body[data-auto-contrast-audit="active"] .alert-normal,
body[data-auto-contrast-audit="active"] .alert-monitoring,
body[data-auto-contrast-audit="active"] .alert-blue,
body[data-auto-contrast-audit="active"] .alert-red,
body[data-auto-contrast-audit="active"] .hotspot-status,
body[data-auto-contrast-audit="active"] .hotspot-distance {
  font-weight: 700 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

/* =========================================================
   CRITICAL READABILITY FIX — LIGHT CARD BODY TEXT
   Fixes unreadable white or near-white text on light card bodies.
   ========================================================= */

.pagasa-typhoon-card,
.pagasa-cyclone-card,
.weather-advisory-card,
.earthquake-card,
#incidentReviewQueueCard,
.hotline-card,
.public-service-card,
.contact-flow-card,
.contact-flow-card.emergency,
.contact-flow-card.message,
.contact-flow-card.report,
.utility-panel,
.control-card,
#quake-list,
#incidentReviewQueueList {
  color: #111827 !important;
}

.pagasa-typhoon-card h1,
.pagasa-typhoon-card h2,
.pagasa-typhoon-card h3,
.pagasa-typhoon-card h4,
.pagasa-cyclone-card h1,
.pagasa-cyclone-card h2,
.pagasa-cyclone-card h3,
.pagasa-cyclone-card h4,
.weather-advisory-card h1,
.weather-advisory-card h2,
.weather-advisory-card h3,
.weather-advisory-card h4,
.earthquake-card h1,
.earthquake-card h2,
.earthquake-card h3,
.earthquake-card h4,
#incidentReviewQueueCard h1,
#incidentReviewQueueCard h2,
#incidentReviewQueueCard h3,
#incidentReviewQueueCard h4,
.hotline-card h1,
.hotline-card h2,
.hotline-card h3,
.hotline-card h4,
.public-service-card h1,
.public-service-card h2,
.public-service-card h3,
.public-service-card h4,
.contact-flow-card h1,
.contact-flow-card h2,
.contact-flow-card h3,
.contact-flow-card h4,
.utility-panel h1,
.utility-panel h2,
.utility-panel h3,
.utility-panel h4,
.control-card h1,
.control-card h2,
.control-card h3,
.control-card h4,
.control-card-label,
.card-title,
.module-title:not(.dark-title):not(.section-title),
.panel-title:not(.dark-title):not(.section-title) {
  color: #0f172a !important;
}

.pagasa-typhoon-card p,
.pagasa-typhoon-card span,
.pagasa-typhoon-card div,
.pagasa-typhoon-card li,
.pagasa-typhoon-card label,
.pagasa-typhoon-card small,
.pagasa-typhoon-card td,
.pagasa-typhoon-card th,
.pagasa-typhoon-card strong,
.pagasa-cyclone-card p,
.pagasa-cyclone-card span,
.pagasa-cyclone-card div,
.pagasa-cyclone-card li,
.pagasa-cyclone-card label,
.pagasa-cyclone-card small,
.pagasa-cyclone-card td,
.pagasa-cyclone-card th,
.pagasa-cyclone-card strong,
.weather-advisory-card p,
.weather-advisory-card span,
.weather-advisory-card div,
.weather-advisory-card li,
.weather-advisory-card label,
.weather-advisory-card small,
.weather-advisory-card td,
.weather-advisory-card th,
.weather-advisory-card strong,
.earthquake-card p,
.earthquake-card span,
.earthquake-card div,
.earthquake-card li,
.earthquake-card label,
.earthquake-card small,
.earthquake-card td,
.earthquake-card th,
.earthquake-card strong,
#incidentReviewQueueCard p,
#incidentReviewQueueCard span,
#incidentReviewQueueCard div,
#incidentReviewQueueCard li,
#incidentReviewQueueCard label,
#incidentReviewQueueCard small,
#incidentReviewQueueCard td,
#incidentReviewQueueCard th,
#incidentReviewQueueCard strong,
.hotline-card p,
.hotline-card span,
.hotline-card div,
.hotline-card li,
.hotline-card label,
.hotline-card small,
.hotline-card td,
.hotline-card th,
.hotline-card strong,
.public-service-card p,
.public-service-card span,
.public-service-card div,
.public-service-card li,
.public-service-card label,
.public-service-card small,
.public-service-card td,
.public-service-card th,
.public-service-card strong,
.contact-flow-card p,
.contact-flow-card span,
.contact-flow-card div,
.contact-flow-card li,
.contact-flow-card label,
.contact-flow-card small,
.contact-flow-card td,
.contact-flow-card th,
.contact-flow-card strong,
.utility-panel p,
.utility-panel span,
.utility-panel div,
.utility-panel li,
.utility-panel label,
.utility-panel small,
.utility-panel td,
.utility-panel th,
.utility-panel strong,
.control-card p,
.control-card span,
.control-card div,
.control-card li,
.control-card label,
.control-card small,
.control-card td,
.control-card th,
.control-card strong,
#quake-list,
#quake-list li,
#quake-list li *,
#incidentReviewQueueList,
#incidentReviewQueueList * {
  color: #111827 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

.pagasa-typhoon-card .muted,
.pagasa-typhoon-card .source,
.pagasa-typhoon-card .note,
.pagasa-cyclone-card .muted,
.pagasa-cyclone-card .source,
.pagasa-cyclone-card .note,
.weather-advisory-card .muted,
.weather-advisory-card .source,
.weather-advisory-card .note,
.earthquake-card .muted,
.earthquake-card .source,
.earthquake-card .note,
#incidentReviewQueueCard small,
.hotline-card .muted,
.hotline-card .note,
.utility-panel .control-status,
.control-card .control-status,
#quake-debug,
#earthquakeMapStatus {
  color: #374151 !important;
  opacity: 1 !important;
}

.pagasa-typhoon-card a,
.pagasa-cyclone-card a,
.weather-advisory-card a,
.earthquake-card a,
.hotline-card a,
.public-service-card a,
.contact-flow-card a,
#incidentReviewQueueCard a,
#quake-list a {
  color: #075985 !important;
  text-decoration: underline;
  font-weight: 700;
}

/* Unified layer navigation theme */
.layer-top-nav.header-nav {
  margin: 14px auto 18px;
  padding: 16px 18px;
  width: min(1420px, calc(100% - 20px));
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03)),
    #071f31;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  box-shadow: 0 18px 34px rgba(2, 16, 34, 0.22);
}

.layer-top-nav .nav-links {
  gap: 12px;
  align-items: center;
  justify-content: center;
}

/* 🔷 OPERATIONAL DASHBOARD STYLING */
.operational-dashboard {
  width: min(1660px, calc(100% - 46px));
  margin: 22px auto 32px !important;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* 🚨 SITUATION AWARENESS BAR */
.situation-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border: 1px solid #475569;
  border-radius: 12px;
  padding: 16px 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.situation-status {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.status-indicator.normal {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

.status-indicator.warning {
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.status-indicator.critical {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.status-text {
  color: #f8fafc;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.last-update {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 500;
}

.active-alerts {
  display: flex;
  align-items: center;
}

.alert-count {
  color: #f8fafc;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 📊 METRICS PANEL */
.metrics-panel {
  background: #1e293b;
  border: 1px solid #475569;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #334155;
}

.panel-header h2 {
  color: #f8fafc;
  font-size: 20px;
  font-weight: 800;
  margin: 0;
}

.panel-controls {
  display: flex;
  gap: 8px;
}

.refresh-btn, .expand-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f8fafc;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.refresh-btn:hover, .expand-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* 📊 METRICS GRID */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.metric-tile {
  background: linear-gradient(145deg, #0f172a, #1e293b);
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.metric-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
  border-color: #475569;
}

.metric-tile.rainfall {
  border-left: 3px solid #38bdf8;
}

.metric-tile.heat {
  border-left: 3px solid #f59e0b;
}

.metric-tile.seismic {
  border-left: 3px solid #ef4444;
}

.metric-tile.fire {
  border-left: 3px solid #f97316;
}

.metric-tile.incidents {
  border-left: 3px solid #a78bfa;
}

/* TILE HEADER */
.tile-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.tile-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.tile-title h4 {
  color: #f8fafc;
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 4px 0;
}

.tile-source {
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tile-timestamp {
  color: #22c55e;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(34, 197, 94, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

/* TILE CONTENT */
.tile-content {
  margin-bottom: 16px;
}

.primary-value {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 8px;
}

.primary-value .value {
  color: #f8fafc;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.primary-value .unit {
  color: #94a3b8;
  font-size: 14px;
  font-weight: 600;
}

.trend-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.trend {
  font-size: 12px;
  font-weight: 700;
}

.trend.up {
  color: #22c55e;
}

.trend.down {
  color: #ef4444;
}

.trend.stable {
  color: #f59e0b;
}

.trend-period {
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
}

/* BARS AND GAUGES */
.threshold-bar, .heat-gauge, .fire-risk-bar {
  width: 100%;
  height: 6px;
  background: #334155;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

.threshold-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  transition: width 0.3s ease;
}

.gauge-fill.caution {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.risk-fill.low {
  background: linear-gradient(90deg, #22c55e, #16a34a);
}

.threshold-labels, .heat-labels, .risk-labels, .scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #64748b;
  font-weight: 500;
}

.seismic-scale {
  position: relative;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #22c55e 0%, #f59e0b 50%, #ef4444 100%);
  border-radius: 2px;
  margin-bottom: 6px;
}

.scale-marker {
  position: absolute;
  top: -2px;
  width: 8px;
  height: 8px;
  background: #f8fafc;
  border: 2px solid #1e293b;
  border-radius: 50%;
  transform: translateX(-50%);
}

/* SPECIALIZED CONTENT */
.latest-event, .fire-stats, .incident-breakdown, .response-status {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.event-time, .event-location, .stat-item, .type-label, .response-item {
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
}

.type-count {
  color: #f8fafc;
  font-size: 11px;
  font-weight: 700;
}

.incident-type {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* TILE FOOTER */
.tile-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid #334155;
}

.alert-status {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.alert-status.normal {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.alert-status.caution {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.alert-status.warning {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.action-btn {
  color: #38bdf8;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.action-btn:hover {
  color: #0ea5e9;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .metrics-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .situation-bar {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
}

/* 🔷 OPERATIONAL MODULES STYLING */
.operational-modules {
  width: min(1660px, calc(100% - 46px));
  margin: 0 auto 32px !important;
  padding: 0;
}

.modules-header {
  margin-bottom: 24px;
}

.modules-header h2 {
  color: #f8fafc;
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 8px;
}

.modules-header p {
  color: #94a3b8;
  font-size: 14px;
  font-weight: 500;
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.operation-module {
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border: 1px solid #334155;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.operation-module:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
  border-color: #475569;
}

.operation-module.hydromet {
  border-top: 3px solid #38bdf8;
}

.operation-module.heat {
  border-top: 3px solid #f59e0b;
}

.operation-module.geological {
  border-top: 3px solid #ef4444;
}

.operation-module.fire {
  border-top: 3px solid #f97316;
}

.operation-module.incident {
  border-top: 3px solid #a78bfa;
}

/* MODULE BANNER */
.module-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid #334155;
}

.module-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.module-icon-large {
  font-size: 48px;
  margin-bottom: 8px;
}

.activity-indicator {
  position: absolute;
  bottom: -4px;
  right: -8px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.8);
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.pulse-dot.normal {
  background: #22c55e;
  box-shadow: 0 0 4px rgba(34, 197, 94, 0.4);
}

.pulse-dot.caution {
  background: #f59e0b;
  box-shadow: 0 0 4px rgba(245, 158, 11, 0.4);
}

.pulse-dot.active {
  background: #ef4444;
  box-shadow: 0 0 4px rgba(239, 68, 68, 0.4);
}

.pulse-text {
  font-size: 9px;
  font-weight: 700;
  color: #f8fafc;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.module-info h3 {
  color: #f8fafc;
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 4px;
}

.module-subtitle {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
}

.data-source {
  display: flex;
  gap: 8px;
  align-items: center;
}

.source-badge {
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.update-freq {
  color: #64748b;
  font-size: 10px;
  font-weight: 500;
}

/* MODULE CONTROLS */
.module-controls {
  padding: 20px 24px;
}

.quick-stats {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #334155;
}

.quick-stats .stat-item {
  text-align: center;
  flex: 1;
}

.stat-value {
  display: block;
  color: #f8fafc;
  font-size: 16px;
  font-weight: 900;
  margin-bottom: 4px;
}

.stat-label {
  color: #64748b;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px;
  color: #f8fafc;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-icon {
  font-size: 16px;
}

.btn-text {
  flex: 1;
  text-align: left;
}

/* MODULE STATUS */
.module-status {
  padding: 16px 24px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid #334155;
}

.status-bar {
  width: 100%;
  height: 4px;
  background: #334155;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}

.status-fill {
  height: 100%;
  transition: width 0.3s ease;
}

.status-fill.normal {
  background: linear-gradient(90deg, #22c55e, #16a34a);
}

.status-fill.caution {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.status-fill.active {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.status-text {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 500;
}

/* Dashboard visibility boost for dark operational cards */
.metrics-panel,
.operation-module {
  color: #f8fafc !important;
}

.metrics-panel .panel-header h2,
.modules-header h2,
.operation-module .module-info h3 {
  color: #ffffff !important;
  font-size: 22px !important;
  line-height: 1.25 !important;
  font-weight: 950 !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.32) !important;
}

.modules-header p,
.operation-module .module-subtitle,
.tile-source,
.update-freq,
.trend-period,
.threshold-labels,
.heat-labels,
.risk-labels,
.scale-labels,
.event-time,
.event-location,
.stat-item,
.type-label,
.response-item,
.module-status .status-text {
  color: #dbeafe !important;
  opacity: 1 !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
  font-weight: 800 !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35) !important;
}

.tile-title h4 {
  color: #ffffff !important;
  font-size: 16px !important;
  line-height: 1.25 !important;
  font-weight: 950 !important;
}

.primary-value .value {
  color: #ffffff !important;
  font-size: 34px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
}

.primary-value .unit {
  color: #e0f2fe !important;
  font-size: 16px !important;
  font-weight: 900 !important;
}

.trend,
.type-count {
  font-size: 14px !important;
  font-weight: 950 !important;
}

.quick-stats .stat-value {
  color: #ffffff !important;
  font-size: 22px !important;
  line-height: 1.05 !important;
  font-weight: 950 !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35) !important;
}

.quick-stats .stat-label {
  color: #e0f2fe !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
  font-weight: 900 !important;
}

.source-badge,
.tile-timestamp,
.pulse-text,
.alert-status {
  color: #ffffff !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
  font-weight: 950 !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.45) !important;
}

.action-grid .action-btn,
.tile-footer .action-btn {
  color: #ffffff !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
  font-weight: 900 !important;
}

.action-grid .action-btn {
  background: linear-gradient(135deg, #a86f2a, #c48639) !important;
  border-color: rgba(255,255,255,0.18) !important;
}

.tile-footer .action-btn {
  color: #7dd3fc !important;
}

.module-icon-large,
.tile-icon {
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.45));
}

/* Responsive adjustments for operational modules */
@media (max-width: 1200px) {
  .modules-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .modules-grid {
    grid-template-columns: 1fr;
  }
  
  .module-banner {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  
  .quick-stats {
    flex-direction: column;
    gap: 12px;
  }
  
  .quick-stats .stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .action-grid {
    grid-template-columns: 1fr;
  }
}

/* 🔷 ANALYTICS SECTION STYLING */
.analytics-section {
  width: min(1660px, calc(100% - 46px));
  margin: 0 auto 32px !important;
  padding: 0;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.analytics-card {
  background: linear-gradient(145deg, rgba(255, 252, 244, 0.98), rgba(248, 240, 226, 0.9));
  border: 1px solid var(--cmd-border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--cmd-shadow-soft);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}

.analytics-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--cmd-shadow);
}

.analytics-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.analytics-icon {
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
}

.analytics-title h3 {
  font-size: 18px;
  font-weight: 900;
  color: var(--cmd-text);
  margin-bottom: 4px;
}

.analytics-title p {
  font-size: 13px;
  color: var(--cmd-muted);
  font-weight: 600;
  font-style: italic;
}

/* Risk Overview Pie Chart */
.risk-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.pie-chart-container {
  position: relative;
  width: 120px;
  height: 120px;
}

.pie-chart {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  position: relative;
  background: conic-gradient(
    #22c55e 0deg 144deg,
    #f59e0b 144deg 252deg,
    #f97316 252deg 324deg,
    #ef4444 324deg 360deg
  );
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pie-chart::before {
  content: '';
  position: absolute;
  inset: 20%;
  background: white;
  border-radius: 50%;
}

.risk-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.legend-color.low { background: #22c55e; }
.legend-color.moderate { background: #f59e0b; }
.legend-color.high { background: #f97316; }
.legend-color.critical { background: #ef4444; }

/* Bulletins Timeline */
.bulletins-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 200px;
  overflow-y: auto;
}

.bulletin-item {
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.3);
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}

.bulletin-item:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: translateX(4px);
}

.bulletin-time {
  font-size: 11px;
  color: var(--cmd-muted);
  margin-bottom: 4px;
  font-weight: 600;
}

.bulletin-type {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 4px;
}

.bulletin-type.normal {
  background: #22c55e;
  color: white;
}

.bulletin-type.warning {
  background: #f59e0b;
  color: white;
}

.bulletin-type.critical {
  background: #ef4444;
  color: white;
}

.bulletin-content p {
  font-size: 13px;
  color: var(--cmd-text);
  margin: 0;
  font-weight: 500;
}

/* Incidents Status */
.incidents-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-number {
  font-size: 24px;
  font-weight: 900;
  color: var(--cmd-text);
}

.stat-label {
  font-size: 13px;
  color: var(--cmd-muted);
  font-weight: 600;
}

.stat-bar {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.stat-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.stat-item.validation .stat-fill { background: #3b82f6; }
.stat-item.ongoing .stat-fill { background: #f59e0b; }
.stat-item.resolved .stat-fill { background: #22c55e; }

/* Map View */
.map-container {
  position: relative;
  width: 100%;
  height: 150px;
  border-radius: 8px;
  overflow: hidden;
}

.map-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e0f2fe, #bae6fd);
  position: relative;
}

.map-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  color: white;
  text-align: center;
}

.map-overlay p {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

.map-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--cmd-text);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.map-btn:hover {
  background: white;
  transform: translateY(-2px);
}

/* Theme Panel */
.theme-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.theme-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.3);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-option:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

.theme-option.active {
  border-color: var(--cmd-text);
  background: rgba(255, 255, 255, 0.5);
}

.theme-preview {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.theme-preview.normal { background: linear-gradient(135deg, #22c55e, #16a34a); }
.theme-preview.rain { background: linear-gradient(135deg, #38bdf8, #0ea5e9); }
.theme-preview.heat { background: linear-gradient(135deg, #f59e0b, #d97706); }
.theme-preview.geo { background: linear-gradient(135deg, #ef4444, #dc2626); }
.theme-preview.fire { background: linear-gradient(135deg, #f97316, #ea580c); }

.theme-option span {
  font-size: 12px;
  font-weight: 600;
  color: var(--cmd-text);
}

/* Responsive adjustments for analytics */
@media (max-width: 1200px) {
  .analytics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .analytics-grid {
    grid-template-columns: 1fr;
  }
  
  .analytics-header {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  
  .theme-options {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* SIMPLE WORKING NAVIGATION INTERACTIONS */
.nav-links button:hover {
  transform: translateX(8px) !important;
  background: rgba(255,255,255,0.15) !important;
  transition: all 0.3s ease !important;
}

.nav-links button:active {
  transform: translateX(4px) scale(0.95) !important;
  transition: all 0.1s ease !important;
}

.nav-links button.active {
  background: linear-gradient(135deg, #b17a3a, #9a6a32) !important;
  transform: translateX(8px) !important;
}

.layer-top-nav .layer-tile.dashboard { border-left: 4px solid #38bdf8 !important; }
.layer-top-nav .layer-btn.home-btn { border-left: 4px solid #f59e0b !important; }
.layer-top-nav .layer-btn.dashboard-btn { border-left: 4px solid #38bdf8 !important; }
.layer-top-nav .layer-tile.monitoring { border-left: 4px solid #22c55e !important; }
.layer-top-nav .layer-tile.operations { border-left: 4px solid #ef4444 !important; }
.layer-top-nav .layer-tile.intelligence { border-left: 4px solid #f59e0b !important; }
.layer-top-nav .layer-tile.public { border-left: 4px solid #14b8a6 !important; }
.layer-top-nav .layer-tile.agency-tools { border-left: 4px solid #a78bfa !important; }
.layer-top-nav .layer-tile.news { border-left: 4px solid #f97316 !important; }
.layer-top-nav .layer-tile.disaster-report { border-left: 4px solid #fb7185 !important; }
.layer-top-nav .layer-tile.citizen-charter,
.layer-top-nav .layer-tile.training { border-left: 4px solid #60a5fa !important; }
.layer-top-nav .layer-tile.utility { border-left: 4px solid #94a3b8 !important; }

.layer-top-nav .nav-links > button:hover,
.layer-top-nav .utility-menu > button:hover,
.layer-top-nav .layer-btn.home-btn:hover,
.layer-top-nav .layer-tile:hover {
  transform: translateY(-1px);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.04)),
    #103852 !important;
  border-color: rgba(226, 232, 240, 0.62) !important;
  box-shadow: 0 10px 20px rgba(2, 16, 34, 0.22) !important;
}

.layer-top-nav .nav-links [data-page].active,
.layer-top-nav .layer-btn.home-btn.active,
.layer-top-nav .layer-tile.utility.active {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(226, 242, 255,0.94)) !important;
  color: #082f49 !important;
  border-color: #7dd3fc !important;
  box-shadow: 0 0 0 2px rgba(125, 211, 252, 0.36), 0 12px 24px rgba(2, 16, 34, 0.24) !important;
  transform: none;
}

.layer-top-nav .utility-menu {
  display: inline-flex;
}

.layer-top-nav .utility-panel {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  box-shadow: 0 20px 40px rgba(2, 16, 34, 0.28);
}

.pagasa-typhoon-card .section-title,
.pagasa-cyclone-card .section-title,
.weather-advisory-card .section-title,
.earthquake-card .section-title,
.hotline-card .section-title,
.public-service-card .section-title,
.contact-flow-card .section-title,
.utility-panel .section-title,
#incidentReviewQueueCard .section-title,
.section-header,
.card-header,
.module-header,
.gradient-header,
.dark-header,
.dark-title {
  color: #ffffff !important;
}

.section-header *,
.card-header *,
.module-header *,
.gradient-header *,
.dark-header *,
.dark-title * {
  color: #ffffff !important;
}

.control-btn,
.control-btn *,
button:not(.light-button),
.btn:not(.light-button),
.action-button,
.primary-button,
.facebook-button,
.refresh-button,
.contact-flow-action,
.contact-flow-action * {
  color: #ffffff !important;
  opacity: 1 !important;
}

button.light-button,
.btn.light-button,
.call-hotline-button,
.open-report-button,
.white-button {
  color: #111827 !important;
}

table,
thead,
tbody,
tr,
td,
th {
  color: #111827 !important;
  opacity: 1 !important;
}

#stormStatus,
#cycloneEarlyStatus,
#cycloneSourceNote,
#rainObservedStatus,
#quake-list strong,
#quake-list small,
#incidentReviewQueueList strong,
#incidentReviewQueueList small,
.hotline-item .label,
.hotline-item a,
.control-card-label,
#roleStatus,
#accessStatus,
#notifyStatus,
#bandwidthStatus,
#soundStatus,
#installStatus {
  color: #111827 !important;
  opacity: 1 !important;
}

#roleBadge {
  color: #111827 !important;
  background: rgba(15, 23, 42, 0.08) !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
}

.incident-alert,
.incident-marquee,
.active-incident-alert,
.alert-banner,
.queued-submission-note,
.review-queue-note,
#incidentTickerText,
#incidentReviewQueueList .review-queue-note,
#incidentReviewQueueList .queued-submission-note {
  color: #111827 !important;
  opacity: 1 !important;
}

.calendar-weekdays,
.calendar-weekdays *,
.weekday,
.weekday-label,
.calendar-day-header,
.calendar-day-header * {
  color: #ffffff !important;
  opacity: 1 !important;
}

.officer-editing-title,
.duty-officer-title,
.locked-editing-title,
.pagasa-title,
.weather-advisory-title,
#pagasaCycloneUpdateTitle,
#latestWeatherAdvisoryTitle {
  color: #ffffff !important;
  opacity: 1 !important;
}

/* ===== FINAL SCREENSHOT READABILITY FIXES ===== */
.section-title,
.section-title *,
.ops-panel-title,
.ops-panel-title * {
  color: #ffffff !important;
  text-shadow: none !important;
}

#dashboardPage .home-landing-card {
  background:
    linear-gradient(135deg, rgba(247,250,252,0.96), rgba(236,242,247,0.98)),
    radial-gradient(circle at top right, rgba(20, 93, 160, 0.08), transparent 24%) !important;
  border: 1px solid rgba(11, 53, 82, 0.14) !important;
}

#dashboardPage .home-landing-card,
#dashboardPage .home-landing-card *,
#dashboardPage .home-landing-card .home-landing-title,
#dashboardPage .home-landing-card .home-landing-subtitle,
#dashboardPage .home-landing-card .home-status-line,
#dashboardPage .home-landing-card .home-status-line span,
#dashboardPage .home-landing-card .home-status-line strong,
#dashboardPage .home-landing-card .home-landing-tags span {
  color: #0f172a !important;
}

#dashboardPage .home-landing-card .home-landing-subtitle,
#dashboardPage .home-landing-card .home-status-line span,
#dashboardPage .home-landing-card .home-landing-tags span {
  color: #475569 !important;
}

#dashboardPage .home-action-secondary,
#dashboardPage .home-action-secondary * {
  background: rgba(226, 234, 242, 0.96) !important;
  border-color: rgba(11, 53, 82, 0.14) !important;
  color: #0f172a !important;
}

#incident-log table {
  background: rgba(248, 251, 253, 0.98) !important;
  border: 1px solid rgba(11, 53, 82, 0.14) !important;
}

#incident-log thead th {
  background: #123f6b !important;
  color: #ffffff !important;
}

#incident-log tbody td,
#incident-log tbody td *,
#incident-log tbody td[colspan] {
  color: #111827 !important;
  background: #ffffff !important;
}

#incident-log tbody tr:nth-child(even) td,
#incident-log tbody tr:nth-child(even) td * {
  background: #eef4f8 !important;
}

#incident-log .incident-link,
#incident-log .incident-link * {
  color: #0b5fc4 !important;
}

#incident-log .status-badge,
#incident-log .status-badge * {
  color: inherit !important;
}

.facebook-embed-link,
.facebook-embed-link * {
  color: #ffffff !important;
}

.training-hero,
.training-hero .progress-card {
  background:
    linear-gradient(135deg, rgba(247,250,252,0.96), rgba(236,242,247,0.98)),
    radial-gradient(circle at top right, rgba(20, 93, 160, 0.08), transparent 24%) !important;
}

.training-hero h3,
.training-hero p,
.training-hero .progress-title,
.training-hero .progress-percentage,
.training-hero .progress-card,
.training-hero .progress-card * {
  color: #0f172a !important;
}

.training-tabs .tab-btn:not(.active),
.training-tabs .tab-btn:not(.active) * {
  color: #16324f !important;
}

.training-tabs .tab-btn:not(.active) {
  background: #f8fafc !important;
  border-color: rgba(11, 53, 82, 0.14) !important;
}

.training-tabs .tab-btn:not(.active) .tab-icon {
  color: #083b7a !important;
  background: #f8fafc !important;
  border-color: rgba(11, 53, 82, 0.12) !important;
}

/* ===== EXPLICIT TITLE PILL FIXES ===== */
.pagasa-eoc-card .section-title,
.travel-route-card .section-title,
.pagasa-facebook-card .section-title,
.barangay-rainfall-card .section-title,
.adjacent-rainfall-card .section-title,
.weather-advisory-card .section-title,
.pagasa-cyclone-card .section-title,
.pagasa-typhoon-card .section-title,
.earthquake-card .section-title,
.top-status-card .section-title,
.monitoring-stat .section-title,
.summary-card .section-title,
.embed-card .section-title,
.card .section-title,
.section-title {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: none !important;
}

.pagasa-eoc-card .section-title *,
.travel-route-card .section-title *,
.pagasa-facebook-card .section-title *,
.barangay-rainfall-card .section-title *,
.adjacent-rainfall-card .section-title *,
.weather-advisory-card .section-title *,
.pagasa-cyclone-card .section-title *,
.pagasa-typhoon-card .section-title *,
.earthquake-card .section-title *,
.top-status-card .section-title *,
.monitoring-stat .section-title *,
.summary-card .section-title *,
.embed-card .section-title *,
.card .section-title *,
.section-title * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

/* ===== CALENDAR HEADER READABILITY FIX ===== */
#mdrrmo-calendar .image-overlay #calendarMonthLabel,
#mdrrmo-calendar .image-overlay #calendarMonthLabel *,
#mdrrmo-calendar .image-overlay .hint-text,
#mdrrmo-calendar .image-overlay .hint-text *,
#mdrrmo-calendar .image-overlay p,
#mdrrmo-calendar .image-overlay p * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

#mdrrmo-calendar .image-overlay .hint-text {
  font-weight: 700 !important;
}


@keyframes pulseAlert {
  0% { box-shadow: 0 0 0 0 rgba(239,68,68,0.7); }
  70% { box-shadow: 0 0 0 10px rgba(239,68,68,0); }
  100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}

/* ✅ FIRE ALERT CARD STYLES */
.fire-alert-card {
  border-left: 5px solid #ef4444;
}

.fire-alert-title {
  font-weight: 700;
  color: #ef4444;
}

.fire-alert-status {
  font-size: 14px;
}

.fire-alert-time {
  font-size: 12px;
  opacity: 0.8;
}

.advisory-draft-card {
  border-left: 5px solid #0b5394;
}

/* Tighten the top dashboard status cards into one continuous row. */
.top-status-board {
  gap: 0 !important;
}

.top-status-board .top-status-card {
  border-radius: 0 !important;
}

.top-status-board .top-status-card:first-child {
  border-top-left-radius: 16px !important;
  border-bottom-left-radius: 16px !important;
}

.top-status-board .top-status-card:last-child {
  border-top-right-radius: 16px !important;
  border-bottom-right-radius: 16px !important;
}

@media (max-width: 768px) {
  .top-status-board .top-status-card:first-child {
    border-radius: 16px 16px 0 0 !important;
  }

  .top-status-board .top-status-card:last-child {
    border-radius: 0 0 16px 16px !important;
  }
}

.top-status-board + .home-landing {
  margin-top: 0 !important;
}

.weather-impact-card {
  background:
    linear-gradient(180deg, rgba(252,253,254,0.98), rgba(237,246,252,0.97)) !important;
}

.duty-decision-card {
  background:
    linear-gradient(180deg, rgba(252,253,254,0.98), rgba(240,248,244,0.97)) !important;
}

.weather-impact-level {
  margin-top: 12px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(8, 59, 122, 0.08);
  border: 1px solid rgba(8, 59, 122, 0.14);
}

.weather-impact-kicker,
.weather-impact-grid span,
.weather-impact-action span {
  display: block;
  margin-bottom: 5px;
  color: #475569 !important;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.weather-impact-level strong {
  display: block;
  color: #083b7a !important;
  font-size: 24px;
  line-height: 1.15;
}

.weather-impact-level p {
  margin: 8px 0 0;
  color: #16324f !important;
  font-size: 14px;
  line-height: 1.5;
}

.weather-impact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.weather-impact-grid div,
.weather-impact-action {
  padding: 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(11, 53, 82, 0.12);
}

.weather-impact-grid strong,
.weather-impact-action strong {
  color: #0f172a !important;
  font-size: 13px;
  line-height: 1.35;
}

.weather-impact-action {
  margin-top: 12px;
}

.duty-decision-output {
  margin-top: 12px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(25, 135, 84, 0.09);
  border: 1px solid rgba(25, 135, 84, 0.16);
}

.duty-decision-output span {
  display: block;
  margin-bottom: 5px;
  color: #475569 !important;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.duty-decision-output strong {
  display: block;
  color: #14532d !important;
  font-size: 22px;
  line-height: 1.15;
}

.duty-decision-output p {
  margin: 8px 0 0;
  color: #16324f !important;
  font-size: 14px;
  line-height: 1.5;
}

.duty-decision-editor {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(236, 253, 245, 0.78);
  border: 1px solid rgba(25, 135, 84, 0.16);
}

.duty-decision-editor label {
  display: block;
  margin: 0 0 6px;
  color: #14532d !important;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.duty-decision-editor select,
.duty-decision-editor textarea {
  width: 100%;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(11, 53, 82, 0.18);
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
}

.duty-decision-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.duty-decision-actions button {
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: #198754;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.duty-decision-actions button:last-child {
  background: #475569;
}

.duty-decision-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.duty-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.duty-checklist label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(11, 53, 82, 0.12);
  color: #0f172a !important;
  font-size: 13px;
  font-weight: 700;
}

.duty-checklist input {
  width: 16px;
  height: 16px;
  accent-color: #198754;
}

.duty-followup-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.duty-followup-list div {
  padding: 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(11, 53, 82, 0.12);
}

.duty-followup-list span {
  display: block;
  margin-bottom: 5px;
  color: #475569 !important;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.duty-followup-list strong {
  color: #0f172a !important;
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 768px) {
  .weather-impact-grid {
    grid-template-columns: 1fr;
  }

  .duty-checklist {
    grid-template-columns: 1fr;
  }
}

/* Header photo background */
.site-header {
  background:
    linear-gradient(180deg, rgba(3, 20, 32, 0.76), rgba(3, 20, 32, 0.62)),
    url("images/site_background.jpg") center 43% / cover no-repeat !important;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: 0 18px 38px rgba(2, 16, 34, 0.3);
}

.site-header .header-title h1,
.site-header .header-title .municipality-name,
.site-header .header-title .subtitle,
.site-header .header-title .location,
.site-header .header-title .eyebrow {
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.58);
}

/* =========================================================
   ADAPTIVE COMMAND CENTER THEME
   Visual-only restyle inspired by the operational command
   center reference. Existing IDs, buttons, data feeds, and
   layer navigation remain unchanged.
   ========================================================= */
:root {
  --cmd-bg: #f4efe6;
  --cmd-bg-soft: #fbf6eb;
  --cmd-surface: rgba(255, 251, 242, 0.92);
  --cmd-surface-strong: #fffaf0;
  --cmd-border: rgba(78, 61, 39, 0.16);
  --cmd-text: #201b14;
  --cmd-muted: #6f6253;
  --cmd-sidebar: #241e13;
  --cmd-sidebar-2: #342817;
  --cmd-brown: #8a5a2b;
  --cmd-gold: #b17a3a;
  --cmd-amber: #f59e0b;
  --cmd-green: #3f8f43;
  --cmd-teal: #0f766e;
  --cmd-red: #d43d27;
  --cmd-shadow: 0 16px 34px rgba(54, 43, 29, 0.14);
  --cmd-shadow-soft: 0 8px 22px rgba(54, 43, 29, 0.12);
}

html,
body {
  background:
    radial-gradient(circle at 18% 6%, rgba(255, 255, 255, 0.72), transparent 26%),
    linear-gradient(135deg, #f7f1e6 0%, #f3eadb 46%, #efe4d2 100%) !important;
  color: var(--cmd-text) !important;
}

body {
  font-family: "Inter", "Segoe UI", Arial, sans-serif !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(66, 47, 25, 0.05), transparent 32%),
    radial-gradient(circle at 75% 18%, rgba(177, 122, 58, 0.12), transparent 30%);
  z-index: 0;
}

.page,
.home-section,
.site-dev-banner,
.monitoring-toolbar,
.hero-container,
.hero-news,
.layer-header {
  position: relative;
  z-index: 1;
}

@media (min-width: 981px) {
  body {
    padding-left: 380px;
  }

  .site-header {
    position: fixed !important;
    inset: 0 auto 0 0;
    width: 380px;
    min-height: 100vh;
    height: 100vh;
    padding: 35px 25px 30px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 18px !important;
    overflow-y: auto;
    background:
      linear-gradient(180deg, rgba(36, 30, 19, 0.96), rgba(30, 27, 18, 0.98)),
      url("images/site_background.jpg") center / cover no-repeat !important;
    color: #fff8ea !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-bottom: 0 !important;
    box-shadow: 16px 0 36px rgba(26, 20, 12, 0.36) !important;
    z-index: 50;
  }

  .site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
      linear-gradient(180deg, rgba(29, 24, 15, 0.78), rgba(29, 24, 15, 0.94)),
      radial-gradient(circle at top left, rgba(177, 122, 58, 0.24), transparent 34%);
    z-index: -1;
  }

  .site-header .header-logo,
  .site-header .header-title,
  .site-header .layer-top-nav {
    width: 100%;
  }

  .site-header .header-logo {
    position: absolute !important;
    top: 35px !important;
    left: 25px !important;
    width: 126px !important;
    min-height: 66px !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    justify-content: flex-start !important;
    align-items: center !important;
    margin: 0 !important;
  }

  .site-header .header-logo-frame {
    width: 56px !important;
    height: 56px !important;
    padding: 5px !important;
    border-radius: 16px !important;
    background: rgba(255, 248, 234, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), 0 12px 24px rgba(0,0,0,0.22) !important;
  }

  .site-header .header-logo img {
    height: 42px !important;
    max-height: 42px !important;
    max-width: 42px !important;
    padding: 4px !important;
    border-radius: 10px !important;
  }

  .site-header .header-title {
    position: absolute !important;
    top: 40px !important;
    left: 162px !important;
    right: 25px !important;
    width: auto !important;
    text-align: center !important;
    min-height: 120px;
    padding: 0 0 20px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .site-header .header-title h1 {
    display: block !important;
    font-size: clamp(15px, 4vw, 20px) !important;
    line-height: 1.12 !important;
    max-width: 260px;
    margin: 0 !important;
    color: #fff9ed !important;
    font-weight: 950 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
  }

  .site-header .header-title h1::before {
    content: none !important;
  }

  .site-header .header-title .municipality-name {
    display: block !important;
    margin: 0 0 6px !important;
    color: #fbbf24 !important;
    font-size: clamp(28px, 7.2vw, 38px) !important;
    line-height: 0.95 !important;
    font-weight: 950 !important;
    letter-spacing: 0 !important;
    text-transform: uppercase !important;
  }

  .site-header .header-title .subtitle,
  .site-header .header-title .location,
  .site-header .header-title .eyebrow {
    color: rgba(255, 248, 234, 0.82) !important;
    text-shadow: none !important;
  }

  .site-header .header-title .subtitle {
    margin-top: 7px;
    font-size: clamp(11px, 3vw, 14px) !important;
    line-height: 1.18 !important;
    letter-spacing: 0;
    text-transform: none;
  }

  .site-header .header-title .subtitle::before {
    content: none !important;
  }

  .site-header .header-title .location,
  .site-header .header-title .eyebrow,
  .site-header .header-seal {
    display: none !important;
  }

  .layer-top-nav.header-nav {
    position: absolute !important;
    top: 190px !important;
    left: 25px !important;
    right: 25px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  .layer-top-nav.header-nav::before {
    content: "";
    display: block;
    margin: 0;
  }

  .header-nav .nav-links,
  .layer-top-nav .nav-links {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    width: calc(100% - 36px) !important;
  }

  .header-nav.mobile-nav-collapsed .nav-links > *,
  .layer-top-nav.mobile-nav-collapsed .nav-links > * {
    display: flex !important;
  }

  .header-nav.mobile-nav-collapsed .nav-links > .utility-menu,
  .layer-top-nav.mobile-nav-collapsed .nav-links > .utility-menu {
    display: block !important;
  }

  .layer-top-nav .nav-links > button,
  .layer-top-nav .utility-menu > button,
  .layer-top-nav .layer-btn.home-btn,
  .layer-top-nav .layer-tile {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 10px 16px !important;
    border-radius: 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-left: 0 !important;
    background: transparent !important;
    color: rgba(255, 248, 234, 0.9) !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    line-height: 1.18 !important;
    letter-spacing: 0 !important;
    box-shadow: none !important;
    text-align: left !important;
    text-transform: none !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  .layer-top-nav .nav-links [data-page].active,
  .layer-top-nav .layer-btn.home-btn.active,
  .layer-top-nav .layer-tile.utility.active {
    background: linear-gradient(135deg, #9a6a32, #775025) !important;
    color: #fff8ea !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 10px 22px rgba(0,0,0,0.22) !important;
  }

  .utility-menu,
  .layer-top-nav .utility-menu {
    width: 100% !important;
    display: block !important;
  }

  .utility-panel {
    left: 0 !important;
    right: auto !important;
    top: calc(100% + 8px) !important;
    width: 280px !important;
    background: #fff9ec !important;
    border-color: rgba(78, 61, 39, 0.18) !important;
  }

  .incident-ticker {
    width: 100% !important;
    min-height: auto !important;
    margin-top: auto !important;
    padding: 18px 20px !important;
    border-radius: 14px !important;
    background: linear-gradient(135deg, #d43d27, #9f2a1c) !important;
    color: #fff8ea !important;
    box-shadow: 0 14px 26px rgba(0,0,0,0.22) !important;
    position: relative !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
  }

  .incident-ticker:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 18px 32px rgba(0,0,0,0.28) !important;
  }

  .incident-ticker::before {
    content: "QUICK ACTIONS";
    display: block !important;
    margin: 0 0 16px 0 !important;
    color: rgba(255, 248, 234, 0.9) !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
  }

  .incident-ticker-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }

  .quick-action-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px 14px !important;
    border-radius: 10px !important;
    background: rgba(255,255,255,0.1) !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
  }

  .quick-action-item:hover {
    background: rgba(255,255,255,0.18) !important;
    transform: translateX(4px) !important;
    border-color: rgba(255,255,255,0.25) !important;
  }

  .quick-action-item:active {
    transform: translateX(2px) scale(0.98) !important;
  }

  .quick-action-icon {
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255,255,255,0.2) !important;
    border-radius: 6px !important;
    font-size: 14px !important;
  }

  .quick-action-text {
    flex: 1 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
  }

  .mobile-nav-toggle {
    display: none !important;
  }
}

.site-dev-banner {
  width: min(1660px, calc(100% - 46px));
  margin: 22px auto 24px !important;
  padding: 20px 28px !important;
  display: flex;
  align-items: center;
  gap: 18px;
  border-radius: 14px !important;
  border: 1px solid rgba(245, 158, 11, 0.48) !important;
  background:
    linear-gradient(90deg, rgba(255, 248, 216, 0.98), rgba(255, 242, 198, 0.92)) !important;
  box-shadow: var(--cmd-shadow-soft) !important;
  color: #352411 !important;
}

.site-dev-banner::before {
  content: "!";
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff7df;
  color: #dd6b20;
  font-size: 38px;
  font-weight: 950;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.28);
}

.site-dev-banner strong {
  display: block;
  color: #f05a1a !important;
  font-size: 23px !important;
  text-transform: uppercase;
}

.site-dev-banner,
.site-dev-banner * {
  text-align: left !important;
}

.page,
.home-section,
.hero-container,
.hero-news,
.monitoring-toolbar,
.top-status-board,
.dashboard-weather-overview,
.home-landing {
  width: min(1660px, calc(100% - 46px)) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.monitoring-toolbar,
.dashboard-monitoring-toolbar {
  min-height: 86px;
  margin-top: 22px !important;
  margin-bottom: 22px !important;
  padding: 18px 24px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 18px !important;
  border: 0 !important;
  border-radius: 18px !important;
  background: rgba(255, 250, 240, 0.78) !important;
  box-shadow: none !important;
}

.dashboard-monitoring-toolbar::before {
  content: "OPERATIONAL COMMAND CENTER\A Monitoring today. Protecting tomorrow.";
  white-space: pre;
  color: var(--cmd-text);
  font-size: clamp(30px, 3.2vw, 48px);
  line-height: 1.12;
  font-weight: 950;
  letter-spacing: 0.02em;
}

.monitoring-toolbar button,
.control-btn,
button:not(.mobile-nav-toggle) {
  border-radius: 12px !important;
  border: 1px solid rgba(138, 90, 43, 0.22) !important;
  background: linear-gradient(135deg, #9a6a32, #b17a3a) !important;
  color: #fff8ea !important;
  box-shadow: var(--cmd-shadow-soft) !important;
}

.monitoring-last-sync {
  margin-left: auto;
  color: var(--cmd-muted) !important;
  font-weight: 800;
}

.dashboard-weather-overview,
.top-status-board {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;
  padding: 0 !important;
  margin-top: 10px !important;
  margin-bottom: 24px !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.monitoring-stat,
.top-status-card,
.home-live-card,
.home-mini-panel,
.card,
.embed-card,
.ops-workspace-card,
.public-service-card,
.dashboard-ops-transfer-grid > .card {
  border-radius: 16px !important;
  border: 1px solid var(--cmd-border) !important;
  background:
    linear-gradient(145deg, rgba(255, 252, 244, 0.98), rgba(248, 240, 226, 0.9)) !important;
  box-shadow: var(--cmd-shadow-soft) !important;
  color: var(--cmd-text) !important;
}

.monitoring-stat {
  min-height: 168px;
  padding: 28px 30px !important;
  display: grid;
  align-content: center;
}

.monitoring-stat h3,
.home-live-label,
.home-mini-panel h3 {
  color: #5d5348 !important;
  font-size: 13px !important;
  font-weight: 950 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
}

.monitoring-stat .value,
.home-live-value,
.home-status-line strong {
  color: #17130d !important;
  font-size: clamp(30px, 2.35vw, 42px) !important;
  line-height: 1.05 !important;
  font-weight: 950 !important;
}

.monitoring-stat p,
.home-live-note,
.home-feed-item span,
.home-status-line span {
  color: var(--cmd-muted) !important;
}

#dashboardPage .home-landing-card {
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#dashboardPage .home-landing-grid {
  display: grid !important;
  gap: 26px !important;
}

#dashboardPage .home-landing-top {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 22px !important;
  align-items: stretch !important;
}

#dashboardPage .home-landing-main {
  display: none !important;
}

#dashboardPage .home-landing-main::before {
  content: "!";
  position: absolute;
  left: 34px;
  top: 50%;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border-radius: 50%;
  background: #fff7df;
  color: #dd6b20;
  font-size: 42px;
  font-weight: 950;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.26);
}

#dashboardPage .home-landing-title {
  margin: 0 0 7px !important;
  color: #f05a1a !important;
  font-size: clamp(24px, 2.2vw, 34px) !important;
  line-height: 1 !important;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

#dashboardPage .home-landing-subtitle {
  max-width: none !important;
  margin: 0 !important;
  color: #3b3128 !important;
  font-size: 18px !important;
  font-weight: 700 !important;
}

#dashboardPage .home-landing-tags {
  display: none !important;
}

#dashboardPage .home-landing-actions {
  position: absolute;
  right: 28px;
  top: 50%;
  margin: 0 !important;
  transform: translateY(-50%);
}

.home-action-primary,
.home-action-secondary,
.facebook-embed-link,
.windy-launch-btn,
.duty-decision-actions button {
  border-radius: 12px !important;
  background: linear-gradient(135deg, #9a6a32, #b17a3a) !important;
  color: #fff8ea !important;
  border: 0 !important;
  box-shadow: var(--cmd-shadow-soft) !important;
}

#dashboardPage .home-landing-side .home-mini-panel {
  min-height: 100%;
  padding: 30px 34px !important;
  background:
    linear-gradient(145deg, rgba(255, 252, 244, 0.98), rgba(248, 240, 226, 0.92)) !important;
}

#dashboardPage .home-landing-side {
  width: 100% !important;
}

#dashboardPage .home-landing-side .home-mini-panel h3 {
  font-size: 18px !important;
  letter-spacing: 0.08em !important;
}

#dashboardPage .home-landing-side .home-status-line {
  display: grid !important;
  grid-template-columns: minmax(160px, 0.34fr) minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 22px !important;
  padding: 18px 0 !important;
}

#dashboardPage .home-landing-side .home-status-line span {
  font-size: 15px !important;
  font-weight: 800 !important;
}

#dashboardPage .home-landing-side .home-status-line strong {
  font-size: clamp(20px, 2vw, 30px) !important;
  line-height: 1.2 !important;
}

.home-status-line {
  border-bottom: 1px solid rgba(78, 61, 39, 0.1) !important;
}

#dashboardPage .home-live-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(300px, 1fr)) !important;
  gap: 22px !important;
}

#dashboardPage .home-landing-bottom {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 24px !important;
  align-items: stretch !important;
}

#dashboardPage .home-live-card,
#dashboardPage .fire-alert-card {
  min-height: 230px;
  padding: 30px 30px 28px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  overflow: hidden;
}

#dashboardPage .home-live-card::before,
#dashboardPage .fire-alert-card::before {
  height: 0 !important;
}

#dashboardPage .home-live-card:nth-child(1)::after,
#dashboardPage .home-live-card:nth-child(2)::after,
#dashboardPage .home-live-card:nth-child(3)::after,
#dashboardPage .home-live-card:nth-child(4)::after,
#dashboardPage .home-live-card:nth-child(5)::after,
#dashboardPage .fire-alert-card::after {
  display: block;
  order: -1;
  margin-bottom: 12px;
  font-size: 46px;
  line-height: 1;
}

#dashboardPage .home-live-card:nth-child(1)::after { content: "🌧"; }
#dashboardPage .home-live-card:nth-child(2)::after { content: "🌦"; }
#dashboardPage .home-live-card:nth-child(3)::after { content: "🌡"; }
#dashboardPage .home-live-card:nth-child(4)::after { content: "👥"; }
#dashboardPage .home-live-card:nth-child(5)::after { content: "📣"; }
#dashboardPage .fire-alert-card::after { content: "🔥"; }

#dashboardPage .fire-alert-card {
  border-left: 0 !important;
}

#dashboardPage .fire-alert-card .card-header {
  padding: 0 !important;
  background: transparent !important;
  color: #5d5348 !important;
  font-size: 13px !important;
  font-weight: 950 !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#dashboardPage .fire-alert-card .card-body {
  padding: 0 !important;
}

#dashboardPage .home-support-panels {
  display: none !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 22px !important;
  width: 100% !important;
  min-width: 0 !important;
}

#dashboardPage .analytics-card.map-view,
#dashboardPage .analytics-card.theme-panel {
  display: none !important;
}

#dashboardPage .home-support-panels .home-mini-panel {
  min-height: 320px;
  padding: 28px 30px !important;
  width: 100% !important;
  min-width: 0 !important;
}

#dashboardPage .home-feed-list {
  display: grid !important;
  gap: 14px !important;
}

#dashboardPage .home-feed-item {
  padding: 16px 18px !important;
  border-radius: 14px !important;
  background: rgba(255, 252, 244, 0.86) !important;
  border: 1px solid rgba(78, 61, 39, 0.12) !important;
}

#dashboardPage .home-feed-item strong {
  font-size: 15px !important;
  line-height: 1.25 !important;
}

#dashboardPage .home-feed-item span {
  display: block !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  white-space: normal !important;
  overflow-wrap: normal !important;
}

.dashboard-ops-transfer-grid {
  margin-top: 0 !important;
}

#dashboardPage .dashboard-ops-transfer-grid {
  grid-template-columns: repeat(2, minmax(360px, 1fr)) !important;
  gap: 22px !important;
}

#dashboardPage .dashboard-ops-transfer-grid > .card {
  min-height: 330px;
  padding: 30px !important;
}

.dashboard-grid,
.public-tools-grid,
.intelligence-grid,
.agency-facebook-updates-grid,
.capabilities-grid {
  gap: 22px !important;
}

.section-title,
.card .section-title,
.embed-card .section-title {
  width: max-content !important;
  max-width: 100% !important;
  padding: 14px 22px !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg, #2f281b, #8a5a2b) !important;
  color: #fff8ea !important;
  box-shadow: var(--cmd-shadow-soft) !important;
}

.card h2,
.card h3,
.card h4,
.card p,
.card li,
.card span,
.card strong,
.card label,
.embed-card,
.embed-card * {
  color: var(--cmd-text) !important;
  text-shadow: none !important;
}

.card .section-title,
.card .section-title *,
.embed-card .section-title,
.embed-card .section-title *,
.section-title,
.section-title * {
  color: #fff8ea !important;
  -webkit-text-fill-color: #fff8ea !important;
}

.monitoring-stat:nth-child(1),
.home-live-card:nth-child(1),
.pagasa-cyclone-card,
.weather-advisory-card,
.barangay-rainfall-card,
.adjacent-rainfall-card {
  border-top: 5px solid var(--cmd-teal) !important;
}

.monitoring-stat:nth-child(2),
.home-live-card:nth-child(3),
.heat-index-card {
  border-top: 5px solid #f97316 !important;
}

.monitoring-stat:nth-child(3),
.earthquake-card,
.volcano-monitoring-card {
  border-top: 5px solid var(--cmd-brown) !important;
}

.monitoring-stat:nth-child(4),
.fire-alert-card,
.forest-fire-card {
  border-top: 5px solid var(--cmd-red) !important;
}

.incident-card,
.travel-route-card,
.dashboard-ops-transfer-grid .travel-route-card {
  border-top: 5px solid var(--cmd-green) !important;
}

table,
thead,
tbody,
tr,
td,
th {
  color: var(--cmd-text) !important;
}

thead th,
#brgyRainTable thead th,
#adjacentRainTable thead th {
  background: #3a2d1d !important;
  color: #fff8ea !important;
}

tbody tr:nth-child(even),
#brgyRainTable tbody tr:nth-child(even),
#adjacentRainTable tbody tr:nth-child(even) {
  background: rgba(177, 122, 58, 0.06) !important;
}

.weather-badge {
  border-radius: 999px !important;
}

@media (max-width: 1280px) {
  #dashboardPage .home-live-grid {
    grid-template-columns: repeat(2, minmax(300px, 1fr)) !important;
  }

  #dashboardPage .dashboard-ops-transfer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .dashboard-weather-overview,
  .top-status-board {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #dashboardPage .home-landing-top {
    grid-template-columns: 1fr !important;
  }

  #dashboardPage .home-landing-actions {
    position: static;
    transform: none;
    margin-top: 18px !important;
  }

  #dashboardPage .home-landing-side .home-status-line {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
    padding: 14px 0 !important;
  }

  #dashboardPage .home-landing-side .home-status-line strong {
    font-size: clamp(18px, 5.5vw, 24px) !important;
  }
}

@media (max-width: 980px) {
  body {
    padding-left: 0;
  }

  .site-header {
    position: relative !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    background:
      linear-gradient(180deg, rgba(36, 30, 19, 0.86), rgba(36, 30, 19, 0.72)),
      url("images/site_background.jpg") center / cover no-repeat !important;
  }

  .page,
  .home-section,
  .hero-container,
  .hero-news,
  .monitoring-toolbar,
  .top-status-board,
  .dashboard-weather-overview,
  .home-landing,
  .site-dev-banner {
    width: min(100% - 22px, 1660px) !important;
  }

  .dashboard-monitoring-toolbar {
    display: grid !important;
  }

  .dashboard-monitoring-toolbar::before {
    font-size: 30px;
  }
}

@media (max-width: 720px) {
  .dashboard-weather-overview,
  .top-status-board,
  #dashboardPage .home-live-grid,
  #dashboardPage .dashboard-ops-transfer-grid,
  #dashboardPage .home-support-panels {
    grid-template-columns: 1fr !important;
  }

  #dashboardPage .home-landing-main {
    padding: 96px 20px 22px !important;
  }

  #dashboardPage .home-landing-main::before {
    top: 24px;
    left: 20px;
    transform: none;
  }

  .site-dev-banner {
    display: block;
  }

  .site-dev-banner::before {
    margin-bottom: 12px;
  }
}

/* Restored emergency-portal hero header with persistent side navigation */
@media (min-width: 981px) {
  :root {
    --portal-hero-height: 170px;
    --portal-side-nav-width: 360px;
  }

  body {
    padding-top: var(--portal-hero-height) !important;
    padding-left: var(--portal-side-nav-width) !important;
  }

  .site-header {
    position: fixed !important;
    inset: 0 0 auto 0 !important;
    width: 100% !important;
    height: var(--portal-hero-height) !important;
    min-height: var(--portal-hero-height) !important;
    padding: 12px 22px 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
    color: #ffffff !important;
    background:
      linear-gradient(180deg, rgba(8, 21, 24, 0.72), rgba(8, 18, 20, 0.78)),
      url("images/site_background.jpg") center 38% / cover no-repeat !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 18px 46px rgba(11, 17, 24, 0.32) !important;
    z-index: 1200 !important;
  }

  .site-header::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    background:
      radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.2), transparent 28%),
      linear-gradient(90deg, rgba(0, 0, 0, 0.24), transparent 26%, transparent 74%, rgba(0, 0, 0, 0.24));
    z-index: 0 !important;
  }

  .site-header .header-logo-duo {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    min-height: 0 !important;
    display: block !important;
    pointer-events: none !important;
    z-index: 2 !important;
  }

  .site-header .header-logo-frame {
    position: absolute !important;
    top: 20px !important;
    width: 180px !important;
    height: 128px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    overflow: visible !important;
    pointer-events: auto !important;
  }

  .site-header .municipal-logo-frame {
    left: 24px !important;
  }

  .site-header .office-logo-frame {
    right: 24px !important;
  }

  .site-header .header-logo img {
    width: 124px !important;
    height: 124px !important;
    max-width: 124px !important;
    max-height: 124px !important;
    padding: 0 !important;
    object-fit: contain !important;
    border-radius: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45) !important;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.7)) !important;
    transform: scale(1) !important;
    transform-origin: center !important;
  }

  .site-header .header-title {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: calc(100vw - 680px) !important;
    max-width: none !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    border: 0 !important;
    z-index: 3 !important;
  }

  .site-header .header-title .eyebrow {
    display: none !important;
    margin: 0 !important;
    padding: 7px 16px !important;
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.14) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18) !important;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.55) !important;
  }

  .site-header .header-title .municipality-name {
    display: block !important;
    margin: 0 0 5px !important;
    color: #fbbf24 !important;
    font-size: clamp(38px, 4.3vw, 64px) !important;
    line-height: 0.9 !important;
    font-weight: 950 !important;
    letter-spacing: 0 !important;
    text-transform: uppercase !important;
    text-align: center !important;
    text-shadow:
      0 4px 18px rgba(0, 0, 0, 0.86),
      0 0 26px rgba(251, 191, 36, 0.32) !important;
  }

  .site-header .header-title h1 {
    display: block !important;
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    color: #ffffff !important;
    font-size: clamp(19px, 1.65vw, 27px) !important;
    line-height: 1.08 !important;
    font-weight: 950 !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    white-space: nowrap !important;
    text-shadow: 0 4px 14px rgba(0, 0, 0, 0.76) !important;
  }

  .site-header .header-title h1::before {
    content: none !important;
  }

  .site-header .header-title .subtitle {
    display: block !important;
    margin: 5px 0 0 !important;
    color: rgba(255, 255, 255, 0.94) !important;
    font-size: clamp(12px, 1vw, 15px) !important;
    line-height: 1.2 !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    text-shadow: 0 3px 9px rgba(0, 0, 0, 0.72) !important;
  }

  .site-header .header-title .subtitle::before {
    content: none !important;
  }

  .site-header .header-title .location {
    display: flex !important;
    justify-content: center !important;
    gap: 8px !important;
    margin-top: 8px !important;
    flex-wrap: wrap !important;
  }

  .site-header .header-badge {
    padding: 5px 10px !important;
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.16) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.18) !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.62) !important;
  }

  .layer-top-nav.header-nav {
    position: fixed !important;
    top: var(--portal-hero-height) !important;
    left: 0 !important;
    right: auto !important;
    bottom: 0 !important;
    width: var(--portal-side-nav-width) !important;
    height: calc(100vh - var(--portal-hero-height)) !important;
    margin: 0 !important;
    padding: 18px 18px 96px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    background:
      radial-gradient(circle at 12% 8%, rgba(245, 158, 11, 0.18), transparent 28%),
      radial-gradient(circle at 88% 24%, rgba(56, 189, 248, 0.13), transparent 34%),
      linear-gradient(180deg, rgba(34, 29, 20, 0.98), rgba(17, 24, 39, 0.99)),
      url("images/site_background.jpg") center / cover no-repeat !important;
    border: 0 !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 16px 0 34px rgba(26, 20, 12, 0.3) !important;
    z-index: 1100 !important;
  }

  .layer-top-nav.header-nav::-webkit-scrollbar {
    width: 10px;
  }

  .layer-top-nav.header-nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
  }

  .layer-top-nav.header-nav::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #b17a3a, #38bdf8);
    border: 2px solid rgba(18, 24, 32, 0.92);
    border-radius: 999px;
  }

  .layer-top-nav.header-nav::before {
    content: "EOC NAVIGATION" !important;
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 0 16px 0 !important;
    padding: 12px 14px !important;
    color: #fff7df !important;
    background:
      linear-gradient(135deg, rgba(177, 122, 58, 0.22), rgba(56, 189, 248, 0.08)),
      rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 13px !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 10px 22px rgba(0,0,0,0.18) !important;
    font-size: 14px !important;
    font-weight: 950 !important;
    letter-spacing: 0.08em !important;
    text-align: left !important;
  }

  .header-nav .nav-links,
  .layer-top-nav .nav-links {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 9px !important;
    width: 100% !important;
  }

  .layer-top-nav .nav-links > button,
  .layer-top-nav .utility-menu > button,
  .layer-top-nav .layer-btn.home-btn,
  .layer-top-nav .layer-tile {
    --nav-accent: #94a3b8;
    position: relative !important;
    min-height: 46px !important;
    padding: 11px 14px 11px 18px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    color: #fff8ea !important;
    font-size: 14.5px !important;
    font-weight: 900 !important;
    line-height: 1.15 !important;
    text-align: left !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    border-left: 5px solid var(--nav-accent) !important;
    border-radius: 12px !important;
    background:
      linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.025)),
      rgba(15, 23, 42, 0.46) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 8px 18px rgba(0,0,0,0.16) !important;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease !important;
    isolation: isolate !important;
    overflow: hidden !important;
  }

  .layer-top-nav .nav-links > button::before,
  .layer-top-nav .utility-menu > button::before,
  .layer-top-nav .layer-btn.home-btn::before,
  .layer-top-nav .layer-tile::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 auto 0 0 !important;
    width: 0 !important;
    background: linear-gradient(90deg, color-mix(in srgb, var(--nav-accent) 36%, transparent), transparent) !important;
    opacity: 0.8 !important;
    transition: width 180ms ease !important;
    z-index: -1 !important;
  }

  .layer-top-nav .nav-links > button:hover,
  .layer-top-nav .utility-menu > button:hover,
  .layer-top-nav .layer-btn.home-btn:hover,
  .layer-top-nav .layer-tile:hover {
    transform: translateX(4px) !important;
    background:
      linear-gradient(135deg, rgba(255,255,255,0.13), rgba(255,255,255,0.04)),
      rgba(15, 23, 42, 0.62) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
    border-left-color: var(--nav-accent) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 12px 24px rgba(0,0,0,0.24) !important;
  }

  .layer-top-nav .nav-links > button:hover::before,
  .layer-top-nav .utility-menu > button:hover::before,
  .layer-top-nav .layer-btn.home-btn:hover::before,
  .layer-top-nav .layer-tile:hover::before {
    width: 58% !important;
  }

  .layer-top-nav .layer-btn.home-btn {
    --nav-accent: #f59e0b;
  }

  .layer-top-nav .layer-btn.dashboard-btn {
    --nav-accent: #38bdf8;
  }

  .layer-top-nav .layer-tile.citizen-charter { --nav-accent: #60a5fa; }
  .layer-top-nav .layer-tile.monitoring { --nav-accent: #22c55e; }
  .layer-top-nav .layer-tile.intelligence { --nav-accent: #f59e0b; }
  .layer-top-nav .layer-tile.operations { --nav-accent: #ef4444; }
  .layer-top-nav .layer-tile.public { --nav-accent: #14b8a6; }
  .layer-top-nav .layer-tile.agency-tools { --nav-accent: #a78bfa; }
  .layer-top-nav .layer-tile.news { --nav-accent: #fb923c; }
  .layer-top-nav .layer-tile.disaster-report { --nav-accent: #fb7185; }
  .layer-top-nav .layer-tile.training { --nav-accent: #38bdf8; }
  .layer-top-nav .layer-tile.utility { --nav-accent: #cbd5e1; }

  .layer-top-nav .nav-links [data-page].active,
  .layer-top-nav .layer-btn.home-btn.active,
  .layer-top-nav .layer-btn.dashboard-btn.active,
  .layer-top-nav .layer-tile.utility.active {
    color: #ffffff !important;
    border-color: color-mix(in srgb, var(--nav-accent) 72%, white) !important;
    border-left-color: var(--nav-accent) !important;
    background:
      linear-gradient(135deg, color-mix(in srgb, var(--nav-accent) 48%, #111827), rgba(15,23,42,0.72)),
      rgba(15, 23, 42, 0.86) !important;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.18),
      0 0 0 1px color-mix(in srgb, var(--nav-accent) 24%, transparent),
      0 14px 28px rgba(0,0,0,0.28) !important;
    transform: translateX(3px) !important;
  }

  .layer-top-nav .nav-links [data-page].active::before,
  .layer-top-nav .layer-btn.home-btn.active::before,
  .layer-top-nav .layer-btn.dashboard-btn.active::before,
  .layer-top-nav .layer-tile.utility.active::before {
    width: 100% !important;
    opacity: 0.45 !important;
  }

  .layer-top-nav .layer-btn.home-btn.active {
    --nav-accent: #f59e0b;
  }

  .layer-top-nav .layer-btn.dashboard-btn.active {
    --nav-accent: #38bdf8;
  }

  .page,
  .home-section,
  .hero-container,
  .hero-news,
  .monitoring-toolbar,
  .top-status-board,
  .dashboard-weather-overview,
  .home-landing,
  .site-dev-banner {
    width: min(100% - 32px, 1660px) !important;
  }
}

/* Final About page visual override: high contrast civic profile design */
#aboutPage.about-page {
  color: #102a43 !important;
}

#aboutPage .about-hero-panel {
  grid-template-columns: minmax(310px, 380px) minmax(0, 1fr) !important;
  max-width: 1180px !important;
  background: linear-gradient(135deg, #f8fbff 0%, #ffffff 48%, #eef9f6 100%) !important;
  border: 1px solid rgba(14, 116, 144, 0.18) !important;
  border-radius: 24px !important;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.16) !important;
}

#aboutPage .about-logo-panel {
  background:
    linear-gradient(180deg, rgba(6, 50, 76, 0.94), rgba(8, 87, 80, 0.96)),
    url("images/site_background.jpg") center / cover no-repeat !important;
  color: #ffffff !important;
}

#aboutPage .about-logo-panel img {
  width: 224px !important;
  max-height: 250px !important;
  padding: 18px !important;
  background: #ffffff !important;
  border-radius: 24px !important;
  border: 1px solid rgba(255,255,255,0.88) !important;
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.3) !important;
}

#aboutPage .about-logo-panel h2 {
  color: #ffffff !important;
  font-size: 31px !important;
  font-weight: 950 !important;
  text-shadow: 0 3px 12px rgba(0,0,0,0.45) !important;
}

#aboutPage .about-logo-panel p {
  max-width: 280px !important;
  color: #e7fff7 !important;
  font-size: 15.5px !important;
  font-weight: 850 !important;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
}

#aboutPage .about-logo-btn {
  background: linear-gradient(135deg, #f59e0b, #b45309) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,0.35) !important;
  box-shadow: 0 14px 30px rgba(0,0,0,0.26) !important;
}

#aboutPage .about-menu-panel {
  gap: 18px !important;
  padding: 40px !important;
  align-content: center !important;
  background:
    radial-gradient(circle at 82% 16%, rgba(14, 165, 233, 0.12), transparent 30%),
    radial-gradient(circle at 12% 78%, rgba(20, 184, 166, 0.11), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f5f9fc 100%) !important;
}

#aboutPage .about-menu-panel > button.about-menu-card {
  --about-card-accent: #0ea5e9;
  min-height: 152px !important;
  padding: 22px 20px !important;
  color: #12324a !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
  border: 1px solid rgba(15, 65, 95, 0.14) !important;
  border-top: 6px solid var(--about-card-accent) !important;
  border-radius: 18px !important;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.10) !important;
}

#aboutPage .about-menu-panel > button.about-menu-card:nth-child(1) { --about-card-accent: #0ea5e9; }
#aboutPage .about-menu-panel > button.about-menu-card:nth-child(2) { --about-card-accent: #14b8a6; }
#aboutPage .about-menu-panel > button.about-menu-card:nth-child(3) { --about-card-accent: #7c3aed; }
#aboutPage .about-menu-panel > button.about-menu-card:nth-child(4) { --about-card-accent: #f59e0b; }
#aboutPage .about-menu-panel > button.about-menu-card:nth-child(5) { --about-card-accent: #22c55e; }

#aboutPage .about-menu-panel > button.about-menu-card:hover,
#aboutPage .about-menu-panel > button.about-menu-card.active {
  transform: translateY(-5px) !important;
  background: linear-gradient(180deg, #ffffff 0%, #eef8ff 100%) !important;
  border-color: rgba(14, 165, 233, 0.34) !important;
  border-top-color: var(--about-card-accent) !important;
  box-shadow: 0 24px 46px rgba(15, 23, 42, 0.18) !important;
}

#aboutPage .about-menu-panel > button.about-menu-card .about-menu-icon {
  width: 52px !important;
  height: 52px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #0f172a !important;
  background: #eef7ff !important;
  border: 1px solid rgba(14, 165, 233, 0.2) !important;
  border-radius: 16px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8) !important;
}

#aboutPage .about-menu-panel > button.about-menu-card strong {
  color: #082f49 !important;
  font-size: 20px !important;
  font-weight: 950 !important;
  line-height: 1.15 !important;
}

#aboutPage .about-menu-panel > button.about-menu-card small {
  color: #3b5268 !important;
  font-size: 13.5px !important;
  font-weight: 750 !important;
  line-height: 1.45 !important;
}
/* ICS Forms Library */
.ics-library-section {
  max-width: 1400px;
  margin: 28px auto;
  padding: 0 14px;
}

.ics-library-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.96));
  border: 1px solid rgba(220, 53, 69, 0.18);
  border-left: 7px solid #dc3545;
  border-radius: 16px;
  box-shadow: 0 18px 38px rgba(5, 23, 45, 0.2);
  padding: 22px;
}

.ics-library-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.ics-kicker,
.ics-form-category {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  background: rgba(220, 53, 69, 0.1);
  color: #8b0000;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  padding: 5px 10px;
}

.ics-library-hero h3,
.ics-fill-header h3 {
  margin: 8px 0 8px;
  color: #102a43;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.1;
}

.ics-library-hero p,
.ics-fill-header p,
.ics-form-card p {
  color: #36506a;
  line-height: 1.55;
  margin: 0;
}

.ics-library-count {
  min-width: 138px;
  border-radius: 14px;
  background: linear-gradient(135deg, #8b0000, #dc3545);
  color: #fff;
  text-align: center;
  padding: 18px 16px;
  box-shadow: 0 12px 28px rgba(139, 0, 0, 0.24);
}

.ics-library-count strong {
  display: block;
  font-size: 34px;
  line-height: 1;
}

.ics-library-count span {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 750;
}

.ics-controls {
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
}

.ics-controls label,
.ics-print-form-grid label {
  display: block;
  color: #18344f;
  font-size: 13px;
  font-weight: 850;
  margin-bottom: 7px;
}

.ics-control-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 330px) auto;
  gap: 10px;
}

.ics-control-row input,
.ics-control-row select,
.ics-print-form-grid input,
.ics-print-form-grid textarea {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 10px;
  background: #ffffff;
  color: #102a43;
  font-size: 14px;
  padding: 11px 12px;
}

.ics-reset-btn,
.ics-action,
.ics-close-btn {
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
  min-height: 40px;
  padding: 10px 13px;
  text-align: center;
  text-decoration: none;
}

.ics-reset-btn,
.ics-action.secondary,
.ics-close-btn {
  background: #e5e7eb;
  color: #102a43 !important;
}

.ics-action.primary {
  background: linear-gradient(135deg, #dc3545, #8b0000);
  color: #ffffff !important;
}

.ics-action.download {
  background: linear-gradient(135deg, #083b7a, #0d6efd);
  color: #ffffff !important;
}

.ics-category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.ics-category-chips button {
  border: 1px solid rgba(139, 0, 0, 0.18);
  border-radius: 999px;
  background: #ffffff;
  color: #18344f;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 11px;
}

.ics-category-chips button.active {
  background: #8b0000;
  color: #ffffff;
}

.ics-category-chips span {
  opacity: 0.75;
}

.ics-forms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 14px;
}

.ics-form-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 250px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-top: 4px solid #dc3545;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(5, 23, 45, 0.1);
  padding: 16px;
}

.ics-form-card h3 {
  color: #102a43;
  font-size: 18px;
  line-height: 1.25;
  margin: 10px 0 9px;
}

.ics-form-card h3 span {
  color: #8b0000;
  font-weight: 950;
}

.ics-form-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.ics-empty-state {
  border: 1px dashed rgba(139, 0, 0, 0.3);
  border-radius: 12px;
  color: #36506a;
  font-weight: 800;
  padding: 18px;
  text-align: center;
}

.ics-fill-panel {
  margin-top: 18px;
}

.ics-fill-panel-card {
  background: #ffffff;
  border: 1px solid rgba(220, 53, 69, 0.2);
  border-left: 7px solid #dc3545;
  border-radius: 16px;
  box-shadow: 0 18px 38px rgba(5, 23, 45, 0.18);
  padding: 20px;
}

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

.ics-print-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ics-print-form-grid .full-row {
  grid-column: 1 / -1;
}

.ics-print-form-grid textarea {
  min-height: 110px;
  resize: vertical;
}

.ics-fill-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.ics-official-form-mount {
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  overflow-x: auto;
  padding: 12px;
}

.ics-official-sheet {
  min-width: 980px;
  background: #ffffff;
  border: 2px solid #111827;
  color: #111827;
  font-family: Arial, sans-serif;
  box-shadow: 0 10px 22px rgba(5, 23, 45, 0.14);
}

.ics-official-header {
  display: grid;
  grid-template-columns: 140px 1fr;
  border-bottom: 2px solid #111827;
}

.ics-official-number {
  display: grid;
  place-items: center;
  border-right: 2px solid #111827;
  font-size: 26px;
  font-weight: 950;
  padding: 12px;
  text-align: center;
}

.ics-official-title {
  padding: 10px 12px;
}

.ics-official-title h1 {
  color: #111827;
  font-size: 22px;
  line-height: 1.12;
  margin: 0;
  text-transform: uppercase;
}

.ics-official-title p {
  color: #374151;
  font-size: 12px;
  margin: 4px 0 0;
}

.ics-official-section {
  border-bottom: 1px solid #111827;
}

.ics-official-section-title {
  background: #e5e7eb;
  border-bottom: 1px solid #111827;
  color: #111827;
  font-size: 12px;
  font-weight: 950;
  padding: 6px 8px;
}

.ics-official-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.ics-official-field {
  display: block;
  border-right: 1px solid #111827;
  border-bottom: 1px solid #111827;
  min-height: 58px;
  padding: 5px;
}

.ics-official-field span {
  display: block;
  color: #111827;
  font-size: 10px;
  font-weight: 900;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.ics-official-field.span-2 {
  grid-column: span 2;
}

.ics-official-field.span-3 {
  grid-column: span 3;
}

.ics-official-field.span-4 {
  grid-column: span 4;
}

.ics-official-sheet input,
.ics-official-sheet textarea {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #111827;
  font: inherit;
  font-size: 12px;
  line-height: 1.35;
  outline: 1px solid transparent;
  padding: 4px;
}

.ics-official-sheet textarea {
  min-height: 84px;
  resize: vertical;
}

.ics-official-sheet input:focus,
.ics-official-sheet textarea:focus {
  background: #fff7ed;
  outline-color: #dc3545;
}

.ics-table-scroll {
  overflow-x: auto;
}

.ics-official-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.ics-official-table th,
.ics-official-table td {
  border: 1px solid #111827;
  color: #111827;
  font-size: 10px;
  min-height: 32px;
  padding: 4px;
  vertical-align: top;
}

.ics-official-table th {
  background: #f3f4f6;
  font-weight: 950;
  text-transform: uppercase;
}

.ics-list-table th {
  text-align: center;
  width: 44px;
}

.ics-print-value {
  min-height: 28px;
  white-space: pre-wrap;
}

.ics-official-section > .ics-print-value {
  min-height: 90px;
  padding: 8px;
}

.ics-official-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 8px;
  font-size: 10px;
}

@media (max-width: 820px) {
  .ics-library-hero,
  .ics-control-row,
  .ics-print-form-grid {
    grid-template-columns: 1fr;
  }

  .ics-library-count {
    width: 100%;
  }

  .ics-fill-header {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .ics-library-section {
    padding: 0 10px;
  }

  .ics-library-card,
  .ics-fill-panel-card {
    padding: 16px;
    border-radius: 12px;
  }

  .ics-form-actions {
    grid-template-columns: 1fr;
  }
}

@media print {
  .ics-library-section {
    background: #ffffff;
  }

  .ics-controls,
  .ics-category-chips,
  .ics-form-actions,
  .ics-fill-panel {
    display: none !important;
  }

  .ics-library-card,
  .ics-form-card {
    box-shadow: none;
  }
}

.community-network-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 20px;
  align-items: stretch;
  margin: 18px 0 14px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(20, 83, 45, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(236, 253, 245, 0.96), rgba(255, 251, 235, 0.94)),
    #f8fafc;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
}

.community-network-hero-copy {
  display: flex;
  min-height: 230px;
  flex-direction: column;
  justify-content: center;
}

.community-network-kicker {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 8px;
  border: 1px solid rgba(20, 83, 45, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #14532d;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  padding: 6px 10px;
  text-transform: uppercase;
}

.community-network-hero h2,
.community-network-module-header h3 {
  margin: 0;
  color: #102a21;
  font-weight: 950;
}

.community-network-hero h2 {
  max-width: 780px;
  font-size: clamp(1.85rem, 4vw, 3.15rem);
  line-height: 1.02;
}

.community-network-hero p,
.community-network-module-header p {
  margin: 8px 0 0;
  color: #33413c;
  line-height: 1.55;
}

.community-network-hero p {
  max-width: 760px;
  font-size: 1.02rem;
}

.community-network-meta,
.community-network-actions,
.community-form-actions,
.community-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.community-network-meta {
  margin-top: 14px;
}

.community-network-meta span,
.community-network-dev-notice {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: #365314;
  font-size: 0.86rem;
  font-weight: 800;
  padding: 8px 10px;
}

.community-network-command-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(20, 83, 45, 0.16);
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1);
}

.command-card-topline {
  color: #92400e;
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.command-card-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 12px;
  margin: 18px 0;
}

.command-card-grid span {
  border-radius: 999px;
  background: #ecfdf5;
  color: #166534;
  font-size: 0.75rem;
  font-weight: 950;
  padding: 5px 8px;
}

.command-card-grid strong {
  color: #102a21;
  font-size: 0.9rem;
}

.community-network-dev-notice {
  margin: 0 0 18px;
  border: 1px solid rgba(180, 83, 9, 0.18);
  background: #fffbeb;
  color: #713f12;
}

.community-network-actions {
  justify-content: flex-end;
}

.community-network-actions button,
.community-network-module-header button,
.community-form-actions button,
.community-card-actions button {
  border: 0;
  border-radius: 8px;
  background: #166534;
  color: #ffffff;
  cursor: pointer;
  font-weight: 900;
  padding: 10px 14px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.community-network-actions button:hover,
.community-network-module-header button:hover,
.community-form-actions button:hover,
.community-card-actions button:hover {
  background: #14532d;
  box-shadow: 0 8px 16px rgba(20, 83, 45, 0.18);
  transform: translateY(-1px);
}

.community-network-actions button.secondary,
.community-form-actions button.secondary,
.community-card-actions button.secondary {
  border: 1px solid rgba(20, 83, 45, 0.16);
  background: #f8fafc;
  color: #14532d;
}

.community-card-actions button.danger {
  background: #b91c1c;
}

.community-network-tabs {
  display: inline-flex;
  gap: 8px;
  margin: 12px 0 18px;
  border: 1px solid rgba(20, 83, 45, 0.16);
  border-radius: 8px;
  background: #eef7ef;
  padding: 5px;
}

.community-network-tabs[hidden] {
  display: none !important;
}

.community-network-tabs button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #14532d;
  cursor: pointer;
  font-weight: 950;
  min-width: 180px;
  padding: 11px 16px;
}

.community-network-tabs button.active {
  background: #166534;
  color: #ffffff;
  box-shadow: 0 8px 14px rgba(20, 83, 45, 0.18);
}

.community-network-module {
  margin-bottom: 28px;
  border: 1px solid rgba(20, 83, 45, 0.12);
  border-radius: 8px;
  background: #ffffff;
  padding: 18px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.community-network-overview {
  margin-bottom: 28px;
  border: 1px solid rgba(20, 83, 45, 0.12);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(240, 253, 244, 0.98), rgba(255, 255, 255, 0.98));
  padding: 18px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.network-readiness-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 18px;
}

.network-readiness-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.network-readiness-panel {
  min-height: 220px;
  border: 1px solid rgba(20, 83, 45, 0.12);
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.network-readiness-panel h4 {
  margin: 0 0 12px;
  color: #102a21;
  font-size: 1rem;
  font-weight: 950;
}

.network-readiness-list {
  display: grid;
  gap: 10px;
}

.network-readiness-item {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(20, 83, 45, 0.1);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.network-readiness-item span {
  color: #4d5b53;
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.network-readiness-item strong {
  color: #14532d;
  font-size: 1.45rem;
  font-weight: 950;
  line-height: 1.05;
}

.network-readiness-item small {
  color: #47615a;
  font-weight: 750;
  line-height: 1.35;
}

.community-network-module-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin: 0 0 16px;
}

.community-network-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.community-network-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 12px;
  margin: 12px 0 18px;
}

.community-stat-card {
  min-height: 98px;
  border: 1px solid rgba(20, 83, 45, 0.14);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f7fee7);
  padding: 14px;
  box-shadow: inset 0 4px 0 #84cc16, 0 8px 18px rgba(15, 23, 42, 0.06);
}

.community-stat-card span {
  display: block;
  color: #4d5b53;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.community-stat-card strong {
  display: block;
  margin-top: 6px;
  color: #14532d;
  font-size: 1.65rem;
  font-weight: 950;
}

.community-network-toolbar {
  margin-bottom: 16px;
  border: 1px solid rgba(20, 83, 45, 0.12);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.community-network-toolbar label,
.community-network-form label,
.community-hazard-fieldset legend {
  display: block;
  margin-bottom: 6px;
  color: #0f172a;
  font-size: 0.86rem;
  font-weight: 900;
}

.community-network-toolbar input,
.community-network-form input,
.community-network-form select,
.community-network-form textarea {
  width: 100%;
  border: 1px solid rgba(20, 83, 45, 0.18);
  border-radius: 8px;
  background: #ffffff;
  color: #102a21;
  font: inherit;
  padding: 10px 12px;
}

.community-network-toolbar input:focus,
.community-network-form input:focus,
.community-network-form select:focus,
.community-network-form textarea:focus {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.16);
  outline: 0;
}

.community-network-form textarea {
  min-height: 92px;
  resize: vertical;
}

.community-network-form {
  margin: 0 0 18px;
  border: 1px solid rgba(20, 83, 45, 0.14);
  border-radius: 8px;
  background: #fafff8;
  padding: 16px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.community-action-message {
  margin: 0 0 14px;
  border: 1px solid rgba(180, 83, 9, 0.28);
  border-left: 5px solid #b45309;
  border-radius: 8px;
  background: #fffbeb;
  color: #713f12;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
}

.community-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.community-form-grid .full-row {
  grid-column: 1 / -1;
}

.community-hazard-fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  border: 1px solid rgba(20, 83, 45, 0.14);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.community-hazard-fieldset label {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  margin: 0;
}

.community-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.community-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(20, 83, 45, 0.14);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.community-network-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  color: #102a21;
  font-size: 0.92rem;
}

.community-network-table th,
.community-network-table td {
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.community-network-table th {
  background: #ecfdf5;
  color: #14532d;
  font-weight: 950;
}

.community-network-table tbody tr:hover {
  background: #f8fff3;
}

.community-network-table td:last-child {
  width: 190px;
}

/* Larger desktop type for the two operational committee directories only. */
@media (min-width: 761px) {
  #bdrrmcDirectoryModule .community-network-module-header h3,
  #sdrrmcDirectoryModule .community-network-module-header h3 {
    font-size: 1.75rem;
    line-height: 1.2;
  }

  #bdrrmcDirectoryModule .community-network-module-header p,
  #sdrrmcDirectoryModule .community-network-module-header p {
    font-size: 1.08rem;
  }

  #bdrrmcDirectoryModule .community-stat-card span,
  #sdrrmcDirectoryModule .community-stat-card span,
  #bdrrmcDirectoryModule .community-network-toolbar,
  #sdrrmcDirectoryModule .community-network-toolbar {
    font-size: 0.95rem;
  }

  #bdrrmcDirectoryModule .community-network-table,
  #sdrrmcDirectoryModule .community-network-table {
    font-size: 1.08rem;
    line-height: 1.5;
  }

  #bdrrmcDirectoryModule .community-network-table th,
  #bdrrmcDirectoryModule .community-network-table td,
  #sdrrmcDirectoryModule .community-network-table th,
  #sdrrmcDirectoryModule .community-network-table td {
    padding: 14px 16px;
  }

  #bdrrmcDirectoryModule button,
  #sdrrmcDirectoryModule button,
  #bdrrmcDirectoryModule input,
  #sdrrmcDirectoryModule input {
    font-size: 1rem;
  }
}

.community-table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.community-table-actions button {
  border: none;
  border-radius: 6px;
  background: linear-gradient(135deg, #198754, #146c43);
  color: #ffffff;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 7px 9px;
}

.community-table-actions button.secondary {
  background: #e5e7eb;
  color: #111827;
}

.community-table-actions button.danger {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: #ffffff;
}

.community-table-actions button:disabled,
.community-table-actions button[aria-disabled="true"] {
  background: #cbd5e1 !important;
  color: #64748b !important;
  cursor: not-allowed;
  opacity: 0.72;
  pointer-events: none;
}

.sdrrmc-directory-wrap {
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(240, 253, 250, 0.88), rgba(255, 255, 255, 0.98)),
    #ffffff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}

.sdrrmc-directory-table {
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.94rem;
}

.sdrrmc-directory-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 0;
  background:
    linear-gradient(135deg, #102a21, #2f2112);
  color: #fff7ed;
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sdrrmc-directory-table th:first-child {
  border-top-left-radius: 8px;
}

.sdrrmc-directory-table th:last-child {
  border-top-right-radius: 8px;
}

.sdrrmc-directory-table td {
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
  background: rgba(255, 255, 255, 0.72);
  padding: 12px 14px;
  vertical-align: middle;
}

.sdrrmc-directory-table tbody tr:nth-child(even) td {
  background: rgba(240, 249, 255, 0.78);
}

.sdrrmc-directory-table tbody tr:hover td {
  background: #f0fdf4;
}

.sdrrmc-school-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.sdrrmc-school-avatar {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid rgba(20, 83, 45, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, #facc15, #22c55e);
  color: #102a21;
  font-size: 0.78rem;
  font-weight: 950;
  box-shadow: 0 8px 16px rgba(20, 83, 45, 0.16);
}

.sdrrmc-school-cell strong,
.sdrrmc-person-card strong {
  display: block;
  color: #102a21;
  font-weight: 900;
  line-height: 1.25;
}

.sdrrmc-school-cell small,
.sdrrmc-person-card small {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.25;
}

.sdrrmc-person-card {
  display: block;
  min-width: 160px;
}

.sdrrmc-contact-pill {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  border: 1px solid rgba(14, 116, 144, 0.18);
  border-radius: 999px;
  background: #ecfeff;
  color: #164e63;
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1.25;
  padding: 7px 10px;
  word-break: break-word;
}

.bdrrmc-directory-wrap {
  border: 1px solid rgba(180, 83, 9, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 251, 235, 0.9), rgba(255, 255, 255, 0.98)),
    #ffffff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}

.bdrrmc-directory-table {
  min-width: 900px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.94rem;
}

.bdrrmc-directory-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 0;
  background:
    linear-gradient(135deg, #3b2a16, #14532d);
  color: #fff7ed;
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.bdrrmc-directory-table th:first-child {
  border-top-left-radius: 8px;
}

.sdrrmc-directory-table tbody tr.sdrrmc-group-heading td {
  padding: 13px 16px;
  background: linear-gradient(90deg, #073f38, #126a63) !important;
  color: #ffffff !important;
  border-top: 8px solid #eef8f4 !important;
  border-bottom: 0 !important;
  text-align: left;
}

.sdrrmc-directory-table tbody tr.sdrrmc-group-heading td strong {
  display: block;
  color: #ffffff !important;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  opacity: 1 !important;
}

.sdrrmc-directory-table tbody tr.sdrrmc-group-heading td span {
  display: block;
  margin-top: 2px;
  color: #d7fff4 !important;
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 1 !important;
}

.bdrrmc-directory-table th:last-child {
  border-top-right-radius: 8px;
}

.bdrrmc-directory-table td {
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
  background: rgba(255, 255, 255, 0.74);
  padding: 12px 14px;
  vertical-align: middle;
}

.bdrrmc-directory-table tbody tr:nth-child(even) td {
  background: rgba(255, 251, 235, 0.7);
}

.bdrrmc-directory-table tbody tr:hover td {
  background: #fefce8;
}

.bdrrmc-directory-table tbody tr.community-record-has-details td,
.sdrrmc-directory-table tbody tr.community-record-has-details td {
  background: #ecfdf5;
  border-top: 1px solid rgba(22, 163, 74, 0.18);
  border-bottom: 1px solid rgba(22, 163, 74, 0.2);
}

.bdrrmc-directory-table tbody tr.community-record-has-details td:first-child,
.sdrrmc-directory-table tbody tr.community-record-has-details td:first-child {
  box-shadow: inset 5px 0 0 #16a34a;
}

.bdrrmc-directory-table tbody tr.community-record-has-details:hover td,
.sdrrmc-directory-table tbody tr.community-record-has-details:hover td {
  background: #dcfce7;
}

.community-details-badge {
  display: inline-flex;
  width: fit-content;
  margin-top: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(22, 163, 74, 0.28);
  background: #bbf7d0;
  color: #14532d;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
}

.bdrrmc-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 30px;
  margin-top: 7px;
  padding: 6px 11px;
  color: #ffffff !important;
  background: #0f766e;
  border: 1px solid #0d665f;
  border-radius: 999px;
  box-shadow: 0 5px 12px rgba(15, 118, 110, 0.18);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

.bdrrmc-page-link:hover,
.bdrrmc-page-link:focus-visible {
  color: #ffffff !important;
  background: #115e59;
  outline: 3px solid rgba(20, 184, 166, 0.28);
  outline-offset: 2px;
}

/* 2026 Community DRRM directory visual refresh */
#bdrrmcDirectoryModule,
#sdrrmcDirectoryModule {
  --directory-accent: #15803d;
  --directory-accent-dark: #0f5132;
  --directory-soft: #eefbf3;
  overflow: hidden;
  border: 1px solid rgba(15, 81, 50, 0.15);
  border-radius: 18px;
  padding: 0 16px 18px;
  background:
    radial-gradient(circle at 92% 0%, rgba(34, 197, 94, 0.12), transparent 25%),
    linear-gradient(180deg, #ffffff 0%, #fbfefc 100%);
  box-shadow: 0 18px 45px rgba(15, 42, 33, 0.12);
}

#sdrrmcDirectoryModule {
  --directory-accent: #087f9b;
  --directory-accent-dark: #155e75;
  --directory-soft: #effbfe;
}

#bdrrmcDirectoryModule .community-network-module-header,
#sdrrmcDirectoryModule .community-network-module-header {
  position: relative;
  margin: 0 -16px 18px;
  padding: 22px 20px;
  border-bottom: 1px solid rgba(15, 81, 50, 0.12);
  background:
    linear-gradient(100deg, rgba(239, 253, 244, 0.98), rgba(255, 251, 235, 0.88));
}

#sdrrmcDirectoryModule .community-network-module-header {
  border-bottom-color: rgba(8, 127, 155, 0.14);
  background: linear-gradient(100deg, rgba(239, 251, 254, 0.98), rgba(240, 253, 244, 0.88));
}

.community-directory-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  color: var(--directory-accent-dark);
  font-size: 0.71rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.community-directory-kicker::before {
  content: "";
  width: 22px;
  height: 3px;
  border-radius: 99px;
  background: var(--directory-accent);
}

#bdrrmcDirectoryModule .community-network-module-header h3,
#sdrrmcDirectoryModule .community-network-module-header h3 {
  letter-spacing: -0.025em;
}

#bdrrmcDirectoryModule .community-network-header-actions button,
#sdrrmcDirectoryModule .community-network-header-actions button {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: linear-gradient(135deg, var(--directory-accent), var(--directory-accent-dark));
  box-shadow: 0 8px 18px rgba(15, 81, 50, 0.16);
}

#bdrrmcDirectoryModule .community-network-header-actions button.secondary,
#sdrrmcDirectoryModule .community-network-header-actions button.secondary {
  border-color: rgba(15, 81, 50, 0.18);
  background: rgba(255, 255, 255, 0.88);
  color: var(--directory-accent-dark);
  box-shadow: none;
}

#bdrrmcDirectoryModule .community-network-stats,
#sdrrmcDirectoryModule .community-network-stats {
  gap: 10px;
}

#bdrrmcDirectoryModule .community-stat-card,
#sdrrmcDirectoryModule .community-stat-card {
  position: relative;
  min-height: 106px;
  overflow: hidden;
  border: 1px solid rgba(15, 81, 50, 0.12);
  border-radius: 13px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 8px 22px rgba(15, 42, 33, 0.07);
}

#bdrrmcDirectoryModule .community-stat-card::after,
#sdrrmcDirectoryModule .community-stat-card::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -28px;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: var(--directory-soft);
}

#bdrrmcDirectoryModule .community-stat-card span,
#sdrrmcDirectoryModule .community-stat-card span {
  position: relative;
  z-index: 1;
  min-height: 33px;
  color: #52615a;
  letter-spacing: 0.025em;
}

#bdrrmcDirectoryModule .community-stat-card strong,
#sdrrmcDirectoryModule .community-stat-card strong {
  position: relative;
  z-index: 1;
  color: var(--directory-accent-dark);
  font-size: 1.85rem;
}

#bdrrmcDirectoryModule .community-network-toolbar,
#sdrrmcDirectoryModule .community-network-toolbar {
  position: relative;
  border-color: rgba(15, 81, 50, 0.12);
  border-radius: 13px;
  background: var(--directory-soft);
  padding: 12px 14px;
}

#bdrrmcDirectoryModule .community-network-toolbar input,
#sdrrmcDirectoryModule .community-network-toolbar input {
  min-height: 44px;
  border-radius: 10px;
  padding-left: 16px;
  box-shadow: 0 3px 10px rgba(15, 42, 33, 0.05);
}

#bdrrmcDirectoryModule .community-table-wrap,
#sdrrmcDirectoryModule .community-table-wrap {
  border: 0;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(15, 42, 33, 0.1);
}

#bdrrmcDirectoryModule .community-network-table th,
#sdrrmcDirectoryModule .community-network-table th {
  padding-top: 14px;
  padding-bottom: 14px;
  background: linear-gradient(135deg, #172d26, var(--directory-accent-dark));
  font-size: 0.72rem;
  letter-spacing: 0.055em;
}

#bdrrmcDirectoryModule .community-network-table td,
#sdrrmcDirectoryModule .community-network-table td {
  padding-top: 14px;
  padding-bottom: 14px;
}

#bdrrmcDirectoryModule .bdrrmc-barangay-avatar,
#sdrrmcDirectoryModule .sdrrmc-school-avatar {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 13px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

#bdrrmcDirectoryModule .bdrrmc-contact-pill,
#sdrrmcDirectoryModule .sdrrmc-contact-pill {
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(15, 42, 33, 0.06);
}

#bdrrmcDirectoryModule .bdrrmc-page-link,
#sdrrmcDirectoryModule .bdrrmc-page-link {
  gap: 9px;
  min-height: 34px;
  margin-top: 9px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--directory-accent), var(--directory-accent-dark));
  box-shadow: 0 6px 14px rgba(15, 81, 50, 0.18);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
}

#bdrrmcDirectoryModule .bdrrmc-page-link b,
#sdrrmcDirectoryModule .bdrrmc-page-link b {
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.18s ease;
}

#bdrrmcDirectoryModule .bdrrmc-page-link:hover b,
#sdrrmcDirectoryModule .bdrrmc-page-link:hover b {
  transform: translateX(3px);
}

@media (max-width: 760px) {
  #bdrrmcDirectoryModule,
  #sdrrmcDirectoryModule {
    padding: 0 12px 14px;
    border-radius: 14px;
  }

  #bdrrmcDirectoryModule .community-network-module-header,
  #sdrrmcDirectoryModule .community-network-module-header {
    margin-right: -12px;
    margin-left: -12px;
    padding: 18px 15px;
  }

  #bdrrmcDirectoryModule .community-network-header-actions,
  #sdrrmcDirectoryModule .community-network-header-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
}

.bdrrmc-barangay-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.bdrrmc-barangay-avatar {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid rgba(180, 83, 9, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, #f59e0b, #16a34a);
  color: #102a21;
  font-size: 0.78rem;
  font-weight: 950;
  box-shadow: 0 8px 16px rgba(146, 64, 14, 0.16);
}

.bdrrmc-barangay-cell strong,
.bdrrmc-person-card strong {
  display: block;
  color: #102a21;
  font-weight: 900;
  line-height: 1.25;
}

.bdrrmc-barangay-cell small,
.bdrrmc-person-card small {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.25;
}

.bdrrmc-person-card {
  display: block;
  min-width: 190px;
}

.bdrrmc-contact-pill {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  border: 1px solid rgba(180, 83, 9, 0.2);
  border-radius: 999px;
  background: #fffbeb;
  color: #713f12;
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1.25;
  padding: 7px 10px;
  word-break: break-word;
}

.bdrrmp-plans-module {
  border-color: rgba(180, 83, 9, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 251, 235, 0.9), rgba(255, 255, 255, 0.98) 280px),
    #ffffff;
}

.bdrrmp-plans-hero {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  border: 1px solid rgba(180, 83, 9, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 247, 237, 0.98), rgba(236, 253, 245, 0.95)),
    #ffffff;
  padding: 18px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1);
}

.bdrrmp-logo-frame {
  width: 150px;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid rgba(120, 53, 15, 0.18);
  border-radius: 8px;
  background: #fef3c7;
  box-shadow: 0 12px 22px rgba(120, 53, 15, 0.14);
}

.bdrrmp-logo-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.bdrrmp-plans-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  border-radius: 999px;
  background: #14532d;
  color: #fef3c7;
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0;
  padding: 6px 10px;
  text-transform: uppercase;
}

.bdrrmp-plans-copy h3 {
  margin: 0;
  color: #102a21;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  font-weight: 950;
  line-height: 1.05;
}

.bdrrmp-plans-copy p {
  max-width: 780px;
  margin: 8px 0 0;
  color: #3f4d46;
  font-weight: 700;
  line-height: 1.55;
}

.bdrrmp-plan-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.bdrrmp-plan-summary span {
  display: inline-flex;
  gap: 6px;
  align-items: baseline;
  border: 1px solid rgba(20, 83, 45, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: #365314;
  font-size: 0.84rem;
  font-weight: 850;
  padding: 8px 10px;
}

.bdrrmp-plan-summary strong {
  color: #14532d;
  font-size: 1.12rem;
  font-weight: 950;
}

.bdrrmp-plan-toolbar {
  background: #fffaf0;
}

.bdrrmp-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.bdrrmp-plan-card {
  display: grid;
  gap: 14px;
  align-content: space-between;
  min-height: 260px;
  border: 1px solid rgba(120, 53, 15, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff, #fff7ed);
  padding: 16px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.bdrrmp-plan-card.has-plan {
  border-color: rgba(22, 101, 52, 0.24);
  background:
    linear-gradient(180deg, #ffffff, #f0fdf4);
}

.bdrrmp-plan-card-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.bdrrmp-plan-number {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(180, 83, 9, 0.18);
  border-radius: 8px;
  background: linear-gradient(135deg, #f59e0b, #16a34a);
  color: #102a21;
  font-size: 0.82rem;
  font-weight: 950;
}

.bdrrmp-plan-card h4 {
  margin: 0;
  color: #102a21;
  font-size: 1.08rem;
  font-weight: 950;
  line-height: 1.2;
}

.bdrrmp-plan-card p {
  margin: 5px 0 0;
  color: #475569;
  font-size: 0.9rem;
  font-weight: 760;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.bdrrmp-plan-meta {
  display: grid;
  gap: 8px;
  margin: 0;
}

.bdrrmp-plan-meta div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  padding: 8px 10px;
}

.bdrrmp-plan-meta dt {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.bdrrmp-plan-meta dd {
  margin: 0;
  color: #102a21;
  font-size: 0.86rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.bdrrmp-plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.bdrrmp-plan-actions button,
.bdrrmp-upload-button,
.bdrrmp-plan-locked {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: #166534;
  color: #ffffff;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1.2;
  padding: 9px 12px;
  text-align: center;
  text-decoration: none;
}

.bdrrmp-plan-actions button.secondary {
  border: 1px solid rgba(20, 83, 45, 0.16);
  background: #f8fafc;
  color: #14532d;
}

.bdrrmp-plan-actions button.danger {
  background: #b91c1c;
}

.bdrrmp-upload-button {
  background: #b45309;
}

.bdrrmp-plan-locked {
  cursor: default;
  background: #e2e8f0;
  color: #475569;
}

.bdrrmp-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.community-action-message.is-error {
  border-color: rgba(185, 28, 28, 0.28);
  border-left-color: #b91c1c;
  background: #fef2f2;
  color: #7f1d1d;
}

.official-comms-module {
  border-color: rgba(14, 116, 144, 0.18);
  background:
    linear-gradient(180deg, rgba(240, 249, 255, 0.94), rgba(255, 255, 255, 0.98) 260px),
    #ffffff;
}

.official-comms-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
  border: 1px solid rgba(14, 116, 144, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, #ecfeff, #fff7ed);
  padding: 18px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.09);
}

.official-comms-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  border-radius: 999px;
  background: #164e63;
  color: #ecfeff;
  font-size: 0.76rem;
  font-weight: 950;
  padding: 6px 10px;
  text-transform: uppercase;
}

.official-comms-hero h3 {
  margin: 0;
  color: #102a21;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  font-weight: 950;
  line-height: 1.05;
}

.official-comms-hero p {
  max-width: 860px;
  margin: 8px 0 0;
  color: #334155;
  font-weight: 720;
  line-height: 1.5;
}

.official-comms-hero button,
.official-comms-actions button {
  border: 0;
  border-radius: 8px;
  background: #0f766e;
  color: #ffffff;
  cursor: pointer;
  font-weight: 900;
  padding: 10px 14px;
}

.official-comms-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}

.official-comms-summary div {
  min-height: 88px;
  border: 1px solid rgba(14, 116, 144, 0.14);
  border-radius: 8px;
  background: #ffffff;
  padding: 13px;
  box-shadow: inset 0 4px 0 #22d3ee, 0 8px 18px rgba(15, 23, 42, 0.06);
}

.official-comms-summary span {
  display: block;
  color: #475569;
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.official-comms-summary strong {
  display: block;
  margin-top: 6px;
  color: #164e63;
  font-size: 1.65rem;
  font-weight: 950;
}

.official-comms-toolbar {
  background: #f0f9ff;
}

.official-comms-file-inputs {
  display: grid;
  gap: 8px;
}

.official-comms-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.official-comms-file-row input[type="file"] {
  min-width: 0;
  width: 100%;
}

.official-comms-add-file,
.official-comms-remove-file {
  width: fit-content;
  margin-top: 8px;
}

.official-comms-remove-file {
  margin-top: 0;
  white-space: nowrap;
}

.official-comms-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

.official-comms-card {
  display: flex;
  min-height: 270px;
  flex-direction: column;
  gap: 12px;
  justify-content: space-between;
  border: 1px solid rgba(14, 116, 144, 0.14);
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.official-comms-card-top,
.official-comms-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.official-comms-card-top {
  justify-content: space-between;
}

.official-comms-type,
.official-comms-date {
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 950;
  padding: 6px 9px;
}

.official-comms-type {
  background: #ecfeff;
  color: #164e63;
}

.official-comms-date {
  background: #fffbeb;
  color: #713f12;
}

.official-comms-card h4 {
  margin: 0;
  color: #102a21;
  font-size: 1.1rem;
  font-weight: 950;
  line-height: 1.25;
}

.official-comms-card p {
  margin: 0;
  color: #475569;
  font-size: 0.9rem;
  font-weight: 740;
  line-height: 1.42;
}

.official-comms-meta {
  display: grid;
  gap: 8px;
  margin: 0;
}

.official-comms-meta div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 10px;
  border-radius: 8px;
  background: #f8fafc;
  padding: 8px 10px;
}

.official-comms-meta dt {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.official-comms-meta dd {
  margin: 0;
  color: #102a21;
  font-size: 0.86rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.official-comms-actions button.secondary {
  border: 1px solid rgba(14, 116, 144, 0.16);
  background: #f8fafc;
  color: #164e63;
}

.official-comms-actions button.danger {
  background: #b91c1c;
}

@media (max-width: 760px) {
  .bdrrmp-plans-hero {
    grid-template-columns: 1fr;
  }

  .official-comms-hero {
    grid-template-columns: 1fr;
  }

  .official-comms-hero button {
    width: 100%;
  }

  .official-comms-list {
    grid-template-columns: 1fr;
  }

  .official-comms-meta div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .bdrrmp-logo-frame {
    width: 132px;
  }

  .bdrrmp-plan-grid {
    grid-template-columns: 1fr;
  }

  .bdrrmp-plan-meta div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .bdrrmp-plan-actions {
    align-items: stretch;
  }

  .bdrrmp-plan-actions button,
  .bdrrmp-upload-button,
  .bdrrmp-plan-locked {
    flex: 1 1 140px;
  }

  .bdrrmc-directory-wrap,
  .sdrrmc-directory-wrap {
    overflow-x: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .bdrrmc-directory-table,
  .bdrrmc-directory-table thead,
  .bdrrmc-directory-table tbody,
  .bdrrmc-directory-table tr,
  .bdrrmc-directory-table th,
  .bdrrmc-directory-table td,
  .sdrrmc-directory-table,
  .sdrrmc-directory-table thead,
  .sdrrmc-directory-table tbody,
  .sdrrmc-directory-table tr,
  .sdrrmc-directory-table th,
  .sdrrmc-directory-table td {
    display: block;
    min-width: 0;
    width: 100%;
  }

  .bdrrmc-directory-table thead,
  .sdrrmc-directory-table thead {
    display: none;
  }

  .bdrrmc-directory-table tr,
  .sdrrmc-directory-table tr {
    margin-bottom: 12px;
    border: 1px solid rgba(15, 118, 110, 0.18);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.09);
    overflow: hidden;
  }

  .bdrrmc-directory-table tr {
    border-color: rgba(180, 83, 9, 0.18);
  }

  .bdrrmc-directory-table td,
  .sdrrmc-directory-table td {
    display: grid;
    grid-template-columns: minmax(106px, 34%) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    background: #ffffff !important;
    padding: 12px;
  }

  .bdrrmc-directory-table td::before,
  .sdrrmc-directory-table td::before {
    content: attr(data-label);
    color: #0f766e;
    font-size: 0.72rem;
    font-weight: 950;
    text-transform: uppercase;
  }

  .bdrrmc-directory-table td::before {
    color: #92400e;
  }

  .bdrrmc-directory-table td:first-child,
  .sdrrmc-directory-table td:first-child {
    display: block;
    background: #f0fdf4 !important;
  }

  .bdrrmc-directory-table td:first-child {
    background: #fffbeb !important;
  }

  .bdrrmc-directory-table td:first-child::before,
  .sdrrmc-directory-table td:first-child::before {
    display: none;
  }

  .bdrrmc-contact-pill,
  .sdrrmc-contact-pill {
    width: fit-content;
    border-radius: 8px;
  }
}

.community-directory-card {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(20, 83, 45, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(236, 253, 245, 0.9), rgba(255, 255, 255, 0.98) 38%),
    #ffffff;
  padding: 16px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.community-directory-card h4 {
  margin: 0 0 10px;
  color: #102a21;
  font-size: 1.08rem;
  font-weight: 950;
}

.community-card-field {
  display: grid;
  grid-template-columns: 122px minmax(0, 1fr);
  gap: 8px;
  margin: 6px 0;
  color: #33413c;
  font-size: 0.9rem;
}

.community-card-field span {
  color: #6b7280;
  font-weight: 900;
}

.community-hazard-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.community-hazard-tags span {
  border-radius: 999px;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 5px 8px;
}

.community-empty-state,
.community-detail-panel {
  border: 1px dashed rgba(20, 83, 45, 0.24);
  border-radius: 8px;
  background: #f7fee7;
  color: #33413c;
  padding: 16px;
}

.community-detail-panel {
  margin-top: 16px;
  border-style: solid;
  background: #ffffff;
}

.community-detail-panel h3 {
  margin: 0 0 12px;
  color: #102a21;
}

.community-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.community-detail-grid div {
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  padding: 8px 0;
}

.community-detail-grid span {
  display: block;
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.community-detail-grid strong {
  color: #102a21;
  font-weight: 850;
}

@media (max-width: 1100px) {
  .community-network-stats,
  .community-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .community-network-hero,
  .community-network-module-header,
  .community-form-grid,
  .community-card-grid,
  .community-detail-grid {
    grid-template-columns: 1fr;
  }

  .community-network-hero {
    padding: 16px;
  }

  .community-network-hero-copy {
    min-height: 0;
  }

  .community-network-actions,
  .community-network-module-header button,
  .community-form-actions button {
    width: 100%;
  }

  .community-network-stats {
    grid-template-columns: 1fr;
  }

  .network-readiness-summary,
  .network-readiness-grid {
    grid-template-columns: 1fr;
  }

  .community-network-tabs {
    flex-direction: column;
    border-bottom: 0;
    width: 100%;
  }

  .community-network-tabs button {
    border-radius: 8px;
    width: 100%;
    min-width: 0;
  }

  .community-card-field {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

.offline-incident-map-shell {
  min-height: 100%;
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 28px;
  color: #08345f;
  background:
    linear-gradient(rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.86)),
    url("images/satellite_weather.webp") center/cover no-repeat;
  text-align: center;
}

.offline-incident-map-shell strong {
  font-size: 22px;
  font-weight: 900;
}

.offline-incident-map-shell span {
  font-size: 14px;
  font-weight: 800;
}

.offline-incident-map-list {
  max-width: 720px;
  margin: 8px auto 0;
  display: grid;
  gap: 6px;
  text-align: left;
}

.offline-incident-map-list p {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(8, 59, 122, 0.14);
  font-size: 13px;
}

.offline-incident-map-list em {
  float: right;
  color: #9a3412;
  font-style: normal;
  font-weight: 900;
}

#map.incident-local-map,
#map.incident-real-map {
  background:
    radial-gradient(circle at 30% 20%, rgba(86, 160, 116, 0.24), transparent 34%),
    radial-gradient(circle at 68% 76%, rgba(33, 104, 152, 0.18), transparent 38%),
    linear-gradient(135deg, #e9f4ed 0%, #dbeedc 48%, #cfe2dc 100%) !important;
}

#map.incident-real-map::after {
  content: attr(data-map-status);
  position: absolute;
  left: 12px;
  bottom: 28px;
  z-index: 420;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #08345f;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 4px 14px rgba(8, 59, 122, 0.12);
  pointer-events: none;
}

#map.incident-real-map[data-map-status="Real map active"]::after {
  display: none;
}

#map.incident-local-map .leaflet-overlay-pane,
#map.incident-real-map .leaflet-overlay-pane {
  filter: drop-shadow(0 2px 4px rgba(15, 45, 74, 0.12));
}

.incident-barangay-tooltip {
  border: 1px solid rgba(8, 59, 122, 0.25);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
  color: #08345f;
  box-shadow: 0 6px 18px rgba(8, 59, 122, 0.16);
  font-size: 12px;
  font-weight: 900;
}

.incident-static-map-overlay {
  position: absolute;
  inset: 10px;
  z-index: 430;
  pointer-events: none;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 6px;
}

.incident-static-map-title {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #08345f;
  box-shadow: 0 8px 20px rgba(8, 59, 122, 0.16);
  font-size: 12px;
  line-height: 1;
}

.incident-static-map-title strong {
  font-weight: 950;
}

.incident-static-map-title span {
  font-weight: 800;
  color: #47606f;
}

.incident-static-map-overlay svg {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.incident-static-map-bg {
  fill: rgba(234, 246, 235, 0.72);
}

.incident-static-barangay {
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
  fill-opacity: 0.86;
  transition: fill-opacity 0.15s ease, stroke-width 0.15s ease;
}

.incident-static-barangay.has-incident {
  fill-opacity: 0.92;
  stroke-width: 4;
}

.incident-static-barangay.is-focused {
  fill: #fde047;
  stroke: #92400e;
  stroke-width: 6;
}

.incident-static-label {
  fill: #062f4f;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.88);
  stroke-width: 4px;
  text-anchor: middle;
  dominant-baseline: middle;
  font-size: 19px;
  font-weight: 950;
  letter-spacing: 0;
}

.incident-static-dot circle {
  fill: #dc2626;
  stroke: #ffffff;
  stroke-width: 4;
  filter: drop-shadow(0 3px 6px rgba(127, 29, 29, 0.35));
}

.incident-static-dot text {
  fill: #7f1d1d;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.94);
  stroke-width: 5px;
  font-size: 18px;
  font-weight: 950;
}

.incident-static-dot.is-focused circle {
  fill: #facc15;
  stroke: #7c2d12;
  stroke-width: 5;
}

@media (max-width: 760px) {
  .incident-static-map-title {
    flex-direction: column;
    gap: 4px;
    border-radius: 8px;
    text-align: center;
  }

  .incident-static-label,
  .incident-static-dot text {
    font-size: 24px;
  }
}

/* Emergency Response submenu */
.layer-top-nav .nav-menu-group {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  width: 100% !important;
  gap: 6px !important;
}

.layer-top-nav .nav-menu-group > .layer-tile {
  width: 100% !important;
  font-weight: 950 !important;
}

.layer-top-nav .nav-submenu {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  margin-left: 16px !important;
  padding-left: 12px !important;
  border-left: 2px solid rgba(239, 68, 68, 0.5) !important;
}

.layer-top-nav .nav-submenu[hidden],
.ics-library-section[hidden],
#weather[hidden],
#monsoonRainMonitoring[hidden],
#barangayRainfallCardHost[hidden],
#adjacentMunicipalityCard[hidden],
#hazard-map-viewer[hidden],
#earthquake-intelligence[hidden],
#volcano-monitoring[hidden],
#forest-fire-monitoring[hidden] {
  display: none !important;
}

#layer2Page.ics-library-only > :not(#ics-forms-library) {
  display: none !important;
}

#layer2Page.citizen-reporting-only-view > :not(#incident-report) {
  display: none !important;
}

#layer2Page.incident-log-only-view > :not(#incident-log),
#layer2Page.incident-log-only-view #incident-log .ops-workspace-grid {
  display: none !important;
}

#layer1Page.hydromet-focused-view > :not(#weather):not(#monsoonRainMonitoring):not(#barangayRainfallCardHost):not(#adjacentMunicipalityCard):not(#wlmsArgMonitoring) {
  display: none !important;
}

#layer3Page.public-services-focused-view > :not(#evacuation):not(#downloads):not(#hotlines):not(#contact-us) {
  display: none !important;
}

#layer4Page.geological-focused-view > :not(#hazard-map-viewer):not(#earthquake-intelligence):not(#volcano-monitoring):not(#forest-fire-monitoring) {
  display: none !important;
}

.geological-summary-panel {
  width: min(100% - 44px, 1260px);
  margin: 28px auto;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.95));
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-left: 7px solid #f59e0b;
  border-radius: 14px;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
}

.geological-summary-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.geological-summary-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  color: #92400e;
  font-size: 12px;
  font-weight: 900;
}

.geological-summary-header h2 {
  margin: 8px 0 6px;
  color: #102a43;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.1;
}

.geological-summary-header p,
.geological-summary-card small {
  color: #52606d;
  line-height: 1.45;
}

.geological-summary-refresh {
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #92400e, #f59e0b);
  color: #ffffff;
  padding: 11px 14px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(146, 64, 14, 0.22);
}

.geological-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.geological-summary-card {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-top: 4px solid #f59e0b;
  border-radius: 12px;
  background: #ffffff;
  padding: 15px;
  color: #172033;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1);
}

button.geological-summary-card {
  cursor: pointer;
}

button.geological-summary-card:hover,
button.geological-summary-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.16);
  outline: none;
}

.geological-summary-card span {
  color: #7c2d12;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.geological-summary-card strong {
  color: #102a43;
  font-size: 20px;
  line-height: 1.15;
  font-weight: 950;
}

.geological-summary-card.timestamp {
  border-top-color: #0f766e;
}

@media (max-width: 1100px) {
  .geological-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .geological-summary-panel {
    width: min(100% - 20px, 1260px);
    padding: 16px;
  }

  .geological-summary-header {
    flex-direction: column;
  }

  .geological-summary-grid {
    grid-template-columns: 1fr;
  }
}

.layer-top-nav .hydromet-menu .nav-submenu {
  border-left-color: rgba(34, 197, 94, 0.55) !important;
}

.layer-top-nav .hydromet-menu .nav-submenu-item {
  --nav-accent: #22c55e;
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.16), rgba(15, 23, 42, 0.34)),
    rgba(15, 23, 42, 0.42) !important;
  border-color: rgba(34, 197, 94, 0.2) !important;
}

.layer-top-nav .hydromet-menu .nav-submenu-item:hover,
.layer-top-nav .hydromet-menu .nav-submenu-item:focus-visible,
.layer-top-nav .hydromet-menu .nav-submenu-item.active {
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.26), rgba(15, 23, 42, 0.48)),
    rgba(15, 23, 42, 0.58) !important;
  border-color: rgba(74, 222, 128, 0.48) !important;
}

.layer-top-nav .geological-menu .nav-submenu {
  border-left-color: rgba(245, 158, 11, 0.58) !important;
}

.layer-top-nav .geological-menu .nav-submenu-item {
  --nav-accent: #f59e0b;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(15, 23, 42, 0.34)),
    rgba(15, 23, 42, 0.42) !important;
  border-color: rgba(245, 158, 11, 0.24) !important;
}

.layer-top-nav .geological-menu .nav-submenu-item:hover,
.layer-top-nav .geological-menu .nav-submenu-item:focus-visible,
.layer-top-nav .geological-menu .nav-submenu-item.active {
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(15, 23, 42, 0.48)),
    rgba(15, 23, 42, 0.58) !important;
  border-color: rgba(251, 191, 36, 0.52) !important;
}

.layer-top-nav .public-services-menu .nav-submenu {
  border-left-color: rgba(20, 184, 166, 0.58) !important;
}

.layer-top-nav .public-services-menu .nav-submenu-item {
  --nav-accent: #14b8a6;
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.16), rgba(15, 23, 42, 0.34)),
    rgba(15, 23, 42, 0.42) !important;
  border-color: rgba(20, 184, 166, 0.24) !important;
}

.layer-top-nav .public-services-menu .nav-submenu-item:hover,
.layer-top-nav .public-services-menu .nav-submenu-item:focus-visible,
.layer-top-nav .public-services-menu .nav-submenu-item.active {
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.28), rgba(15, 23, 42, 0.48)),
    rgba(15, 23, 42, 0.58) !important;
  border-color: rgba(45, 212, 191, 0.52) !important;
}

.layer-top-nav .community-drrm-menu .nav-submenu {
  border-left-color: rgba(167, 139, 250, 0.58) !important;
}

.layer-top-nav .community-drrm-menu .nav-submenu-item {
  --nav-accent: #a78bfa;
  background:
    linear-gradient(135deg, rgba(167, 139, 250, 0.16), rgba(15, 23, 42, 0.34)),
    rgba(15, 23, 42, 0.42) !important;
  border-color: rgba(167, 139, 250, 0.24) !important;
}

.layer-top-nav .community-drrm-menu .nav-submenu-item:hover,
.layer-top-nav .community-drrm-menu .nav-submenu-item:focus-visible,
.layer-top-nav .community-drrm-menu .nav-submenu-item.active {
  background:
    linear-gradient(135deg, rgba(167, 139, 250, 0.28), rgba(15, 23, 42, 0.48)),
    rgba(15, 23, 42, 0.58) !important;
  border-color: rgba(196, 181, 253, 0.52) !important;
}

.layer-top-nav .agency-tools-menu .nav-submenu {
  border-left-color: rgba(167, 139, 250, 0.58) !important;
}

.layer-top-nav .agency-tools-menu .nav-submenu-item {
  --nav-accent: #a78bfa;
  background:
    linear-gradient(135deg, rgba(167, 139, 250, 0.16), rgba(15, 23, 42, 0.34)),
    rgba(15, 23, 42, 0.42) !important;
  border-color: rgba(167, 139, 250, 0.24) !important;
}

.layer-top-nav .agency-tools-menu .nav-submenu-item:hover,
.layer-top-nav .agency-tools-menu .nav-submenu-item:focus-visible,
.layer-top-nav .agency-tools-menu .nav-submenu-item.active {
  background:
    linear-gradient(135deg, rgba(167, 139, 250, 0.28), rgba(15, 23, 42, 0.48)),
    rgba(15, 23, 42, 0.58) !important;
  border-color: rgba(196, 181, 253, 0.52) !important;
}

.layer-top-nav .nav-submenu-item {
  --nav-accent: #ef4444;
  position: relative !important;
  min-height: 38px !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 9px 12px !important;
  color: #fff8ea !important;
  background:
    linear-gradient(135deg, rgba(239, 68, 68, 0.16), rgba(15, 23, 42, 0.34)),
    rgba(15, 23, 42, 0.42) !important;
  border: 1px solid rgba(239, 68, 68, 0.2) !important;
  border-left: 4px solid var(--nav-accent) !important;
  border-radius: 10px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 6px 14px rgba(0,0,0,0.14) !important;
  font-size: 13.5px !important;
  font-weight: 850 !important;
  line-height: 1.15 !important;
  letter-spacing: 0 !important;
  text-align: left !important;
  white-space: normal !important;
  overflow: hidden !important;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease !important;
}

.layer-top-nav .nav-submenu-item:hover,
.layer-top-nav .nav-submenu-item:focus-visible,
.layer-top-nav .nav-submenu-item.active {
  transform: translateX(4px) !important;
  background:
    linear-gradient(135deg, rgba(239, 68, 68, 0.26), rgba(15, 23, 42, 0.48)),
    rgba(15, 23, 42, 0.58) !important;
  border-color: rgba(248, 113, 113, 0.48) !important;
  outline: none !important;
}

@media (max-width: 760px) {
  .layer-top-nav .nav-submenu {
    margin-left: 10px !important;
    padding-left: 10px !important;
  }
}

.layer-top-nav .utility-panel,
.utility-panel {
  color: #102033 !important;
}

.layer-top-nav .utility-panel .control-card,
.utility-panel .control-card {
  background: linear-gradient(180deg, #f8fbff, #edf4fb) !important;
  border: 1px solid rgba(15, 49, 77, 0.18) !important;
}

.layer-top-nav .utility-panel .control-card-label,
.utility-panel .control-card-label {
  color: #0f1f33 !important;
  font-weight: 800 !important;
}

.layer-top-nav .utility-panel .control-status,
.utility-panel .control-status {
  color: #111827 !important;
  font-weight: 750 !important;
  line-height: 1.35 !important;
}

.layer-top-nav .utility-panel .control-btn,
.utility-panel .control-btn {
  justify-content: flex-start !important;
  min-height: 52px !important;
  padding: 12px 14px !important;
  border: 1px solid rgba(15, 23, 42, 0.22) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
  text-align: left !important;
  opacity: 1 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.34) !important;
}

.layer-top-nav .utility-panel .control-btn.sound,
.utility-panel .control-btn.sound {
  background: linear-gradient(135deg, #0b5ed7, #083b7a) !important;
}

.layer-top-nav .utility-panel .control-btn.install,
.utility-panel .control-btn.install {
  background: linear-gradient(135deg, #15803d, #14532d) !important;
}

.layer-top-nav .utility-panel .control-btn.notify,
.utility-panel .control-btn.notify {
  background: linear-gradient(135deg, #6d28d9, #4c1d95) !important;
}

.layer-top-nav .utility-panel .control-btn.bandwidth,
.utility-panel .control-btn.bandwidth {
  background: linear-gradient(135deg, #0369a1, #164e63) !important;
}

.layer-top-nav .utility-panel .control-btn.access,
.utility-panel .control-btn.access,
  .layer-top-nav .utility-panel .control-btn.logout,
  .utility-panel .control-btn.logout {
  background: linear-gradient(135deg, #1d4ed8, #1e3a8a) !important;
}

.layer-top-nav .utility-panel .control-btn:disabled,
.utility-panel .control-btn:disabled {
  background: linear-gradient(135deg, #334155, #1e293b) !important;
  border: 1px solid rgba(203, 213, 225, 0.45) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  opacity: 1 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
}

.layer-top-nav .utility-panel .control-btn:disabled img,
.utility-panel .control-btn:disabled img {
  opacity: 1 !important;
  filter: none !important;
}

.layer-top-nav .utility-panel .control-btn img,
.utility-panel .control-btn img {
  background: rgba(255, 255, 255, 0.92) !important;
  border-radius: 6px !important;
  padding: 2px !important;
  opacity: 1 !important;
  filter: none !important;
}

@media (max-width: 980px) {
  *,
  *::before,
  *::after {
    box-sizing: border-box !important;
  }

  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  body {
    padding-left: 0 !important;
    padding-bottom: 82px !important;
  }

  img,
  video,
  iframe,
  canvas,
  svg {
    max-width: 100% !important;
  }

  .page,
  .home-section,
  .site-dev-banner,
  .monitoring-toolbar,
  .dashboard-monitoring-toolbar,
  .hero-container,
  .hero-news,
  .home-landing,
  .top-status-board,
  .dashboard-weather-overview {
    width: min(100% - 20px, 100%) !important;
    max-width: calc(100vw - 20px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .dashboard-grid,
  .top-status-board,
  .dashboard-weather-overview,
  .home-landing-grid,
  .home-landing-top,
  .home-live-grid,
  .public-tools-grid,
  .agency-facebook-updates-grid,
  .dost-grid,
  .ops-workspace-grid,
  .ops-form-grid,
  .ops-resource-grid,
  .evacuation-center-grid,
  .community-network-stats,
  .community-card-grid,
  .network-readiness-summary,
  .network-readiness-grid,
  .geological-summary-grid,
  .intelligence-grid,
  .volcano-summary-grid,
  .training-modules-grid,
  .dashboard-ops-transfer-grid {
    grid-template-columns: 1fr !important;
  }

  .card,
  .home-live-card,
  .home-mini-panel,
  .ops-workspace-card,
  .public-service-card,
  .dost-card,
  .community-network-module,
  .community-network-overview,
  .geological-summary-panel {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  table,
  #brgyRainTable,
  #adjacentRainTable,
  .community-network-table,
  .evacuation-table {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
  }
}

.site-header .header-logo-frame {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  overflow: visible !important;
}

.site-header .header-logo img {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45) !important;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.7)) !important;
}

.site-header .municipal-logo-frame {
  top: 14px !important;
  left: 36px !important;
  width: 132px !important;
  height: 132px !important;
}

.site-header .office-logo-frame {
  top: 12px !important;
  right: 48px !important;
  width: 112px !important;
  height: 138px !important;
}

.site-header .municipal-logo-frame img {
  width: 128px !important;
  height: 128px !important;
  max-width: 128px !important;
  max-height: 128px !important;
}

.site-header .office-logo-frame img {
  width: auto !important;
  height: 136px !important;
  max-width: 112px !important;
  max-height: 136px !important;
}

/* EOC accordion sidebar navigation */
.legacy-nav-preserved {
  display: none !important;
}

.layer-top-nav.header-nav {
  background:
    radial-gradient(circle at 12% 8%, rgba(245, 158, 11, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(6, 13, 24, 0.98), rgba(12, 18, 28, 0.99)) !important;
}

.layer-top-nav.header-nav::before {
  content: "EOC NAVIGATION" !important;
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  text-align: center !important;
}

@media (min-width: 981px) {
  .layer-top-nav.header-nav {
    padding-bottom: 112px !important;
  }

  .site-dev-banner {
    position: static !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: auto !important;
    margin: 16px 0 0 !important;
    padding: 14px 15px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: 7px !important;
    opacity: 1 !important;
    color: #352411 !important;
    -webkit-text-fill-color: #352411 !important;
    background:
      linear-gradient(135deg, rgba(255, 248, 220, 0.98), rgba(253, 230, 138, 0.94)) !important;
    border: 1px solid rgba(245, 158, 11, 0.7) !important;
    border-left: 4px solid #f59e0b !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.22) !important;
    text-shadow: none !important;
    z-index: auto !important;
  }

  .site-dev-banner::before {
    content: none !important;
  }

  .site-dev-banner strong,
  .site-dev-banner span {
    display: block !important;
    color: #352411 !important;
    -webkit-text-fill-color: #352411 !important;
    text-align: left !important;
    text-shadow: none !important;
  }

  .site-dev-banner strong {
    margin: 0 !important;
    color: #b45309 !important;
    -webkit-text-fill-color: #b45309 !important;
    font-size: 13px !important;
    line-height: 1.15 !important;
    font-weight: 950 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
  }

  .site-dev-banner span {
    font-size: 15px !important;
    line-height: 1.45 !important;
    font-weight: 800 !important;
  }
}

.eoc-accordion-nav {
  gap: 10px !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.eoc-nav-group {
  --group-accent: #f59e0b;
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.56);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 22px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.eoc-nav-group.active-group,
.eoc-nav-group.open {
  border-color: color-mix(in srgb, var(--group-accent) 62%, rgba(255, 255, 255, 0.16));
  box-shadow: inset 4px 0 0 var(--group-accent), 0 12px 24px rgba(0, 0, 0, 0.22);
}

.eoc-nav-group-toggle {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px !important;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #f8fafc !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)) !important;
  border: 0 !important;
  border-left: 4px solid var(--group-accent) !important;
  border-radius: 0 !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase;
  text-align: left !important;
}

.eoc-nav-group-toggle::after {
  content: "+";
  color: var(--group-accent);
  font-size: 17px;
  line-height: 1;
  font-weight: 900;
}

.eoc-nav-group.open > .eoc-nav-group-toggle::after {
  content: "-";
}

.eoc-nav-panel {
  display: flex;
  flex-direction: column;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 7px;
  padding: 8px;
  background: rgba(2, 6, 23, 0.22);
}

.eoc-nav-panel[hidden] {
  display: none !important;
}

.eoc-nav-group .layer-tile,
.eoc-nav-group .layer-btn,
.eoc-nav-group .nav-submenu-item {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  min-height: 38px !important;
  padding: 9px 10px 9px 14px !important;
  justify-content: flex-start !important;
  color: #e5edf8 !important;
  border-radius: 7px !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  border-left: 4px solid var(--nav-accent, #94a3b8) !important;
  background: rgba(15, 23, 42, 0.72) !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 820 !important;
  line-height: 1.2 !important;
  text-align: left !important;
  white-space: normal !important;
}

.eoc-nav-group .layer-tile:hover,
.eoc-nav-group .layer-btn:hover,
.eoc-nav-group .nav-submenu-item:hover {
  transform: translateX(3px) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  background: rgba(30, 41, 59, 0.92) !important;
}

.eoc-nav-group .active {
  color: #fff8e1 !important;
  border-color: rgba(245, 158, 11, 0.78) !important;
  border-left-color: #f59e0b !important;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.34), rgba(30, 41, 59, 0.92)) !important;
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.18) !important;
}

.eoc-nav-emergency { --group-accent: #ef4444; }
.eoc-nav-monitoring { --group-accent: #38bdf8; }
.eoc-nav-response { --group-accent: #f59e0b; }
.eoc-nav-community { --group-accent: #22c55e; }
.eoc-nav-knowledge { --group-accent: #a78bfa; }
.eoc-nav-plans { --group-accent: #fbbf24; }
.eoc-nav-report-management { --group-accent: #fb7185; }
.eoc-nav-officer,
.eoc-nav-duty-login,
.eoc-nav-utilities { --group-accent: #f59e0b; }

.eoc-nav-duty-login.officer-session-active {
  --group-accent: #22c55e;
}

.eoc-nav-duty-login .eoc-nav-group-toggle {
  flex-wrap: wrap !important;
  align-items: flex-start !important;
  gap: 4px 10px !important;
}

.eoc-nav-duty-login .eoc-nav-group-title {
  flex: 1 1 calc(100% - 44px) !important;
}

.eoc-nav-duty-login .eoc-nav-group-toggle::after {
  flex: 0 0 auto !important;
}

.eoc-nav-duty-login.officer-session-active .eoc-nav-group-toggle::after {
  content: "OUT" !important;
  font-size: 10px !important;
  padding: 3px 6px !important;
  border-radius: 999px !important;
  background: rgba(187, 247, 208, 0.14) !important;
  border: 1px solid rgba(187, 247, 208, 0.32) !important;
  color: #bbf7d0 !important;
}

.eoc-nav-duty-login.officer-session-active .eoc-nav-group-toggle {
  border-color: rgba(34, 197, 94, 0.72) !important;
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.28), rgba(15, 23, 42, 0.88)),
    rgba(15, 23, 42, 0.78) !important;
  box-shadow: inset 0 0 0 1px rgba(187, 247, 208, 0.16), 0 0 16px rgba(34, 197, 94, 0.18) !important;
}

.eoc-nav-session-status {
  display: block !important;
  flex: 1 1 100% !important;
  margin: 4px 0 0 31px !important;
  color: #cbd5e1 !important;
  font-size: 10px !important;
  font-weight: 850 !important;
  line-height: 1.15 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.eoc-nav-duty-login.officer-session-active .eoc-nav-session-status {
  color: #bbf7d0 !important;
}

.eoc-nav-group .monitoring { --nav-accent: #38bdf8; }
.eoc-nav-group .intelligence { --nav-accent: #3b82f6; }
.eoc-nav-group .operations { --nav-accent: #f59e0b; }
.eoc-nav-group .public { --nav-accent: #14b8a6; }
.eoc-nav-group .agency-tools { --nav-accent: #22c55e; }
.eoc-nav-group .news { --nav-accent: #a78bfa; }
.eoc-nav-group .training { --nav-accent: #8b5cf6; }
.eoc-nav-group .disaster-report,
.eoc-nav-group .urgent { --nav-accent: #ef4444; }
.eoc-nav-group .utility { --nav-accent: #f59e0b; }

.restricted-indicator {
  padding: 2px 7px;
  border: 1px solid rgba(245, 158, 11, 0.5);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
}

.utility-menu {
  margin-top: 2px;
}

.eoc-nav-utilities.utility-menu {
  display: block !important;
  position: relative !important;
  width: 100% !important;
}

.eoc-nav-utilities.utility-menu .utility-panel {
  position: static !important;
  width: 100% !important;
  max-height: min(52vh, 430px) !important;
  margin-top: 8px !important;
  padding: 10px !important;
  border: 1px solid rgba(245, 158, 11, 0.42) !important;
  border-radius: 10px !important;
  background: rgba(15, 23, 42, 0.72) !important;
  opacity: 0;
  overflow-y: auto !important;
  transform: none !important;
  z-index: auto !important;
}

.eoc-nav-utilities.utility-menu.open .utility-panel {
  opacity: 1;
  transform: none !important;
}

@media (min-width: 981px) {
  .eoc-nav-utilities.utility-menu {
    position: relative !important;
    overflow: visible !important;
    z-index: 1300 !important;
  }

  .eoc-nav-utilities.utility-menu .utility-panel {
    position: fixed !important;
    top: max(300px, 28vh) !important;
    left: min(360px, calc(100vw - 340px)) !important;
    width: min(300px, calc(100vw - 382px)) !important;
    max-height: min(70vh, 585px) !important;
    margin-top: 0 !important;
    padding: 14px !important;
    border-radius: 10px !important;
    background:
      linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(236, 244, 252, 0.96)) !important;
    border: 1px solid rgba(15, 49, 77, 0.18) !important;
    box-shadow: 0 20px 42px rgba(15, 23, 42, 0.24) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateX(-8px) !important;
    transition: opacity 160ms ease, transform 160ms ease !important;
    z-index: 1500 !important;
  }

  .eoc-nav-utilities.utility-menu.open .utility-panel {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateX(0) !important;
  }

  body > .utility-panel.desktop-utility-flyout {
    position: fixed !important;
    top: max(300px, 28vh) !important;
    left: min(360px, calc(100vw - 340px)) !important;
    width: min(300px, calc(100vw - 382px)) !important;
    max-height: min(70vh, 585px) !important;
    margin: 0 !important;
    padding: 14px !important;
    border-radius: 10px !important;
    background:
      linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(236, 244, 252, 0.96)) !important;
    border: 1px solid rgba(15, 49, 77, 0.18) !important;
    box-shadow: 0 20px 42px rgba(15, 23, 42, 0.24) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateX(-8px) !important;
    transition: opacity 160ms ease, transform 160ms ease !important;
    z-index: 20000 !important;
  }

  body > .utility-panel.desktop-utility-flyout.is-open {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateX(0) !important;
  }
}

@media (max-width: 768px) {
  body {
    padding-left: 0 !important;
  }

  .layer-top-nav.header-nav {
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: min(88vw, 340px) !important;
    height: 100vh !important;
    padding: 76px 14px 90px !important;
    transform: translateX(-104%);
    transition: transform 220ms ease;
    z-index: 1900 !important;
  }

  .layer-top-nav.header-nav.mobile-nav-open {
    transform: translateX(0);
  }

  .layer-top-nav.header-nav.mobile-nav-collapsed {
    transform: translateX(-104%);
  }

  .mobile-nav-toggle {
    position: fixed !important;
    top: 14px !important;
    left: 14px !important;
    z-index: 2000 !important;
    width: auto !important;
    min-height: 42px !important;
    padding: 10px 13px !important;
    border-radius: 8px !important;
    color: #fff !important;
    background: #0f172a !important;
    border: 1px solid rgba(245, 158, 11, 0.55) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35) !important;
  }

  .layer-top-nav.header-nav::before {
    margin-top: 0 !important;
  }

  .eoc-nav-group .layer-tile,
  .eoc-nav-group .layer-btn,
  .eoc-nav-group .nav-submenu-item {
    font-size: 13px !important;
    min-height: 40px !important;
  }

  .eoc-nav-utilities.utility-menu {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .eoc-nav-utilities.utility-menu .utility-panel {
    width: 100% !important;
    max-width: 100% !important;
    max-height: min(58dvh, 430px) !important;
    margin-top: 7px !important;
    padding: 8px !important;
    gap: 8px !important;
    border-radius: 8px !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .eoc-nav-utilities.utility-menu .control-card {
    padding: 10px !important;
    gap: 7px !important;
    border-radius: 8px !important;
  }

  .eoc-nav-utilities.utility-menu .control-card-label {
    font-size: 11px !important;
  }

  .eoc-nav-utilities.utility-menu .control-status {
    font-size: 12px !important;
    line-height: 1.3 !important;
  }

  .eoc-nav-utilities.utility-menu .control-btn {
    min-height: 44px !important;
    padding: 10px !important;
    font-size: 12.5px !important;
    white-space: normal !important;
  }
}

/* About page small vertical adjustment requested for the landing feature. */
#aboutPage.about-page {
  padding-top: 0 !important;
  margin-top: -46px !important;
}

#aboutPage .layer-header.about {
  margin-top: 18px !important;
  margin-bottom: 8px !important;
}

#aboutPage .about-hero-panel {
  margin-top: 0 !important;
}

.evacuation-management-toolbar {
  justify-content: flex-start;
  margin: 12px 0 18px;
}

.evacuation-card-actions {
  margin-top: 14px;
  justify-content: flex-start;
}

/* Keep evacuation table column headers readable over theme overrides. */
.evacuation-table thead th,
.evacuation-table th {
  color: #ffffff !important;
  background: #083b7a !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.24) !important;
}

/* Site-wide mobile compatibility layer. Keep this near the end so it wins over older page rules. */
html {
  overflow-x: hidden !important;
}

img,
video,
canvas,
iframe,
svg {
  max-width: 100% !important;
}

table {
  max-width: 100% !important;
}

@media (max-width: 1024px) {
  body {
    overflow-x: hidden !important;
  }

  .page,
  .hero-container,
  .hero-news,
  .card,
  .public-service-card,
  .incident-card,
  .evacuation-card,
  .drrm-downloads-card,
  .analytics-section,
  .dashboard-section,
  .home-landing-card,
  .home-live-card,
  .home-mini-panel,
  .dost-card,
  .training-card,
  .community-card,
  .plans-card,
  .disaster-report-card {
    width: min(100% - 24px, 100%) !important;
    max-width: calc(100vw - 24px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .public-tools-grid,
  .home-summary-cards,
  .home-live-grid,
  .home-mini-grid,
  .dashboard-grid,
  .analytics-grid,
  .ops-workspace-grid,
  .community-card-grid,
  .agency-facebook-updates-grid,
  .hazard-grid,
  .forecast-grid,
  .hotline-grid,
  .evacuation-grid,
  .downloads-grid,
  .training-grid,
  .plans-grid,
  .report-grid {
    grid-template-columns: 1fr !important;
  }

  .table-container,
  .table-responsive,
  .incident-log-shell,
  .evacuation-table-wrapper,
  .rainfall-table-wrapper,
  .weather-table-wrapper,
  .community-table-wrapper,
  .analytics-table-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  table,
  .incident-table,
  .evacuation-table,
  .rainfall-table,
  .weather-table {
    min-width: 680px;
  }
}

@media (max-width: 768px) {
  body {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 110px !important;
    font-size: 14px !important;
  }

  .site-header {
    min-height: 168px !important;
    height: auto !important;
    padding: 18px 58px 14px !important;
    overflow: hidden !important;
  }

  .site-header .header-logo {
    pointer-events: none;
  }

  .site-header .header-logo-frame {
    width: 56px !important;
    height: 56px !important;
  }

  .site-header .municipality-name {
    font-size: clamp(34px, 10vw, 54px) !important;
    line-height: 0.95 !important;
    letter-spacing: 0 !important;
    white-space: normal !important;
  }

  .site-header .header-title h1 {
    font-size: clamp(18px, 5vw, 26px) !important;
    line-height: 1.08 !important;
    max-width: 100% !important;
  }

  .site-header .subtitle,
  .site-header .header-title .eyebrow {
    font-size: 12px !important;
    line-height: 1.25 !important;
  }

  .site-header .location {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 5px !important;
  }

  .site-header .header-badge {
    min-width: 0 !important;
    max-width: 100% !important;
    white-space: normal !important;
    font-size: 10.5px !important;
    padding: 5px 7px !important;
  }

  .page {
    padding: 18px 0 110px !important;
  }

  .section-title,
  .layer-header,
  .card h2,
  .card h3 {
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
    line-height: 1.16 !important;
  }

  .card,
  .public-service-card,
  .incident-card,
  .evacuation-card,
  .drrm-downloads-card,
  .ops-workspace-card,
  .disaster-report-card,
  .home-landing-card,
  .home-live-card,
  .home-mini-panel {
    padding: 14px !important;
    border-radius: 8px !important;
  }

  input,
  select,
  textarea,
  button {
    max-width: 100% !important;
    font-size: 16px !important;
  }

  .public-service-actions,
  .hotline-item-actions,
  .map-controls,
  .map-controls-container,
  .ops-chip-row,
  .form-actions,
  .evacuation-card-actions {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .public-service-actions > *,
  .hotline-item-actions > *,
  .map-controls > *,
  .map-controls-container > *,
  .ops-chip-row > *,
  .form-actions > *,
  .evacuation-card-actions > * {
    width: 100% !important;
  }

  #heroSlider {
    width: 100% !important;
    height: clamp(230px, 48vw, 360px) !important;
    border-radius: 8px !important;
  }

  .hero-container {
    margin-top: 14px !important;
  }

  .slider-btn {
    width: 38px !important;
    height: 44px !important;
    min-width: 38px !important;
  }

  #map,
  #earthquakeMap,
  #volcanoMap,
  #fire-map,
  .map-container,
  .leaflet-container,
  .fire-map,
  .hazard-map {
    height: min(58vh, 420px) !important;
    min-height: 280px !important;
  }

  iframe,
  .facebook-embed-frame,
  .windy-embed,
  .ventusky-embed {
    width: 100% !important;
    min-height: 360px !important;
  }

  .message-facebook,
  .facebook-message-btn,
  .messenger-float,
  [class*="facebook"][class*="float"] {
    right: 12px !important;
    bottom: 72px !important;
    max-width: calc(100vw - 24px) !important;
  }

  .site-dev-banner,
  .hotline-action-bar {
    min-height: 46px !important;
    padding: 8px 10px !important;
    text-align: center !important;
    white-space: normal !important;
    line-height: 1.25 !important;
  }
}

@media (max-width: 480px) {
  body {
    padding-bottom: 126px !important;
  }

  .site-header {
    min-height: 154px !important;
    padding: 16px 46px 12px !important;
  }

  .site-header .header-logo-frame {
    width: 44px !important;
    height: 44px !important;
  }

  .site-header .municipality-name {
    font-size: clamp(28px, 12vw, 42px) !important;
  }

  .site-header .header-title h1 {
    font-size: clamp(15px, 5vw, 20px) !important;
  }

  .page,
  .hero-container,
  .hero-news,
  .card,
  .public-service-card,
  .incident-card,
  .evacuation-card,
  .drrm-downloads-card,
  .ops-workspace-card,
  .disaster-report-card,
  .home-landing-card,
  .home-live-card,
  .home-mini-panel {
    width: min(100% - 16px, 100%) !important;
    max-width: calc(100vw - 16px) !important;
  }

  .card,
  .public-service-card,
  .incident-card,
  .evacuation-card,
  .drrm-downloads-card,
  .ops-workspace-card,
  .disaster-report-card {
    padding: 12px !important;
  }

  table,
  .incident-table,
  .evacuation-table,
  .rainfall-table,
  .weather-table {
    min-width: 620px;
  }

  #heroSlider {
    height: 220px !important;
  }

  #map,
  #earthquakeMap,
  #volcanoMap,
  #fire-map,
  .map-container,
  .leaflet-container,
  .fire-map,
  .hazard-map {
    height: 320px !important;
  }
}

/* Final phone compatibility patch: prevent desktop side-nav/banner rules from leaking into mobile. */
@media (max-width: 980px) {
  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: clip !important;
  }

  body {
    padding-left: 0 !important;
    padding-top: 0 !important;
    margin-left: 0 !important;
  }

  .site-header {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 14px 12px 16px !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    overflow: visible !important;
  }

  .site-header .layer-top-nav.header-nav,
  .layer-top-nav.header-nav {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    left: auto !important;
    bottom: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    overflow: visible !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  .site-header .layer-top-nav.header-nav::before,
  .site-header .layer-top-nav.header-nav::after,
  .layer-top-nav.header-nav::before,
  .layer-top-nav.header-nav::after {
    display: none !important;
    content: none !important;
  }

  .mobile-nav-toggle {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .layer-top-nav.header-nav #mobilePrimaryNav {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    transform: none !important;
  }

  .layer-top-nav.header-nav.mobile-nav-open #mobilePrimaryNav {
    display: grid !important;
    max-height: min(58dvh, 520px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 10px 0 0 !important;
  }

  .layer-top-nav.header-nav.mobile-nav-collapsed #mobilePrimaryNav {
    display: none !important;
  }

  .layer-top-nav .nav-links > button,
  .layer-top-nav .nav-menu-group,
  .layer-top-nav .nav-menu-group > button,
  .layer-top-nav .utility-menu,
  .layer-top-nav .utility-menu > button,
  .layer-top-nav .layer-btn,
  .layer-top-nav .layer-tile,
  .layer-top-nav .nav-submenu-item {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .page,
  .home-section,
  .hero-container,
  .hero-news,
  .home-landing,
  .top-status-board {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  #layer0Page,
  .page.active {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .site-dev-banner {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 12px auto 14px !important;
    padding: 14px 16px !important;
    display: grid !important;
    grid-template-columns: auto 1fr !important;
    align-items: center !important;
    justify-content: start !important;
    gap: 8px 12px !important;
    background: linear-gradient(90deg, rgba(255, 248, 216, 0.98), rgba(255, 242, 198, 0.94)) !important;
    border: 1px solid rgba(245, 158, 11, 0.48) !important;
    border-radius: 10px !important;
    box-shadow: 0 8px 18px rgba(82, 54, 12, 0.08) !important;
    text-align: left !important;
    z-index: 1 !important;
  }

  .site-dev-banner::before {
    content: "!" !important;
    width: 36px !important;
    height: 36px !important;
    display: grid !important;
    place-items: center !important;
    grid-row: 1 / span 2 !important;
    border-radius: 50% !important;
    background: #fff7df !important;
    color: #dd6b20 !important;
    font-size: 24px !important;
    font-weight: 950 !important;
  }

  .site-dev-banner strong,
  .site-dev-banner span {
    display: block !important;
    min-width: 0 !important;
    color: #352411 !important;
    -webkit-text-fill-color: #352411 !important;
    text-align: left !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    text-shadow: none !important;
  }

  .site-dev-banner strong {
    font-size: 15px !important;
    line-height: 1.1 !important;
  }

  .site-dev-banner span {
    font-size: 14px !important;
    line-height: 1.35 !important;
    font-weight: 750 !important;
  }

  .messenger-float-btn {
    left: 12px !important;
    right: 12px !important;
    bottom: 72px !important;
    width: auto !important;
    max-width: none !important;
    justify-content: center !important;
    white-space: normal !important;
    text-align: center !important;
  }
}

/* Last mobile guard: force the restored sidebar back into normal document flow on phones. */
@media (max-width: 980px) {
  body {
    padding-left: 0 !important;
    overflow-x: hidden !important;
  }

  .site-header nav.layer-top-nav.header-nav,
  nav.layer-top-nav.header-nav,
  .site-header .layer-top-nav.header-nav,
  .layer-top-nav.header-nav {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    transform: none !important;
    overflow: visible !important;
    z-index: 1 !important;
  }

  #mobileNavToggle,
  .site-header #mobileNavToggle,
  .mobile-nav-toggle {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 46px !important;
    margin: 0 !important;
    justify-content: center !important;
    z-index: 1 !important;
  }

  .layer-top-nav.header-nav #mobilePrimaryNav,
  .layer-top-nav.header-nav.mobile-nav-open #mobilePrimaryNav,
  .layer-top-nav.header-nav.mobile-nav-collapsed #mobilePrimaryNav {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: min(58dvh, 520px) !important;
    padding: 10px 0 0 !important;
    transform: none !important;
    box-shadow: none !important;
    border-right: 0 !important;
  }

  .layer-top-nav.header-nav.mobile-nav-collapsed #mobilePrimaryNav {
    display: none !important;
  }

  .site-dev-banner {
    width: 100% !important;
    max-width: 100% !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    overflow: visible !important;
  }

  .site-dev-banner strong,
  .site-dev-banner span {
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    text-align: left !important;
  }

  .messenger-float-btn {
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: none !important;
  }

  .hotline-action-bar {
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    display: block !important;
    overflow: visible !important;
    text-align: left !important;
  }

  .hotline-action-copy {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    display: block !important;
    grid-template-columns: none !important;
    gap: 6px 8px !important;
    align-items: start !important;
    transform: none !important;
    animation: none !important;
    padding: 0 !important;
    margin: 0 !important;
    white-space: normal !important;
    text-align: left !important;
  }

  .hotline-action-title,
  .hotline-action-note {
    display: block !important;
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    text-align: left !important;
  }

  .hotline-action-title {
    font-size: 14px !important;
    line-height: 1.25 !important;
  }

  .hotline-action-note {
    margin-top: 4px !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
  }

  .messenger-float-btn {
    bottom: calc(92px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

@media (max-width: 480px) {
  .messenger-float-btn {
    bottom: calc(118px + env(safe-area-inset-bottom, 0px)) !important;
  }
}


/* Emergency hotline agency logos */
#hotlines .hotline-agency-brand {
  min-height: 78px !important;
  display: grid !important;
  grid-template-columns: 54px minmax(108px, 1fr) !important;
  align-items: center !important;
  gap: 12px !important;
  margin-bottom: 10px !important;
}

#hotlines .hotline-agency-brand img {
  width: 54px !important;
  height: 54px !important;
  max-width: 54px !important;
  max-height: 54px !important;
  object-fit: contain !important;
  display: block !important;
  padding: 5px !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  border: 1px solid rgba(15, 58, 91, 0.16) !important;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.14) !important;
}

#hotlines .hotline-agency-brand .label {
  min-width: 108px !important;
  margin: 0 !important;
  display: block !important;
  line-height: 1.18 !important;
  white-space: normal !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: none !important;
}

@media (max-width: 640px) {
  #hotlines .hotline-agency-brand {
    min-height: auto !important;
    grid-template-columns: 48px minmax(0, 1fr) !important;
  }

  #hotlines .hotline-agency-brand img {
    width: 48px !important;
    height: 48px !important;
    max-width: 48px !important;
    max-height: 48px !important;
  }
}

/* Keep the full About Our Logo write-up visible above the fixed site notice. */
#aboutPage.about-page {
  padding-bottom: 140px !important;
}

#about-logo.about-detail-section {
  margin-bottom: 110px !important;
}

#about-logo p {
  margin: 0 !important;
  line-height: 1.78 !important;
}

#about-logo p + p {
  margin-top: 14px !important;
}

/* About page card placement: lift the menu cards closer to the top of the panel. */
#aboutPage .about-menu-panel {
  align-content: start !important;
  padding-top: 26px !important;
  padding-bottom: 54px !important;
}

/* Final mobile compatibility upgrade: keep dense portal sections usable on phones. */
@media (max-width: 980px) {
  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  body {
    min-width: 0 !important;
    padding-bottom: calc(132px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .page,
  section,
  .card,
  .charter-org-card,
  .about-hero-panel,
  .home-landing-card,
  .home-live-card,
  .home-mini-panel,
  .public-service-card,
  .incident-card,
  .evacuation-card,
  .training-card,
  .plans-card,
  .community-card,
  .dost-card,
  .analytics-section,
  .dashboard-section {
    min-width: 0 !important;
    max-width: calc(100vw - 20px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .site-header {
    display: grid !important;
    grid-template-columns: 1fr !important;
    justify-items: center !important;
    gap: 10px !important;
  }

  .site-header .header-logo-duo {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 10px !important;
  }

  .site-header .header-title {
    width: 100% !important;
    min-width: 0 !important;
    text-align: center !important;
  }

  .site-header .header-title h1,
  .site-header .municipality-name,
  .site-header .subtitle,
  .site-header .location {
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
    text-wrap: balance;
  }

  .layer-top-nav.header-nav.mobile-nav-open #mobilePrimaryNav {
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .org-chart-document-layout,
  #aboutPage .org-chart-document-layout {
    width: 100% !important;
    max-width: calc(100vw - 20px) !important;
    padding: 10px !important;
    overflow-x: hidden !important;
  }

  .mdrrmc-org-chart {
    width: 100% !important;
    min-width: 0 !important;
    padding: 16px 12px !important;
    gap: 12px !important;
    border-radius: 12px !important;
  }

  .mdrrmc-node,
  .mdrrmc-person,
  .mdrrmc-unit-title,
  .mdrrmc-branch h4 {
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .mdrrmc-node {
    width: min(100%, 330px) !important;
  }

  .mdrrmc-unit,
  .mdrrmc-branches,
  .mdrrmc-branch {
    width: 100% !important;
    min-width: 0 !important;
  }

  .mdrrmc-branches {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
    padding-top: 8px !important;
  }

  .mdrrmc-branches::before,
  .mdrrmc-branch::before {
    display: none !important;
    content: none !important;
  }

  .mdrrmc-pair {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
    gap: 10px !important;
  }

  .mdrrmc-eoc-members {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .mdrrmc-photo {
    width: 78px !important;
    height: 78px !important;
    margin-bottom: 8px !important;
  }

  .mdrrmc-eoc-members .mdrrmc-photo {
    width: 68px !important;
    height: 68px !important;
  }

  .mdrrmc-person {
    padding: 12px 8px !important;
  }

  .mdrrmc-person strong,
  .mdrrmc-node strong {
    font-size: clamp(12px, 3.5vw, 16px) !important;
    overflow-wrap: anywhere !important;
  }

  .mdrrmc-person small,
  .mdrrmc-node small {
    font-size: clamp(10px, 3vw, 12px) !important;
  }

  .org-table-wrap,
  .functional-chart-grid,
  .table-container,
  .table-responsive,
  .evacuation-table-wrapper,
  .incident-log-shell,
  .barangay-rainfall-table-wrap {
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .site-dev-banner {
    min-height: auto !important;
  }

  .messenger-float-btn {
    bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

@media (max-width: 640px) {
  body {
    padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .site-header {
    padding: 12px 10px 14px !important;
  }

  .site-header .header-logo-frame {
    width: 48px !important;
    height: 48px !important;
  }

  .site-header .municipality-name {
    font-size: clamp(30px, 11vw, 44px) !important;
  }

  .page,
  section,
  .card,
  .charter-org-card,
  .about-hero-panel,
  .home-landing-card,
  .home-live-card,
  .home-mini-panel {
    max-width: calc(100vw - 14px) !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .mdrrmc-pair {
    grid-template-columns: 1fr !important;
  }

  .mdrrmc-eoc-members {
    grid-template-columns: repeat(3, minmax(78px, 1fr)) !important;
  }

  .mdrrmc-photo {
    width: 72px !important;
    height: 72px !important;
  }

  .mdrrmc-eoc-members .mdrrmc-photo {
    width: 60px !important;
    height: 60px !important;
  }

  .mdrrmc-eoc-members .mdrrmc-person {
    padding: 10px 5px !important;
  }

  .mdrrmc-eoc-members .mdrrmc-person strong {
    font-size: 10.5px !important;
    line-height: 1.05 !important;
  }

  .mdrrmc-branch h4,
  .mdrrmc-unit-title {
    min-height: 44px !important;
    font-size: 12.5px !important;
    padding: 7px 8px !important;
  }

  .site-dev-banner {
    grid-template-columns: 1fr !important;
    text-align: center !important;
  }

  .site-dev-banner::before {
    display: none !important;
  }

  .site-dev-banner strong,
  .site-dev-banner span {
    text-align: center !important;
  }

  .messenger-float-btn {
    bottom: calc(122px + env(safe-area-inset-bottom, 0px)) !important;
    font-size: 13px !important;
    padding: 10px 12px !important;
  }
}

@media (max-width: 420px) {
  .mdrrmc-org-chart {
    padding: 12px 8px !important;
  }

  .mdrrmc-eoc-members {
    grid-template-columns: 1fr !important;
  }

  .mdrrmc-eoc-members .mdrrmc-photo {
    width: 72px !important;
    height: 72px !important;
  }

  .site-header .subtitle,
  .site-header .location,
  .site-header .header-title .eyebrow {
    font-size: 11px !important;
  }
}

/* ========================================================================== 
   UNIVERSAL MOBILE FIT + ACCESSIBLE PINCH ZOOM
   Final cascade layer for legacy and newly added portal modules.
   ========================================================================== */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  touch-action: auto;
}

img,
svg,
video,
canvas,
iframe,
object,
embed {
  max-width: 100%;
}

img,
video,
canvas {
  height: auto;
}

input,
select,
textarea,
button {
  max-width: 100%;
  font: inherit;
}

@media (max-width: 980px) {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  html,
  body {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body {
    overflow-x: clip !important;
    touch-action: auto !important;
  }

  main,
  .page,
  .page.active,
  .content,
  .main-content,
  .dashboard-container,
  .dashboard-grid,
  .section-content,
  .module-content,
  .card-grid,
  .form-grid,
  .home-grid,
  .about-section-grid,
  .about-objectives-grid,
  .about-target-grid,
  .charter-summary-grid,
  .functional-chart-grid {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .dashboard-grid,
  .card-grid,
  .form-grid,
  .home-grid,
  .about-section-grid,
  .about-objectives-grid,
  .about-target-grid,
  .charter-summary-grid,
  .functional-chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  /* Every table remains readable and can be finger-scrolled horizontally. */
  table {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden;
    border-collapse: collapse;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
  }

  thead,
  tbody,
  tfoot {
    max-width: 100%;
  }

  th,
  td {
    max-width: min(72vw, 360px);
    padding: 8px 7px !important;
    font-size: clamp(11px, 2.8vw, 14px) !important;
    line-height: 1.3 !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .table-container,
  .table-responsive,
  .table-wrapper,
  .org-table-wrap,
  .charter-table-wrap,
  .evacuation-table-wrapper,
  .barangay-rainfall-table-wrap,
  .incident-log-shell,
  [class*="table-wrap"],
  [class*="table-container"] {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
  }

  iframe,
  .map,
  [id*="map"],
  [class*="map-container"],
  [class*="map-wrapper"] {
    max-width: 100% !important;
  }

  pre,
  code {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea {
    width: 100% !important;
    min-width: 0 !important;
    font-size: 16px !important;
  }

  .modal,
  .modal-content,
  .dialog,
  [role="dialog"] {
    max-width: calc(100vw - 20px) !important;
    max-height: calc(100dvh - 20px) !important;
    overflow: auto !important;
  }

  .mdrrmc-eoc-leader-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
  }

  .mdrrmc-eoc-members {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: 100% !important;
  }
}

@media (max-width: 640px) {
  .dashboard-grid,
  .card-grid,
  .form-grid,
  .home-grid,
  .about-section-grid,
  .about-objectives-grid,
  .about-target-grid,
  .charter-summary-grid,
  .functional-chart-grid {
    grid-template-columns: 1fr !important;
  }

  .page,
  section,
  article,
  .card,
  .panel {
    min-width: 0 !important;
  }

  .button-row,
  .actions,
  .form-actions,
  .charter-actions {
    flex-wrap: wrap !important;
  }

  .button-row > *,
  .actions > *,
  .form-actions > *,
  .charter-actions > * {
    flex: 1 1 140px;
  }

  .mdrrmc-eoc-leader-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .mdrrmc-eoc-members {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 420px) {
  .mdrrmc-eoc-leader-row,
  .mdrrmc-eoc-members {
    grid-template-columns: 1fr !important;
  }

  .mdrrmc-eoc-leader-row::after,
  .mdrrmc-eoc-members::after,
  .mdrrmc-eoc-leader-row > .mdrrmc-person::before,
  .mdrrmc-eoc-members > .mdrrmc-person::before {
    display: none !important;
    content: none !important;
  }

  .mdrrmc-nested-eoc > .mdrrmc-eoc-leader-row::before,
  .mdrrmc-nested-eoc > .mdrrmc-eoc-members::before {
    left: 50% !important;
  }

  th,
  td {
    max-width: 82vw;
    font-size: 11px !important;
  }
}

/* Adjacent rainfall: use the available desktop workspace instead of the narrow card cap. */
@media (min-width: 981px) {
  #layer1Page #typhoon-dashboard {
    width: min(calc(100vw - 420px), 1480px) !important;
    max-width: 1480px !important;
    margin-left: 50% !important;
    margin-right: 0 !important;
    transform: translateX(-50%);
  }

  #layer1Page .barangay-rainfall-card,
  #layer1Page .adjacent-rainfall-card {
    width: min(calc(100vw - 420px), 1480px) !important;
    max-width: 1480px !important;
    margin-left: 50% !important;
    margin-right: 0 !important;
    transform: translateX(-50%);
  }

  #layer1Page .adjacent-rainfall-table-wrap {
    overflow-x: auto;
  }

  #layer1Page .barangay-rainfall-table-wrap {
    overflow-x: auto;
  }

  #layer1Page #brgyRainTable {
    width: 100%;
    min-width: 1240px;
    table-layout: fixed;
  }

  #layer1Page #adjacentRainTable {
    width: 100%;
    min-width: 1240px;
    table-layout: fixed;
  }

  #layer1Page #adjacentRainTable thead th {
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
  }

  #layer1Page #brgyRainTable,
  #layer1Page #adjacentRainTable {
    font-size: 16px !important;
  }

  #layer1Page #brgyRainTable th,
  #layer1Page #brgyRainTable td,
  #layer1Page #adjacentRainTable th,
  #layer1Page #adjacentRainTable td {
    padding: 12px 11px !important;
    font-size: 15px !important;
    line-height: 1.4 !important;
  }

  #layer1Page #brgyRainTable thead th,
  #layer1Page #adjacentRainTable thead th {
    font-size: 15px !important;
    line-height: 1.3 !important;
  }

  #layer1Page #brgyRainTable .weather-badge,
  #layer1Page #adjacentRainTable .weather-badge {
    font-size: 14px !important;
    line-height: 1.25 !important;
    padding: 6px 9px !important;
  }
}

@media (max-width: 980px) {
  #layer1Page #typhoon-dashboard {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    transform: none;
  }

  #layer1Page .barangay-rainfall-card,
  #layer1Page .adjacent-rainfall-card {
    width: min(100% - 20px, 100%) !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    transform: none;
  }
}
.admin-workspace-link {
  display: inline-flex;
  margin-top: 12px;
  padding: 10px 16px;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 9px;
  color: #fff;
  background: #0b6754;
  font-weight: 800;
  text-decoration: none;
}
.admin-workspace-link:hover, .admin-workspace-link:focus-visible { background: #084f41; }
.community-approvals-panel { margin: 24px auto; padding: 22px; border: 1px solid #cbded6; border-radius: 18px; background: #f7fbf9; box-shadow: 0 18px 45px rgba(7,59,50,.1); }
.community-approvals-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.community-approvals-heading span { color: #0b6754; font-size: .72rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.community-approvals-heading h2 { margin: 4px 0 6px; color: #153b31; font-size: clamp(1.5rem,3vw,2.2rem); }
.community-approvals-heading p { max-width: 820px; margin: 0; color: #526b62; }
.community-approvals-heading a { padding: 9px 13px; border-radius: 8px; color: #fff; background: #0b6754; font-size: .78rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.community-approvals-frame { display: block; width: 100%; min-height: 1050px; border: 1px solid #d4e1dc; border-radius: 13px; background: #f5f3e9; }
#dashboardPage.community-approvals-only > :not(#communityDrrmApprovals) { display: none !important; }
#dashboardPage.community-approvals-only #communityDrrmApprovals { display: block !important; margin-top: 0; }
@media (max-width:700px) { .community-approvals-panel { padding: 12px; } .community-approvals-heading { flex-direction: column; } .community-approvals-frame { min-height: 1300px; } }

/* Final cascade guard for the mobile EOC drawer. Keep this last. */
@media (max-width: 980px) {
  body { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important; }
  body.mobile-menu-open { overflow: hidden !important; }
  .site-header nav.layer-top-nav.header-nav,
  nav.layer-top-nav.header-nav,
  .site-header .layer-top-nav.header-nav,
  .layer-top-nav.header-nav {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    width: min(88vw, 360px) !important;
    max-width: 360px !important;
    height: 100dvh !important;
    padding: calc(12px + env(safe-area-inset-top, 0px)) 12px calc(24px + env(safe-area-inset-bottom, 0px)) !important;
    overflow-y: auto !important;
    background: linear-gradient(180deg, #071426, #0f2037) !important;
    transform: translateX(-105%) !important;
    z-index: 10020 !important;
  }
  .layer-top-nav.header-nav.mobile-nav-open { transform: translateX(0) !important; }
  .layer-top-nav.header-nav #mobilePrimaryNav,
  .layer-top-nav.header-nav.mobile-nav-open #mobilePrimaryNav,
  .layer-top-nav.header-nav.mobile-nav-collapsed #mobilePrimaryNav {
    display: grid !important;
    position: static !important;
    height: auto !important;
    max-height: none !important;
    padding: 12px 0 28px !important;
    overflow: visible !important;
  }
  .mobile-eoc-quick-nav { position: sticky !important; top: 0 !important; z-index: 3 !important; }
  #mobileNavToggle, .site-header #mobileNavToggle, .mobile-nav-toggle {
    position: sticky !important;
    top: calc(64px + env(safe-area-inset-top, 0px)) !important;
    z-index: 3 !important;
  }
  .mobile-eoc-dock { display: grid !important; }
  .mobile-nav-backdrop { display: block; }
  body:not(.mobile-menu-open) .mobile-nav-backdrop { pointer-events: none; opacity: 0; }
  body.mobile-menu-open .mobile-nav-backdrop { pointer-events: auto; opacity: 1; }
  body.mobile-menu-open .mobile-eoc-dock { visibility: hidden; }
  body.mobile-menu-open .messenger-float-btn,
  body.mobile-menu-open .hotline-action-bar,
  body.mobile-menu-open .site-dev-banner { display: none !important; }
}
