body {
  margin: 0;
  padding-top: 10px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f2f6f9;
}

.header {
  background-color: #e3f2fd;
  padding: 20px 40px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.logo-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.logo {
  height: 100px;
  object-fit: contain;
}

.tagline {
  font-size: 14px;
  font-weight: 500;
  color: #444;
  margin-top: 4px;
  line-height: 1.2;
}

.title {
  font-size: 50px;
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
  color: #0277bd;
}

.subtitle.no-wrap-subtitle {
  text-align: left;
  font-size: 13px;
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 5px 20px;
  margin: 10px auto;
  width: 100%;
  max-width: 95%;
  display: block;
  box-sizing: border-box;
  font-style: italic;
}

.main-grid {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 30px;
  margin: 0 40px;
}

.left-panel {
  flex: 0 0 600px;
}

.right-panel {
  flex: 1;
  padding-top: 10px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px 20px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
  min-width: 300px;
}

.section {
  background-color: #fafafa;
  border: 5px solid #ddd;
  padding: 5px 25px;
  border-radius: 8px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
}

.section-header h2 {
  font-size: 1.2rem;
  margin: 10px 0 15px;
  color: #0077cc;
}

.upload-grid {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 10px;
  align-items: flex-start;
}

.upload-column input[type="file"],
.language-column select {
  padding: 6px 8px;
  font-size: 14px;
  max-width: 200px;
}

.file-guidance {
  font-size: 13px;
  color: #555;
  font-style: italic;
  margin-top: 0;
  line-height: 1.3;
}

.language-column select {
  padding: 8px;
  font-size: 16px;
  margin-top: 5px;
  width: 100%;
  max-width: 250px;
  margin-bottom: 4px;
}

.checkbox-inline {
  margin-left: 10px;
  font-size: 14px;
  white-space: nowrap;
}

.question-box {
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

#question {
  width: 550px;
  padding: 10px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 5px;
  resize: vertical;
  font-family: inherit;
  background-color: #fff;
}

.question-box label {
  margin-bottom: -10px;
  display: inline-block;
}

.answer-controls {
  margin-top: 10px;
  display: flex;
  justify-content: flex-start;
}

#submit-question {
  background-color: #0077cc;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 14px;
  cursor: pointer;
}

.voice-controls {
  margin-top: 15px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.voice-controls button {
  padding: 8px 16px;
  font-size: 14px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background-color: #0277bd;
  color: white;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.voice-controls button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

.status-text {
  font-size: 14px;
  color: #555;
  font-style: italic;
}

.loader {
  font-style: italic;
  font-size: 14px;
  color: #0077cc;
  margin-bottom: 15px;
}

/* ===== JalBodh header compaction & alignment overrides ===== */
body {
  background: #f3f8fb; /* keeps pages visually consistent with your base layout */
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;       /* smaller padding = less vertical space */
  margin: 0;                   /* removes extra outer space */
  background: #e9f5ff;         /* soft banner */
  border-radius: 6px;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo {
  max-height: 48px;            /* reduce logo height */
  width: auto;
  display: block;
}

.tagline {
  font-size: 0.9rem;
  color: #4d6b87;
  margin: 0;
}

.title {
  margin: 0;                   /* kill default large margins on h1 */
  font-size: 1.8rem;           /* compact headline */
  line-height: 1.2;
  color: #0c4a6e;
}

/* reduce space below banner paragraph */
.subtitle {
  margin: 0.75rem 0 1rem 0;
}

/* optional: cards/sections a tad tighter */
.section {
  padding: 1rem 1.25rem;
}

.section-header h2 {
  margin: 0 0 0.5rem 0;
}

/* keep long hero from expanding due to images */
.header img {
  object-fit: contain;
}

/* --- Header & Branding --- */
.header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #e9f5ff;
  border-radius: 6px;
  padding: 0.75rem 1.25rem;
  margin: 0 0 1rem 0;
}

.branding {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo {
  max-height: 48px;
  width: auto;
}

.title {
  margin: 0;
  font-size: 1.8rem;
  font-weight: bold;
  line-height: 1.2;
  color: #0c4a6e;
}

.tagline {
  margin-top: 0.25rem;
  font-size: 0.95rem;
  font-style: italic;
  color: #4d6b87;
}

/* ===== Export toolbar (shared) ===== */
.export-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 10px 12px;
  gap: 8px;
  background: #f5f7fb;
  border-bottom: 1px solid #e5e7eb;
}
.export-btn {
  border: 1px solid #c7d2e5;
  background: #3b82f6;
  color: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 600;
}
.export-btn:hover { filter: brightness(0.95); }

/* ===== Layout helpers (if not already present) ===== */
.page { padding: 0 16px 24px; }
.top-nav { margin-top: 8px; display: flex; gap: 12px; flex-wrap: wrap; }
.top-nav a { color: #0f4c81; text-decoration: none; border-bottom: 1px dashed transparent; }
.top-nav a:hover { border-color: #0f4c81; }

/* ===== Audit forms ===== */
.form-card {
  background: #fff;
  border: 1px solid #e6edf5;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
  box-shadow: 0 6px 24px rgba(15, 76, 129, 0.06);
}
.form-card h3 { margin: 0 0 10px; }

.grid.two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.grid.three-col {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px;
}
@media (max-width: 920px) {
  .grid.two-col, .grid.three-col { grid-template-columns: 1fr; }
}

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

/* Collapsible lists */
.list-details summary { cursor: pointer; font-weight: 600; margin-bottom: 6px; }
.plain-list { list-style: disc; padding-left: 20px; }

/* ===== Audit results/KPIs ===== */
.results-card {
  background: #fff;
  border: 1px solid #e6edf5;
  border-radius: 10px;
  padding: 12px;
  margin-top: 12px;
  box-shadow: 0 6px 24px rgba(15, 76, 129, 0.06);
}

.kpi-badges {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 12px;
}
.kpi-badges .badge {
  background: #eef6ff;
  border: 1px solid #dbeafe;
  color: #0f4c81;
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 600;
}

/* ===== Charts ===== */
.charts-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-top: 12px;
}
@media (max-width: 920px) {
  .charts-grid { grid-template-columns: 1fr; }
}
.chart-box {
  background: #fff;
  border: 1px solid #e6edf5;
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 6px 24px rgba(15, 76, 129, 0.06);
}

/* ===== Toast (optional) ===== */
.toast {
  position: fixed; right: 16px; bottom: 16px;
  background: #1f6feb; color: #fff;
  padding: 10px 14px; border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,.15);
  z-index: 9999; font-size: .95rem;
}

/* ===== Minor utility ===== */
.sr-only { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ===== Loading spinner ===== */
.spinner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f0f4ff;
  color: #0f4c81;
  border: 1px solid #dbeafe;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
}
.spinner:before {
  content: "";
  width: 14px; height: 14px;
  border: 2px solid #3b82f6;
  border-top-color: transparent;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }

/* ===== Print polish for PDFs (hide toolbars/buttons) ===== */
@media print {
  .export-toolbar { display: none !important; }
  .top-nav { display: none !important; }
  .voice-controls { display: none !important; }
  button { display: none !important; }
}

/* --- TL;DR and anomaly styles --- */
.tldr {
  padding: 10px 12px;
  border-left: 4px solid #2563eb; /* blue */
  background: #eef2ff;
  margin: 8px 0 10px;
  border-radius: 6px;
  font-weight: 500;
  line-height: 1.4;
}

.anomalies { margin: 6px 0 10px; }
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  margin: 2px 6px 2px 0;
  font-size: 12px;
  border: 1px solid transparent;
}
.badge.severe   { background: #fee2e2; border-color: #ef4444; }  /* red-light */
.badge.critical { background: #ffe4e6; border-color: #e11d48; }  /* rose */
.badge.watch    { background: #fffbeb; border-color: #f59e0b; }  /* amber */

.hidden { display: none !important; }

.wm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wm-panel { background: #fff; border-radius: 12px; padding: 12px; box-shadow: 0 1px 6px rgba(0,0,0,.08); }
.wm-header { display:flex; flex-direction:column; gap:8px; }
.wm-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wm-map { height: 520px; border-radius: 10px; overflow: hidden; }
.wm-cov { font-size: .9rem; opacity: .85; }
@media (max-width: 1100px){ .wm-grid { grid-template-columns: 1fr; } }

.map-legend{
  background:#fff; padding:8px 10px; border-radius:8px;
  box-shadow:0 1px 6px rgba(0,0,0,.15); font-size:12px; line-height:1.2;
}
.map-legend b{ display:block; margin-bottom:6px; }
.map-legend .item{ display:flex; align-items:center; gap:6px; margin:3px 0; }
.map-legend .swatch{ width:14px; height:14px; border-radius:3px; border:1px solid #777; }

.hint-box{
  background:#f5f9ff;
  border:1px solid #d8e6ff;
  border-radius:12px;
  padding:12px 14px;
  margin:12px 0 18px;
}
.hint-title{
  font-weight:600;
  margin-bottom:4px;
}
.hint-text{
  margin:0;
  line-height:1.45;
}
.hint-link{
  margin-left:6px;
  text-decoration:underline;
}
.hint-link:hover{
  text-decoration:none;
}

.district-layout {
  display: flex;
  gap: 20px;
}

#map-districts {
  flex: 2;
  height: 600px;
}

.insights-card {
  flex: 1;
  background: #f8f9fb;
  padding: 16px;
  border-radius: 8px;
  overflow-y: auto;
  max-height: 600px;
}

/* =========================================
   WEEK-OVER-WEEK RESERVOIR INTELLIGENCE
========================================= */

.page-container {

    padding: 20px;
}

.page-header {

    margin-bottom: 20px;
}

.page-header h2 {

    margin-bottom: 10px;
    color: #1f3c88;
}

.page-header p {

    color: #555;
    line-height: 1.5;
}

.loading-card,
.error-card {

    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #ddd;
}

.error-card {

    color: #b00020;
    background: #fff5f5;
    border: 1px solid #ffcccc;
}

.comparison-summary-card {

    display: flex;
    gap: 12px;
    flex-wrap: wrap;

    margin-bottom: 25px;
}

.comparison-chip {

    background: #eef4ff;
    border: 1px solid #c7d8ff;

    padding: 10px 16px;

    border-radius: 30px;

    font-size: 14px;
}

.comparison-grid {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 20px;
}

.comparison-panel {

    background: white;

    border-radius: 12px;

    padding: 18px;
    border: 1px solid #ddd;
    overflow-x: auto;
}

.comparison-panel h3 {
    margin-top: 0;
    margin-bottom: 18px;
    color: #1f3c88;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th {
    background: #f5f7fb;
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
}

.comparison-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.comparison-table tr:hover {
    background: #fafcff;
}

@media (max-width: 1100px) {
    .comparison-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   FIX NAV DROPDOWN ABOVE LEAFLET MAP
========================================= */

nav,
.navbar,
.dropdown,
.dropdown-menu {

    position: relative;
    z-index: 9999 !important;
}

.leaflet-container {

    z-index: 1 !important;
}

/* ======================================
   RESERVOIR INTELLIGENCE Q&A
====================================== */

.ri-page {

  padding: 20px;
}

.ri-header {

  display: flex;
  justify-content: space-between;
  align-items: center;

  margin-bottom: 20px;
}

.ri-controls {

  display: flex;
  gap: 10px;
  align-items: center;
}

.ri-layout {

  display: grid;
  grid-template-columns: 360px 1fr;

  gap: 20px;
}

.ri-sidebar {

  background: white;

  border: 1px solid #ddd;

  border-radius: 10px;

  padding: 15px;

  max-height: 80vh;

  overflow-y: auto;
}

.ri-content {

  background: white;

  border: 1px solid #ddd;

  border-radius: 10px;

  padding: 20px;

  min-height: 500px;
}

.ri-category {

  margin-bottom: 25px;
}

.ri-category-title {

  font-weight: bold;

  color: #1f3c88;

  margin-bottom: 10px;

  font-size: 15px;
}

.ri-question-item {

  padding: 10px;

  border-radius: 6px;

  cursor: pointer;

  margin-bottom: 6px;

  transition: 0.2s;

  border: 1px solid transparent;
}

.ri-question-item:hover {

  background: #f5f8ff;

  border-color: #d9e3ff;
}

.ri-answer-card {

  display: flex;
  flex-direction: column;

  gap: 15px;
}

.ri-answer-question {

  font-size: 22px;

  font-weight: bold;

  color: #1f3c88;
}

.ri-answer-bulletin {

  font-size: 14px;

  color: #666;
}

.ri-answer-text {

  font-size: 16px;

  line-height: 1.8;

  white-space: pre-wrap;
}

.ri-placeholder,
.ri-loading,
.ri-error {

  color: #666;

  font-size: 16px;
}

@media (max-width: 1100px) {

  .ri-layout {

    grid-template-columns: 1fr;
  }

  .ri-sidebar {

    max-height: unset;
  }
}

/* ======================================
   RESERVOIR INTELLIGENCE ADMIN
====================================== */

.ri-admin-page {
  padding: 20px;
}

.ri-admin-card {
  background: white;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 20px;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.feature-title {
    min-height: 60px;
}

.footer-links {
    margin-top: 40px;
    margin-bottom: 20px;
    text-align: center;
}



