/* qraw3.css */
html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }

html, body { max-width: 100%; overflow-x: hidden; }

img, svg, video, canvas { max-width: 100%; height: auto; display: block; }


.table-wrapper {
  padding: 1.5rem;
  background-color: transparent;
  border-radius: 1rem;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.table-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: #ffffff;
}
.table-responsive::-webkit-scrollbar {
    width: 10px;
}
.table-responsive::-webkit-scrollbar-thumb {
    background-color: #6c757d;
    border-radius: 5px;
}
.table-responsive::-webkit-scrollbar-track {
    background: #343a40;
}
.table-responsive {
    width: 100%;
}

.table {
    width: 100% !important;
    table-layout: auto;
}
.dashboard-widget.maximized .table-responsive {
  flex: 1;
  overflow-y: auto;
}

/* qraw3.css */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(400px, auto);
  gap: 2rem;
  padding: 1rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden; /* defensive */
}





.clickable-metric {
  cursor: pointer;
  transition: transform 0.1s ease-in-out;
}
.clickable-metric:hover {
  transform: scale(1.02);
  box-shadow: 0 0 0.5rem rgba(0,0,0,0.1);
}

 .dashboard-widget {
  background: linear-gradient(135deg, #1e1e2f 0%, #252538 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  z-index: 100;
  display: flex;
  flex-direction: column;
  min-height: 400px;
}
.dashboard-widget.maximized {
  position: relative;
  z-index: 999;
  grid-column: 1 / -1;
  width: 100% !important;
  height: 85vh !important;
  transform: none !important;
}
/* in your CSS */
#widget-1-body {
  height: 40vh;           /* or whatever fits your layout */
  overflow-y: auto;
}
.tab-list {
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #f1f1f1;
}
.tab-content {
    border: 0.5px solid #65c8d0;
    border-radius: 10px;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.5);
    background-color: #ffffff;
    padding: 2px;
}
/* Individual tab links */
.tab-link {
    float: left;
    padding: 14px 16px;
    text-align: center;
    cursor: pointer;
    color: #0b2c4a;
    background-color: #e9e9e9; /* Light gray background */
    border-right: 1px solid #bbb;
}

/* Hover effects for tabs */
.tab-link:hover {
    background-color: #ddd; /* Darker shade on hover */
    color: #666;
}

/* Styles for the active tab */
.tab-link.current {
    background-color: #666; /* Dark background for active tab */
    color: white; /* White text color for contrast */
}

/* Tab content sections */
.tab-content {
    display: none; /* Hidden by default */
    padding: 20px;
    border-top: none;
    background-color: #464748; /* White background for the content */
}

/* Current tab content is visible */
.tab-content.current {
    display: block;
}
.tab-content {
    background-color: #464748;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-family: Arial, sans-serif;
}
#widget-2 .card {
  background: linear-gradient(135deg, rgba(37, 37, 56, 0.95) 0%, rgba(30, 30, 47, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

#widget-2 .card-body > div {
  font-size: 0.95rem;
  overflow-y: auto;
  color: #e2e8f0;
}

/* ---------- Widget-2 Restyle (Dark Theme) ---------- */
#widget-2-body {
  background: transparent;
  padding: 1rem;
}

/* Facility Details Card */
#widget-2-body .facility-card {
  background: linear-gradient(135deg, rgba(37, 37, 56, 0.95) 0%, rgba(30, 30, 47, 0.95) 100%);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
#widget-2-body .facility-card .card-header {
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
#widget-2-body .facility-card .card-body {
  padding: 1.25rem 1.5rem;
}
#widget-2-body .facility-card dt {
  font-weight: 600;
  color: #9ca3af;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
#widget-2-body .facility-card dd {
  margin-bottom: 1rem;
  color: #ffffff;
  font-size: 0.95rem;
}

/* AQI Globe */
#widget-2-body .aqi-globe {
  font-size: 1.25rem;
  font-weight: 600;
  color: #67e8f9;
  padding: .75rem;
  background: rgba(13, 202, 240, 0.15);
  border-radius: .75rem;
  display: inline-block;
  border: 1px solid rgba(13, 202, 240, 0.3);
}

/* Map Card */
#widget-2-body .map-card {
  background: linear-gradient(135deg, rgba(37, 37, 56, 0.95) 0%, rgba(30, 30, 47, 0.95) 100%);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
#widget-2-body .map-card .card-header {
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
#widget-2-body .map-card .card-body {
  padding: 0;
}
#widget-2-body #facility_map {
  width: 100%;
  height: 100%;
  min-height: 350px;
}

.widget-header {
  background: rgba(0, 0, 0, 0.25);
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.widget-header strong {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.widget-header .btn-light {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
}

.widget-header .btn-light:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(101, 200, 208, 0.5);
  color: #ffffff;
}
.widget-body {
    min-width: 0;
  padding: 0;
}
.map-container {
  height: 100%;
  width: 100%;
}
.legend {
  background: white;
  padding: 10px;
  font-size: 0.9rem;
  border-radius: 5px;
}

body, html {
  height: 100%;
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: #121218;
}

/* Placeholder styling for dark theme */
.placeholder-empty {
  color: #9ca3af !important;
}

.placeholder-empty i {
  color: #6b7280 !important;
}

/* Widget body default styling */
.widget-body {
  background: transparent;
  color: #e2e8f0;
}
.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 240px;
  padding-top: 1rem;
  background-color: #1f1f2e;
  color: #fff;
  font-size: 0.95rem;
  z-index: 1020;
}

.sidebar .nav-link {
  color: #ddd;
  padding: 0.6rem 1rem;
  border-radius: 4px;
  transition: background 0.2s;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  background-color: #2e2e4e;
  color: #fff;
}

.sidebar .nav-link i {
  font-size: 1.1rem;
}

.sidebar .dropdown-menu {
  background-color: #2e2e4e;
  border: none;
}

.sidebar .dropdown-menu .dropdown-item {
  color: #ccc;
}

.sidebar .dropdown-menu .dropdown-item:hover {
  background-color: #3e3e5e;
  color: #fff;
}

/* qraw3.css */
.container-fluid {
  margin-left: 240px;        /* keep your fixed sidebar space */
  padding-right: 1rem;
  width: calc(100vw - 240px);
  max-width: calc(100vw - 240px);
  overflow-x: hidden;        /* you already had this — keep it as a safety net */
}


.display-6 {
  font-size: 2rem; /* Reduce slightly if wrapping still occurs */
  white-space: nowrap;
}
@media (min-width: 992px) {
  .modal-xxl-75 {
    max-width: 75vw;
  }
}
/* Make rows show a pointer and subtle hover */
#headertable tr {
  cursor: pointer;
  transition: background-color 0.2s;
}
#headertable tr:hover {
  background-color: #f8f9fa;  /* very light grey */
}
.sidebar .nav-link.active {
  background-color: rgba(255,255,255,0.1);
  color: #fff;
  border-left: 4px solid #0d6efd; /* or whatever highlight color */
  padding-left: calc(0.5rem - 4px);
}
.slider-labels {
  font-size: 0.85rem;
  color: #6c757d;
  margin-top: 0.25rem;
}

.custom-slider {
  appearance: none;
  height: 6px;
  background: #ffc107;
  border-radius: 5px;
  width: 100%;
  outline: none;
}

.custom-slider {
  margin-top: 0.25rem;
}


.widget-body .tab-content {
  flex: 1 1 auto;
  overflow-y: auto;
  padding-right: 0.75rem;
}
.tab-content {
    border: 1px solid rgba(101, 200, 208, 0.3);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background-color: rgba(30, 30, 47, 0.95);
    padding: 1rem;
}


                             /* Card container */
#questions-container .question-card {
  background: rgba(37, 37, 56, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Header: number + text */
.question-header {
  display: flex;
  align-items: baseline;
  margin-bottom: 12px;
}
.question-number {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
  margin-right: 8px;
}
.question-text {
  font-size: 1rem;
  color: #e2e8f0;
  line-height: 1.4;
}

/* Radio group layout */
.custom-radio-group {
  display: flex;
  gap: 12px;
}

/* Toggle-style radios */
.custom-radio {
  position: relative;
  flex: 1;
}
.custom-radio input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  margin: 0;
  z-index: 1;
}
.radio-label {
  display: block;
  text-align: center;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  font-size: 0.9rem;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.2s ease;
}
.radio-label:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(101, 200, 208, 0.5);
}
.custom-radio input:checked + .radio-label {
  background-color: #0d6efd;
  border-color: #0d6efd;
  color: #fff;
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .custom-radio-group {
    flex-direction: column;
  }
  .radio-label {
    text-align: left;
  }
}
/* Grid layout for four metrics */
#widget-5-body .risk-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; /* space between cards */
}

/* Card container */
.risk-card {
  background: linear-gradient(135deg, rgba(37, 37, 56, 0.9) 0%, rgba(30, 30, 47, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  padding: 20px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.risk-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(101, 200, 208, 0.15);
}

/* Card header */
.risk-card-header h4 {
  margin: 0 0 12px;
  font-size: 1rem;
  color: #ffffff;
  font-weight: 600;
}
 .risk-badge {
      display: inline-block;
      padding: 8px 14px;
      border-radius: 20px;
      font-weight: 600;
      font-size: 0.95rem;
      min-width: 80px;
      text-align: center;
      /* Default fallback */
      background-color: #e0e0e0 !important;
      color: #333 !important;
    }
    /* Severity overrides */
    .risk-badge.low      { background-color: #28a745 !important; color: #fff !important; }
    .risk-badge.medium   { background-color: #ffc107 !important; color: #212529 !important; }
    .risk-badge.high     { background-color: #dc3545 !important; color: #fff !important; }
    .risk-badge.critical { background-color: #6f42c1 !important; color: #fff !important; }
    .risk-badge.low-medium {
      background-color: #f1c21b !important; /* amber :contentReference[oaicite:1]{index=1} */
    }
    /* Medium/High: between yellow/orange and red – using ISO 3864 “Medium level” orange (#D05D29) as a strong warning tone */
    .risk-badge.medium-high {
      background-color: #d05d29 !important; /* ISO 3864 medium risk :contentReference[oaicite:2]{index=2} */
    }

    /* Container for the semi-circular gauge */
.gauge {
  --percent: 0; /* Will be set via JS: 0–100 */
  position: relative;
  width: 120px;
  height: 60px;            /* Half of a full circle’s height */
  margin: 0 auto 12px;
  overflow: hidden;        /* Clip the bottom half */
}

/* The colored arc background */
.gauge__arc {
  position: absolute;
  top: 0; left: 0;
  width: 120px;
  height: 120px;           /* Full circle diameter */
  border-radius: 50%;
  background: conic-gradient(
    green 0deg,
    yellow 120deg,
    red 240deg
  );                        /* Color wheel segments */
  transform: rotate(calc(var(--percent) * 1.8deg - 180deg));
  /*
    Rotate so:
      percent=0 → -180deg (empty, leftmost)
      percent=100 → 0deg (full half-circle)
  */
  transition: transform 0.5s ease-out;
}

/* Center label showing numeric percentage */
.gauge__center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1rem;
  font-weight: 600;
  color: #e2e8f0;
}
/* Card container - Dark Theme */
.risk-card {
  background: linear-gradient(135deg, rgba(37, 37, 56, 0.95) 0%, rgba(30, 30, 47, 0.95) 100%);
  border-radius: 0.75rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.risk-card-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}
.risk-card-header h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
}

.risk-card-body {
  padding: 1rem;
  text-align: center;
  background: transparent;
}
/* Card header - Dark Theme */
.risk-card-header h4 {
  margin: 0 0 12px;
  font-size: 1rem;
  color: #ffffff;
  font-weight: 600;
}
.risk-badge {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #fff;
  background-color: #6c757d; /* fallback, you’ll override via .low, .medium, etc */
}
    /* Severity overrides */
    .risk-badge.low      { background-color: #28a745 !important; color: #fff !important; }
    .risk-badge.medium   { background-color: #ffc107 !important; color: #212529 !important; }
    .risk-badge.high     { background-color: #dc3545 !important; color: #fff !important; }
    .risk-badge.critical { background-color: #6f42c1 !important; color: #fff !important; }
    .risk-badge.low-medium {
      background-color: #f1c21b !important; /* amber :contentReference[oaicite:1]{index=1} */
    }
    /* Medium/High: between yellow/orange and red – using ISO 3864 “Medium level” orange (#D05D29) as a strong warning tone */
    .risk-badge.medium-high {
      background-color: #d05d29 !important; /* ISO 3864 medium risk :contentReference[oaicite:2]{index=2} */
    }

    /* Container for the semi-circular gauge */
.gauge {
  --percent: 0; /* Will be set via JS: 0–100 */
  position: relative;
  width: 120px;
  height: 60px;            /* Half of a full circle’s height */
  margin: 0 auto 12px;
  overflow: hidden;        /* Clip the bottom half */
}

/* The colored arc background */
.gauge__arc {
  position: absolute;
  top: 0; left: 0;
  width: 120px;
  height: 120px;           /* Full circle diameter */
  border-radius: 50%;
  background: conic-gradient(
    green 0deg,
    yellow 120deg,
    red 240deg
  );                        /* Color wheel segments */
  transform: rotate(calc(var(--percent) * 1.8deg - 180deg));
  /*
    Rotate so:
      percent=0 → -180deg (empty, leftmost)
      percent=100 → 0deg (full half-circle)
  */
  transition: transform 0.5s ease-out;
}

/* Center label showing numeric percentage */
.gauge__center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1rem;
  font-weight: 600;
  color: #e2e8f0;
}

/* Ensure the gauge sits above other elements as needed */
.gauge, .gauge__arc, .gauge__center {
  pointer-events: none;
}

.risk-narrative {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #9ca3af;
  line-height: 1.4;
  text-align: left;
  max-height: 4.5rem;
  overflow: auto;
  padding: 0 0.5rem;
}

/* Ensure the gauge sits above other elements as needed */
.gauge, .gauge__arc, .gauge__center {
  pointer-events: none;
}
.risk-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  align-items: start;
  margin: 1rem 0;
}

/* Section titles - Dark Theme */
.risk-section {
  margin-bottom: 2rem;
}
.risk-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Grid for the two final results */
.risk-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Grid for the three supporting metrics */
.risk-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

/* Reuse your existing .risk-card styling, but make final cards stand out */
.risk-card.large {
  border: 2px solid #dee2e6;
}
.risk-card.large .risk-card-header h4 {
  font-size: 1.2rem;
}
.risk-card.large .risk-card-body {
  padding: 1.5rem;
}

/* Center the gauge containers inside large cards */
.risk-card.large #gauge_risk_rating,
.risk-card.large #gauge_residual_risk {
  width: 280px !important;
  height: 160px !important;
  display: block !important;
  margin: 0 auto !important;   /* << centers the fixed-width container */
}

/* Section header - Dark Theme Tables */
.professional-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}
.professional-table th,
.professional-table td {
  padding: .75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  vertical-align: middle;
  color: #e2e8f0;
}
.professional-table thead {
  background-color: rgba(0, 0, 0, 0.3);
}
.professional-table thead th {
  color: #ffffff;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-size: 0.85rem;
}
.professional-table tbody tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.02);
}
.professional-table tbody tr:nth-child(odd) {
  background-color: transparent;
}
.professional-table tbody tr:hover {
  background-color: rgba(101, 200, 208, 0.1);
}
.priority-badge {
  display: inline-block;
  min-width: 1.5rem;
  padding: .25rem .5rem;
  font-size: .85rem;
  font-weight: 500;
  color: #fff;
  border-radius: .375rem;
  text-align: center;
}
/* Color-coding by priority level */
.priority-badge.level-1 { background-color: #d9534f; } /* critical / top */
.priority-badge.level-2 { background-color: #f0ad4e; }
.priority-badge.level-3 { background-color: #5bc0de; }
.priority-badge.level-4 { background-color: #5cb85c; }
.priority-badge.level-5 { background-color: #0275d8; }
.professional-table td .btn { transform: scale(0.8); margin-right: 5px; }

/* ========================================
   Recommendations Table - Light Theme Override
   ======================================== */

#recommendationsTable {
  background-color: #ffffff !important;
}

#recommendationsTable thead {
  background-color: #1e1e2f !important;
  border-bottom: 2px solid rgba(101, 200, 208, 0.3);
}

#recommendationsTable thead th {
  color: #e2e8f0 !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-size: 0.8rem;
  padding: 0.875rem 0.75rem;
  border-bottom: 2px solid rgba(101, 200, 208, 0.3) !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
}

#recommendationsTable tbody tr {
  background-color: #ffffff !important;
}

#recommendationsTable tbody tr:nth-child(even) {
  background-color: #f9fafb !important;
}

#recommendationsTable tbody td {
  color: #374151 !important;
  border: none !important;
  border-bottom: 1px solid #e5e7eb !important;
  padding: 0.875rem 0.75rem;
  font-size: 0.9rem;
}

#recommendationsTable tbody tr:hover {
  background-color: #f0f9ff !important;
}

/* Priority badge in recommendations */
#recommendationsTable .priority-badge {
  font-weight: 600;
}

/* Action buttons in recommendations table */
#recommendationsTable td .btn {
  transform: scale(0.85);
  margin-right: 4px;
}

#recommendationsTable td .btn-outline-primary {
  color: #0176D3;
  border-color: #0176D3;
}

#recommendationsTable td .btn-outline-primary:hover {
  background-color: #0176D3;
  color: #ffffff;
}

#recommendationsTable td .btn-outline-danger {
  color: #dc3545;
  border-color: #dc3545;
}

#recommendationsTable td .btn-outline-danger:hover {
  background-color: #dc3545;
  color: #ffffff;
}

/* Copy button */
.copy-btn {
  font-size: .9rem;
  padding: .25rem .5rem;
}

/* Metric grid */
.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* Individual metric box - Dark Theme */
.metric-box {
  background: linear-gradient(135deg, rgba(37, 37, 56, 0.8) 0%, rgba(30, 30, 47, 0.8) 100%);
  border-radius: .5rem;
  padding: 1rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.metric-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: .5rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.metric-value {
  font-size: 1.5rem;
  color: #65c8d0;
  margin-bottom: .5rem;
  font-weight: 700;
}

.metric-narrative {
  font-size: .85rem;
  color: #9ca3af;
  line-height: 1.3;
}
/* CARD LAYOUT - Dark Theme */
.chart-card {
  background: linear-gradient(135deg, rgba(37, 37, 56, 0.95) 0%, rgba(30, 30, 47, 0.95) 100%);
  border-radius: .75rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin: 1rem 0;
  overflow: hidden;
}
.chart-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}
.chart-card-header h5 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
}
.chart-actions button,
.chart-actions a {
  margin-left: .5rem;
  font-size: .9rem;
}
.chart-card-body {
  padding: 1rem;
  text-align: center;
  background: transparent;
}
.chart-card-body img {
  max-width: 100%;
  height: auto;
  cursor: pointer;
  border-radius: .5rem;
}
.chart-description {
  display: none;
  margin-top: 1rem;
  padding: 0.75rem;
  background-color: rgba(23, 162, 184, 0.1);
  border-left: 4px solid #17a2b8;
  border-radius: 0.25rem;
  color: #e2e8f0;
  font-style: italic;
}
/* Hide the tabs and all panes by default in scenario-mode */
#widget-3.scenario-mode .tab-content:not(#tab-4) { display: none !important; }
#widget-3.scenario-mode #tab-4 { display: block !important; }
#widget-3.scenario-mode .nav-tabs { opacity: .15; pointer-events: none; }

/* But show the Scenario Text pane (tab-4) */
#widget-3.scenario-mode #tab-4 {
  display: block !important;
  padding: 1rem;
  overflow-y: auto;
  max-height: 80vh;        /* let it scroll if it’s very long */
  background: #fff;        /* clear reading surface */
  border-radius: 0 0 .25rem .25rem;
  box-shadow: inset 0 0 8px rgba(0,0,0,0.05);
}

/* Optional: smooth fade-in/out */
#widget-3 .tab-content,
#widget-3 .nav-tabs {
  transition: opacity .2s ease;
}
#widget-3.scenario-mode .nav-tabs { opacity: 0; }
#widget-3.scenario-mode #tab-4    { opacity: 1; }

  /* Match Select2 to Bootstrap pill and padding */
    .select2-container--default .select2-selection--single {
        border: 1px solid #198754; /* Bootstrap .border-success */
        border-radius: 50rem;      /* Bootstrap .rounded-pill */
        padding: 0.375rem 1rem;     /* Bootstrap .px-3 .py-2 */
        height: auto;
        background-color: white;
    }

    /* Optional: Adjust placeholder font */
    .select2-container--default .select2-selection--single .select2-selection__placeholder {
        color: #6c757d; /* Bootstrap text-muted */
    }

    /* Keep arrow in line */
    .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 100%;
    }

    /* Fix text alignment inside select */
    .select2-selection__rendered {
        line-height: 1.5 !important;
    }
 /* ---------------------------------------- */
/* Asset card styling - Dark Theme */
.asset-card {
  background: linear-gradient(135deg, rgba(37, 37, 56, 0.95) 0%, rgba(30, 30, 47, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.asset-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0.5rem 1rem rgba(101, 200, 208, 0.15);
  border-color: rgba(101, 200, 208, 0.4);
}
.asset-card .card-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}
.asset-card .card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #ffffff;
}
.asset-card .card-text {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-bottom: 0;
  /* limit to 2 lines with ellipsis */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* increase grid gutter for breathing room */
#assetTypeGrid.row {
  row-gap: 1.5rem;
  column-gap: 1rem;
}
/* wrap around the <i> tag */
.asset-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(101, 200, 208, 0.1);
  border-radius: 0.75rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

/* the actual Font-Awesome <i> */
.asset-icon i {
  font-size: 1.5rem;       /* make it larger */
  color: #65c8D0;          /* your brand accent */
  transition: transform 0.2s ease;
}

/* hover effect on the card */
.asset-card:hover .asset-icon {
  background: rgb(255, 255, 255);
  transform: scale(1.05);
}
.asset-card:hover .asset-icon i {
  transform: scale(1.2);
}
.tooltip-icon {
    margin-left: .35rem;
    color: #0d6efd;            /* Bootstrap primary */
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    font-size: 0.95rem;
  }

  /* --------- Optional: refine the tooltipster shadow theme --------- */
  .tooltipster-shadow {
    border-radius: .45rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .12);
    font-size: .9rem;
    line-height: 1.45;
    max-width: 320px;
  }
  /* you can tweak the color to match your theme */
tr.selected {
  background-color: #d0e7ff !important;
}
#headertable tbody tr.selected {
  background-color: #e7f1ff;   /* soft blue */
}
  .btn-saas {
    --btn-minw: 9.5rem;           /* consistent width for tidy grid feel */
    min-width: var(--btn-minw);
    padding: .45rem .8rem;
    line-height: 1.1;
    font-weight: 500;
    border-radius: .6rem;          /* softer corners */
    display: inline-flex;
    align-items: center;
    gap: .5rem;
  }
  .btn-saas i {
    font-size: 1.05rem;            /* consistent icon size */
    width: 1.25rem;                /* reserve space so labels align */
    text-align: center;
  }
  .btn-saas span { white-space: nowrap; }

  /* Disabled appearance unified across <button> & <a> */
  .btn-saas[disabled],
  .btn-saas.disabled,
  .btn-saas[aria-disabled="true"] {
    opacity: .55 !important;
    pointer-events: none;
  }

  /* Keep the whole bar tidy on wrap */
  .qraw-toolbar .btn-group .btn-saas { margin-right: .25rem; }
  .qraw-toolbar .btn-group .btn-saas:last-child { margin-right: 0; }

    .btn-busy {
    pointer-events: none;
    opacity: .75;
  }
  .btn-busy .btn-spinner {
    display: inline-block;
    width: 1rem; height: 1rem;
    border: .15rem solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    margin-right: .5rem;
    vertical-align: -2px;
    animation: spin .7s linear infinite;
  }
  @keyframes spin { to { transform: rotate(360deg); } }

/* Selected row highlighting - Dark Theme */
#headertable tbody tr.selected-row {
    background-color: rgba(101, 200, 208, 0.15) !important;
    border-left: 3px solid #65c8d0;
    box-shadow: inset 0 0 0 1px rgba(101, 200, 208, 0.2);
}

/* Maintain hover effect even on selected rows */
#headertable tbody tr.selected-row:hover {
    background-color: rgba(101, 200, 208, 0.25) !important;
}

/* Ensure DataTable controls have proper spacing */
.dataTables_wrapper .dataTables_length {
    margin-bottom: 15px;
}

.dataTables_wrapper .dataTables_filter {
    margin-bottom: 15px;
}

.dataTables_wrapper .dataTables_info {
    margin-top: 10px;
}

.dataTables_wrapper .dataTables_paginate {
    margin-top: 10px;
}

/* Style the search box - Dark Theme */
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
    margin-left: 0.5rem;
    background: rgba(30, 30, 47, 0.8);
    color: #e2e8f0;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #65c8d0;
    box-shadow: 0 0 0 2px rgba(101, 200, 208, 0.2);
    outline: none;
}

/* DataTables Dark Theme */
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dataTables_info {
    color: #9ca3af;
}

.dataTables_wrapper .dataTables_length select {
    background: rgba(30, 30, 47, 0.8);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    color: #9ca3af !important;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.25rem;
    margin: 0 2px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(101, 200, 208, 0.2) !important;
    border-color: #65c8d0 !important;
    color: #ffffff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #65c8d0 !important;
    border-color: #65c8d0 !important;
    color: #121218 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    color: #4b5563 !important;
    cursor: not-allowed;
}

/* Dark Theme Table Styling */
table.dataTable thead th,
table.dataTable thead td {
    background: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-size: 0.85rem;
}

table.dataTable tbody tr {
    background: transparent;
    color: #e2e8f0;
}

table.dataTable tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

table.dataTable tbody tr:hover {
    background: rgba(101, 200, 208, 0.1) !important;
}

table.dataTable tbody td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

table.dataTable.stripe tbody tr.odd,
table.dataTable.display tbody tr.odd {
    background: transparent;
}

table.dataTable.stripe tbody tr.even,
table.dataTable.display tbody tr.even {
    background: rgba(255, 255, 255, 0.02);
}

/* Ensure table maintains proper styling with DataTables */
#headertable.dataTable {
    width: 100% !important;
}

/* Keep action buttons aligned properly */
#headertable td:last-child,
#headertable td:nth-last-child(2) {
    white-space: nowrap;
}
#tab-78 .chart-fixed-height { height: 220px; max-height: 220px; }
#cmpBarChart { width: 100% !important; height: 100% !important; }

.badge-metric {
  border-radius: 999px;
  padding: .35rem .6rem;
  font-weight: 600;
  min-width: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  line-height: 1;
}
.badge-dot {
  width: .5rem; height: .5rem; border-radius: 50%;
  display: inline-block;
  background: currentColor; opacity: .85;
}
/* Tier colors (approx to typical Impact/Likelihood in your header table) */
.tier-low      { background: #e6f4ea; color: #137333; }  /* green */
.tier-med      { background: #fff4e5; color: #b25e09; }  /* amber */
.tier-high     { background: #fde8e8; color: #c5221f; }  /* red   }
.tier-unknown  { background: #f1f3f4; color: #5f6368; }  /* gray  */

/* Mini heat strip beneath numbers (optional, subtle) */
.heatbar {
  height: 6px; border-radius: 999px; overflow: hidden; background: #eceff1; margin-top: .25rem;
}
.heatbar > i { display: block; height: 100%; background: currentColor; }

/* Button smooth transitions */
#btnUpdateControlSummary {
    transition: all 0.2s ease;
}

#btnUpdateControlSummary:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Spinner animation */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15rem;
}

/* Calculation Methodology Styles - Dark Theme */
.calculation-methodology-container {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.calculation-methodology-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(30, 30, 47, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
  color: #9ca3af;
  font-weight: 500;
  text-align: left;
}

.calculation-methodology-toggle:hover {
  background: rgba(30, 30, 47, 0.8);
  border-color: rgba(101, 200, 208, 0.3);
  color: #e2e8f0;
}

.calculation-methodology-toggle:focus {
  outline: 2px solid #65c8d0;
  outline-offset: 2px;
}

.methodology-icon {
  flex-shrink: 0;
  color: #9ca3af;
}

.methodology-label {
  flex-grow: 1;
}

.methodology-chevron {
  flex-shrink: 0;
  transition: transform 0.2s ease;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

.calculation-methodology-toggle[aria-expanded="true"] .methodology-chevron {
  transform: rotate(180deg);
}

.calculation-methodology-content {
  margin-top: 12px;
  padding: 16px;
  background: rgba(30, 30, 47, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  animation: slideDown 0.2s ease-out;
}

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

.methodology-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.methodology-detail-icon {
  color: #65c8d0;
}

.methodology-text {
  font-size: 13px;
  line-height: 1.6;
  color: #9ca3af;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  padding-left: 12px;
  border-left: 3px solid #65c8d0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .calculation-methodology-toggle {
    font-size: 12px;
    padding: 8px 10px;
  }

  .methodology-text {
    font-size: 12px;
  }
}

/* Print styles - ensure methodology is visible when printing */
@media print {
  .calculation-methodology-content {
    display: block !important;
  }

  .calculation-methodology-toggle {
    display: none;
  }
}

/* Event Costs Styling - Dark Theme */
.event-costs-container {
  background: linear-gradient(135deg, rgba(37, 37, 56, 0.95) 0%, rgba(30, 30, 47, 0.95) 100%);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 20px;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}
.event-costs-header {
  background: linear-gradient(135deg, rgba(101, 200, 208, 0.3) 0%, rgba(96, 165, 250, 0.3) 100%);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.event-costs-header i {
  font-size: 20px;
  color: #65c8d0;
}

.event-costs-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
}

/* 2x2 GRID LAYOUT - Dark Theme */
.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 20px;
  background: transparent;
}

.metric-card {
  background: rgba(30, 30, 47, 0.8);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(101, 200, 208, 0.15);
  border-color: rgba(101, 200, 208, 0.3);
}

.time-metric {
  border-left: 4px solid #60a5fa;
}

.money-metric {
  border-left: 4px solid #65c8d0;
}

.highlighted {
  background: linear-gradient(135deg, rgba(101, 200, 208, 0.08) 0%, rgba(96, 165, 250, 0.08) 100%);
  border: 1px solid rgba(101, 200, 208, 0.4);
}

.metric-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 15px;
  color: #9ca3af;
}

.time-metric .metric-header {
  color: #60a5fa;
}

.money-metric .metric-header {
  color: #65c8d0;
}

.metric-value {
  font-size: 32px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
}

.money-metric .metric-value {
  color: #65c8d0;
}

.metric-value.clickable {
  cursor: pointer;
}

.metric-value.clickable:hover {
  text-decoration: underline;
  color: #65c8d0;
}

.metric-description {
  font-size: 13px;
  color: #9ca3af;
  line-height: 1.5;
}

.metric-description:empty {
  display: none;
}

.click-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  padding: 5px 10px;
  background: rgba(101, 200, 208, 0.15);
  border-radius: 15px;
  font-size: 11px;
  font-weight: 600;
  color: #65c8d0;
}

/* METHODOLOGY SPANS FULL WIDTH - Dark Theme */
.methodology-section {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  grid-column: 1 / -1;
}

.methodology-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
}

.methodology-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
}

.methodology-toggle .chevron {
  transition: transform 0.2s;
  color: #9ca3af;
}

.methodology-toggle[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.methodology-content {
  padding: 0 20px 20px;
}

.methodology-text {
  background: rgba(30, 30, 47, 0.6);
  padding: 15px;
  border-radius: 6px;
  border-left: 3px solid #65c8d0;
  font-size: 13px;
  line-height: 1.6;
  color: #9ca3af;
  white-space: pre-wrap;
}

/* RESPONSIVE: Stack to single column on mobile */
@media (max-width: 768px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  .metric-value {
    font-size: 28px;
  }
}

/* Scenario command bar - Dark Theme */
.scenario-command-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
  background-color: #2d2e30 !important;
  border-bottom: 1px solid rgba(101, 200, 208, 0.3) !important;
}

.scenario-command-bar .btn-outline-primary {
  color: #65c8d0 !important;
  border-color: #65c8d0 !important;
  background-color: transparent !important;
}

.scenario-command-bar .btn-outline-primary:hover {
  color: #ffffff !important;
  background-color: #65c8d0 !important;
  border-color: #65c8d0 !important;
}

.scenario-command-bar .btn-outline-primary:focus {
  box-shadow: 0 0 0 0.2rem rgba(101, 200, 208, 0.25) !important;
}

.scenario-command-bar .badge {
  background-color: rgba(101, 200, 208, 0.2) !important;
  color: #65c8d0 !important;
}

.scenario-context-bar {
  font-size: 0.875rem;
  background-color: #3a3b3d !important;
  border-bottom: 1px solid rgba(255,255,255,0.1) !important;
}

.scenario-context-bar .text-muted {
  color: #a0a0a0 !important;
}

.scenario-context-bar .fw-medium,
.scenario-context-bar .small {
  color: #e2e8f0 !important;
}

.scenario-context-bar .text-truncate {
  max-width: 150px;
  display: inline-block;
}

/* Make scenario the hero element - Dark Theme */
#scenario-main-container {
  min-height: 400px;
}

#scenarioView {
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  background: rgba(30, 30, 47, 0.6);
  color: #e2e8f0;
}

#scenarioView:hover {
  border-color: #65c8d0;
  box-shadow: 0 0.5rem 1rem rgba(101, 200, 208, 0.15);
}

#scenarioViewBody {
  color: #e2e8f0;
}

/* Modal styling - Dark Theme */
.modal-xl .modal-body {
  padding: 2rem;
}

.modal-content {
  background: linear-gradient(135deg, #1e1e2f 0%, #252538 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}

.modal-header {
  background: linear-gradient(135deg, rgba(101, 200, 208, 0.2) 0%, rgba(96, 165, 250, 0.2) 100%);
  color: white;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header .modal-title {
  color: #ffffff;
}

.modal-header .btn-close {
  filter: invert(1);
}

.modal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-body label {
  color: #e2e8f0;
}

.modal-body .form-control,
.modal-body .form-select {
  background: rgba(30, 30, 47, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
}

.modal-body .form-control:focus,
.modal-body .form-select:focus {
  border-color: #65c8d0;
  box-shadow: 0 0 0 2px rgba(101, 200, 208, 0.2);
  background: rgba(30, 30, 47, 0.9);
}

.modal-body .form-control::placeholder {
  color: #6b7280;
}

/* Validation indicators */
.validated-field.is-valid {
  border-color: #28a745 !important;
}

.validated-field.is-invalid {
  border-color: #dc3545 !important;
}
.btn.analyzing {
    opacity: 0.6;
    cursor: not-allowed;
    position: relative;
}

.btn.analyzing::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* Incident Selection Styles - Dark Theme */
.incidents-list {
  max-height: 500px;
  overflow-y: auto;
}

.incident-item {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(30, 30, 47, 0.8);
}

.incident-item:hover {
  border-color: #65c8d0;
  box-shadow: 0 4px 16px rgba(101, 200, 208, 0.15);
  transform: translateY(-2px);
}

.incident-item.selected {
  border-color: #65c8d0;
  background: rgba(101, 200, 208, 0.1);
}

.incident-item-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.incident-item-title {
  font-weight: 600;
  color: #ffffff;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.incident-item-id {
  font-family: monospace;
  font-size: 0.7rem;
  color: #9ca3af;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
}

.incident-item-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.incident-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.incident-badge.sector {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.incident-badge.year {
  background: rgba(255, 255, 255, 0.1);
  color: #9ca3af;
}

.incident-badge.country {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

.incident-badge.threat {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.incident-badge.vector {
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
}

.incident-selection-filters .form-control:focus,
.incident-selection-filters .form-select:focus {
  border-color: #65c8d0;
  box-shadow: 0 0 0 3px rgba(101, 200, 208, 0.2);
}

/* Damage Card and Event Card - Dark Theme */
.damage-card,
.event-card {
  background: linear-gradient(135deg, rgba(37, 37, 56, 0.95) 0%, rgba(30, 30, 47, 0.95) 100%);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.damage-card-header,
.event-card-header {
  background: rgba(0, 0, 0, 0.2);
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.damage-card-body,
.event-card-body {
  padding: 1.25rem;
}

.damage-text {
  color: #e2e8f0;
  font-size: 1rem;
  line-height: 1.6;
}

.damage-card-header .copy-btn,
.event-card-header .copy-btn {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
}

.damage-card-header .copy-btn:hover,
.event-card-header .copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(101, 200, 208, 0.5);
  color: #ffffff;
}

/* ========================================
   Bootstrap Dark Theme Overrides
   ======================================== */

/* Card overrides */
.card {
  background: linear-gradient(135deg, rgba(37, 37, 56, 0.95) 0%, rgba(30, 30, 47, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

.card-header {
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.card-body {
  color: #e2e8f0;
}

.card-footer {
  background: rgba(0, 0, 0, 0.15);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Form controls */
.form-control,
.form-select {
  background-color: rgba(30, 30, 47, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
}

.form-control:focus,
.form-select:focus {
  background-color: rgba(30, 30, 47, 0.9);
  border-color: #65c8d0;
  box-shadow: 0 0 0 2px rgba(101, 200, 208, 0.25);
  color: #e2e8f0;
}

.form-control::placeholder {
  color: #6b7280;
}

.form-label {
  color: #e2e8f0;
}

.form-text {
  color: #9ca3af;
}

/* Input groups */
.input-group-text {
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
}

/* Textarea */
textarea.form-control {
  background-color: rgba(30, 30, 47, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
}

/* Alerts */
.alert-info {
  background-color: rgba(13, 202, 240, 0.15);
  border-color: rgba(13, 202, 240, 0.3);
  color: #67e8f9;
}

.alert-warning {
  background-color: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.3);
  color: #fbbf24;
}

.alert-danger {
  background-color: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.alert-success {
  background-color: rgba(74, 222, 128, 0.15);
  border-color: rgba(74, 222, 128, 0.3);
  color: #4ade80;
}

/* Nav tabs */
.nav-tabs {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-tabs .nav-link {
  color: #9ca3af;
  border: 1px solid transparent;
}

.nav-tabs .nav-link:hover {
  border-color: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}

.nav-tabs .nav-link.active {
  background-color: rgba(30, 30, 47, 0.8);
  border-color: rgba(255, 255, 255, 0.1);
  border-bottom-color: transparent;
  color: #ffffff;
}

/* List groups */
.list-group-item {
  background-color: rgba(30, 30, 47, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

.list-group-item:hover {
  background-color: rgba(101, 200, 208, 0.1);
}

.list-group-item.active {
  background-color: #65c8d0;
  border-color: #65c8d0;
  color: #121218;
}

/* Dropdown menus */
.dropdown-menu {
  background-color: #1e1e2f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.dropdown-item {
  color: #e2e8f0;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: rgba(101, 200, 208, 0.15);
  color: #ffffff;
}

.dropdown-divider {
  border-color: rgba(255, 255, 255, 0.1);
}

/* Breadcrumbs */
.breadcrumb {
  background-color: transparent;
}

.breadcrumb-item a {
  color: #65c8d0;
}

.breadcrumb-item.active {
  color: #9ca3af;
}

.breadcrumb-item + .breadcrumb-item::before {
  color: #6b7280;
}

/* Progress bars */
.progress {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Accordion */
.accordion-item {
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.accordion-button {
  background-color: rgba(30, 30, 47, 0.8);
  color: #e2e8f0;
}

.accordion-button:not(.collapsed) {
  background-color: rgba(101, 200, 208, 0.15);
  color: #ffffff;
}

.accordion-button::after {
  filter: invert(1);
}

.accordion-body {
  background-color: rgba(30, 30, 47, 0.6);
  color: #e2e8f0;
}

/* Popovers and tooltips */
.popover {
  background-color: #1e1e2f;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.popover-header {
  background-color: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.popover-body {
  color: #e2e8f0;
}

/* Text muted override */
.text-muted {
  color: #9ca3af !important;
}

/* Badge overrides */
.badge.bg-light {
  background-color: rgba(255, 255, 255, 0.1) !important;
  color: #e2e8f0 !important;
}

.badge.bg-secondary {
  background-color: rgba(156, 163, 175, 0.3) !important;
  color: #e2e8f0 !important;
}

/* Spinner colors */
.spinner-border.text-light {
  color: #65c8d0 !important;
}

/* Border utilities override */
.border {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.border-bottom {
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

.border-top {
  border-top-color: rgba(255, 255, 255, 0.1) !important;
}

/* Scrollbar styling for webkit browsers */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(30, 30, 47, 0.5);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(101, 200, 208, 0.4);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(101, 200, 208, 0.6);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(101, 200, 208, 0.4) rgba(30, 30, 47, 0.5);
}

/* ========================================
   Scenario Action Buttons - Professional Styling
   ======================================== */

/* Container for scenario action buttons */
#widget-3 .btn-group .btn {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

/* Primary action - AnzenOT Generate (main CTA) */
#generateScenarioText {
  background: linear-gradient(135deg, #0176D3 0%, #0B5CAB 100%) !important;
  color: #ffffff !important;
  border-color: #0176D3 !important;
  box-shadow: 0 1px 3px rgba(1, 118, 211, 0.3);
}

#generateScenarioText:hover {
  background: linear-gradient(135deg, #0B5CAB 0%, #032D60 100%) !important;
  box-shadow: 0 2px 6px rgba(1, 118, 211, 0.4);
  transform: translateY(-1px);
}

/* Secondary action - Write Manually */
#btnManualScenario {
  background: transparent !important;
  color: #e2e8f0 !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

#btnManualScenario:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  color: #ffffff !important;
}

/* Tertiary action - Select Incident */
#btnSelectIncident {
  background: transparent !important;
  color: #e2e8f0 !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

#btnSelectIncident:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  color: #ffffff !important;
}

/* Button group spacing */
#widget-3 .btn-group {
  gap: 0.5rem;
}

#widget-3 .btn-group .btn + .btn {
  margin-left: 0.25rem;
}

/* Next Steps Modal - Professional Option Cards */
.next-steps-modal .scenario-option {
  background: rgba(30, 30, 47, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.next-steps-modal .scenario-option:hover {
  border-color: #65c8d0;
  box-shadow: 0 4px 16px rgba(101, 200, 208, 0.15);
  transform: translateY(-2px);
}

.next-steps-modal .scenario-option.ai-generate .option-icon {
  background: linear-gradient(135deg, #0176D3 0%, #0B5CAB 100%) !important;
  color: white;
}

.next-steps-modal .scenario-option.manual-write .option-icon {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.next-steps-modal .scenario-option.incident-select .option-icon {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.next-steps-modal .scenario-option .option-title {
  color: #ffffff;
}

.next-steps-modal .scenario-option .option-desc {
  color: #9ca3af;
}

.next-steps-modal .scenario-option.ai-generate .option-badge {
  background-color: rgba(1, 118, 211, 0.2) !important;
  color: #60a5fa !important;
}

.next-steps-modal .scenario-option.manual-write .option-badge {
  background-color: rgba(255, 255, 255, 0.1) !important;
  color: #9ca3af !important;
}

.next-steps-modal .scenario-option.incident-select .option-badge {
  background-color: rgba(255, 255, 255, 0.1) !important;
  color: #9ca3af !important;
}

/* ========================================
   BIA Radar Chart - Professional Styling
   ======================================== */

#biaChartContainer {
  background: linear-gradient(135deg, rgba(30, 30, 47, 0.6) 0%, rgba(37, 37, 56, 0.6) 100%);
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

#biaChartContainer canvas {
  cursor: default;
}

/* Description panel that appears on click */
#biaDescription {
  display: none;
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, rgba(101, 200, 208, 0.1) 0%, rgba(96, 165, 250, 0.05) 100%);
  border-left: 3px solid #65c8d0;
  border-radius: 0 8px 8px 0;
  color: #e2e8f0;
  font-size: 0.9rem;
  line-height: 1.6;
  animation: slideDown 0.2s ease-out;
}

#biaDescription::before {
  content: '\f05a';
  font-family: 'bootstrap-icons';
  margin-right: 0.5rem;
  color: #65c8d0;
}

/* Card containing the BIA chart */
#widget-5 .card {
  background: linear-gradient(135deg, rgba(37, 37, 56, 0.95) 0%, rgba(30, 30, 47, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

#widget-5 .card-header {
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 600;
}

/* Hint text for interactivity */
.bia-chart-hint {
  text-align: center;
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.bia-chart-hint i {
  color: #65c8d0;
}

/* ========================================
   Saved Assessments Table - ID Badge Styling
   ======================================== */

#headertable .badge.bg-light {
  background-color: #ffffff !important;
  color: #1f2937 !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  padding: 0.4rem 0.65rem !important;
  border: 1px solid #d1d5db !important;
}

#headertable td .text-muted.small {
  color: #374151 !important;
}

/* ========================================
   Scenario Editing - Editable Fields
   ======================================== */

/* Editable fields in scenario edit mode - white background, dark text */
#scenarioViewBody .editable {
  background-color: #ffffff !important;
  color: #1f2937 !important;
  border: 1px solid #d1d5db !important;
  transition: all 0.2s ease;
}

#scenarioViewBody .editable:hover {
  border-color: #9ca3af !important;
}

#scenarioViewBody .editable:focus {
  outline: none;
  border-color: #65c8d0 !important;
  box-shadow: 0 0 0 3px rgba(101, 200, 208, 0.2);
}

/* Title field specific styling */
#scenarioViewBody .editable.h5 {
  font-weight: 600;
  color: #111827 !important;
}

/* Static view fields (before clicking to edit) */
#scenarioStaticRoot .bg-body-tertiary {
  background-color: rgba(255, 255, 255, 0.95) !important;
  color: #374151 !important;
}

/* Placeholder styling for empty fields */
#scenarioViewBody .editable:empty::before {
  content: 'Click to enter text...';
  color: #9ca3af;
  font-style: italic;
}