/* ==========================================================================
   1. HORIZONTAL CENTERING FOR NAVBAR TABS
   ========================================================================== */
.navbar-nav {
  float: none !important;
  margin: 0 auto;
  display: table;
  table-layout: fixed;
}

/* ==========================================================================
   2. HEADER STYLING (TOP BAR & MAIN NAVBAR)
   ========================================================================== */

/* Top green bar */
#top-bar {
  background-color: #6a785f;
  padding: 5px 20px;
  display: flex;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1050;
  height: 60px; /* Set a fixed height */
}
#top-bar img {
  height: 55px;
  margin-right: 15px;
}

/* Main Navbar Container */
.navbar {
  background-color: white !important;
  margin-top: 60px !important;  /* Pushed down by the 60px top bar */
  border-color: #ffffff !important;
  height: 65px !important;      /* Force a consistent height */
  min-height: 65px !important;
}

/* Make navbar container full-width */
.navbar .container-fluid {
  width: 100% !important;
  padding-left: 0;
  padding-right: 0;
}

/* ==========================================================================
   3. NAVBAR CONTENT (THE DEFINITIVE FIX)
   ========================================================================== */

/* --- A) Vertically Center Tab Text --- */
/* This single rule targets the clickable links, sets their height to
   match the navbar, and uses flexbox to perfectly center the text. */
.navbar-nav > li > a {
  font-family: 'Verdana', sans-serif !important;
  font-weight: 700 !important;
  color: #484848 !important;
  font-size: 15px !important;

  height: 65px !important;         /* MUST match the .navbar height */
  display: flex !important;
  align-items: center !important; /* THIS IS THE VERTICAL CENTERING */

  /* Reset all properties that could interfere */
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  line-height: 1.2 !important;     /* Prevents line-height from adding extra space */
}

/* --- B) Set the Tab Hover/Active Colors --- */
.navbar-nav > li > a:hover,
.navbar-nav > li > a:focus,
.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus {
  color: #808080 !important;
  background-color: #ffffff !important;
}

/* --- C) "ABOUT" Dropdown Hover Effect --- */
/* Hide the arrow */
.navbar-nav > li.dropdown > a .caret {
    display: none !important;
}
/* Show menu on hover */
.navbar-nav > li.dropdown:hover > .dropdown-menu {
    display: block;
    margin-top: 0;
}
/* This stops the dropdown links from inheriting the 79px height. */
.dropdown-menu .dropdown-item,
.dropdown-menu > li > a {
  height: auto !important;
  display: block !important;
  line-height: 1.5 !important;
  padding: 8px 20px !important;
}

/* ==========================================================================
   4. MAIN PAGE & MAP LAYOUT
   ========================================================================== */

/* --- Correctly Position the Main Content Area --- */
div.outer {
  position: fixed;
  /* Top Bar (60px) + Navbar (79px) = 139px total header height */
  top: 125px;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  padding: 0;
}

/* Push the leaflet zoom control (+/-) down below the entire header */
.leaflet-top.leaflet-left .leaflet-control-zoom {
  margin-top: 0px !important; /* Header is 139px tall, this adds a small gap */
}

/* Styling for the floating panels on the map */
#controls {
  background-color: white;
  padding: 0 20px 20px 20px;
  cursor: move;
  opacity: 0.65;
  zoom: 0.9;
  transition: opacity 500ms 1s;
}
#controls:hover {
  opacity: 0.95;
  transition-delay: 0;
}

/* Styling for the floating panels on the map */
#controls2 {
  background-color: white;
  padding: 0 20px 20px 20px;
  cursor: move;
  opacity: 0.65;
  zoom: 0.9;
  transition: opacity 500ms 1s;
}
#controls2:hover {
  opacity: 0.95;
  transition-delay: 0;
}

/* Styling for the floating panels on the map */
#map_controls {
  background-color: white !important;
  padding: 0 20px 20px 20px !important;
  cursor: move;
  opacity: 0.65 !important;
  zoom: 0.9 !important;
  transition: opacity 500ms 1s;
}
#map_controls:hover {
  opacity: 0.95 !important;
  transition-delay: 0;
}

/* Styling for the floating panels on the map */
#submitdata_controls {
  background-color: white;
  padding: 0 20px 20px 20px;
  cursor: move;
  opacity: 0.65;
  zoom: 0.9;
  transition: opacity 500ms 1s;
}
#submitdata_controls:hover {
  opacity: 0.95;
  transition-delay: 0;
}

/* Authenticated Admin: Sector screening and shared popup printing. */
.affm-admin-print-control {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #d6dde7;
}

.affm-admin-print-trigger {
  font-weight: 700;
}

.sector-screening-intro {
  color: #334155;
  line-height: 1.35;
}

.sector-screening-control-block {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #dbe3ec;
}

.sector-screening-control-block .form-group {
  margin-bottom: 7px;
}

/* Match the heading gap in all three Sector cards, including unlabelled groups. */
#sector_screening_admin_panel .affm-admin-section-card > h5:first-child {
  margin: 0 0 10px;
}

#sector_screening_sectors .shiny-options-group,
#sector_screening_context .shiny-options-group {
  margin-top: 0;
}

.sector-screening-context-note,
.sector-screening-evidence-note {
  color: #475569;
  font-size: 12px;
}

.sector-screening-popup {
  width: min(690px, 72vw);
  max-width: 690px;
  color: #172033;
  line-height: 1.3;
}

.sector-screening-popup h4 {
  margin: 0 0 8px;
}

.sector-screening-popup h5 {
  margin: 12px 0 5px;
  font-weight: 700;
}

.sector-screening-popup dl {
  display: grid;
  grid-template-columns: minmax(130px, 205px) 1fr;
  column-gap: 9px;
  row-gap: 2px;
  margin: 7px 0;
}

.sector-screening-popup dt {
  font-weight: 700;
}

.sector-screening-popup dd {
  margin: 0 0 2px;
  overflow-wrap: anywhere;
}

.sector-screening-statement {
  margin: 8px 0;
  padding: 7px 9px;
  border-left: 4px solid #94a3b8;
  background: #f8fafc;
  font-weight: 700;
}

.sector-screening-statement.screened {
  border-color: #dc2626;
  background: #fff7f7;
}

.sector-screening-scroll {
  max-height: 240px;
  overflow: auto;
  border: 1px solid #d7dee8;
}

.sector-screening-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.sector-screening-table th,
.sector-screening-table td {
  padding: 4px 5px;
  border: 1px solid #d7dee8;
  vertical-align: top;
  text-align: left;
}

.sector-screening-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef3f8;
}

.sector-screening-table .sector-screening-selection-link {
  padding: 0;
  font: inherit;
  white-space: normal;
  text-align: left;
  vertical-align: baseline;
}

.sector-screening-selected-row {
  background: #fff6a8;
}

.sector-wind-turbine-details {
  margin: 6px 0;
}

.sector-wind-turbine-details > summary {
  cursor: pointer;
  color: #24476b;
}

.sector-wind-turbine-details > ul {
  margin: 6px 0;
  padding-left: 18px;
}

@media print {
  .sector-wind-turbine-details > summary { display: none; }
  .sector-wind-turbine-details > :not(summary) { display: block; }
}

.sector-screening-unavailable {
  padding: 7px 9px;
  border-left: 4px solid #64748b;
  background: #f8fafc;
}

.sector-screening-count-plot {
  margin: 8px 0;
  background: #fff;
}

.sector-screening-count-plot svg {
  display: block;
  width: 100%;
  height: auto;
}

.sector-screening-plot-title {
  font-size: 12px;
  font-weight: 700;
  color: #111;
  line-height: 1.25;
  margin-bottom: 2px;
}

.sector-screening-plot-key {
  font-size: 10.5px;
  color: #555;
  line-height: 1.25;
  margin-top: 2px;
}

.sector-screening-legend {
  /* The outer Leaflet control supplies the shared admin panel styling. */
  width: 100%;
}

.sector-screening-legend > div {
  margin-top: 4px;
}

.sector-legend-halo,
.sector-legend-neutral,
.sector-legend-camp,
.sector-legend-rez,
.sector-legend-nasf,
.sector-legend-size {
  display: inline-block;
  vertical-align: middle;
  margin-right: 5px;
}

.sector-legend-halo {
  width: 13px;
  height: 13px;
  border: 1.6px solid #dc2626;
  border-radius: 50%;
  background: #f8fafc;
}

.sector-legend-neutral {
  width: 13px;
  height: 13px;
  border: 1px solid #64748b;
  border-radius: 50%;
  background: #f8fafc;
}

.sector-legend-camp {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: #64748b;
}

.sector-legend-icon {
  display: inline-block;
  width: 18px;
  font-weight: 700;
  text-align: center;
  vertical-align: middle;
}

.sector-legend-icon svg {
  display: block;
}

.sector-legend-note {
  color: #64748b;
  font-size: 10px;
  margin: 2px 0 4px 23px;
}

.sector-facility-marker {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.sector-facility-marker:focus-visible {
  outline: 2px solid #334155;
  outline-offset: 2px;
}

.sector-legend-gradient {
  width: 170px;
  height: 12px;
  border: 1px solid #94a3b8;
  background: linear-gradient(90deg, rgba(219, 234, 254, 0.18), rgba(56, 189, 248, 0.52), rgba(37, 99, 235, 0.78), rgba(49, 46, 129, 0.95));
}

.sector-legend-texture {
  display: inline-block;
  width: 28px;
  height: 13px;
  margin-right: 5px;
  border: 1px solid #94a3b8;
  vertical-align: middle;
  background-color: #4b74b8;
}

.sector-legend-texture.moderate {
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.75) 0, rgba(255,255,255,.75) 1px, transparent 1px, transparent 6px);
}

.sector-legend-texture.high {
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.82) 0, rgba(255,255,255,.82) 2px, transparent 2px, transparent 7px), repeating-linear-gradient(45deg, rgba(255,255,255,.75) 0, rgba(255,255,255,.75) 2px, transparent 2px, transparent 7px);
}

.sector-legend-rez {
  width: 26px;
  height: 11px;
  border: 2px dashed #7c3aed;
  background: rgba(124, 58, 237, 0.08);
}

.sector-legend-nasf {
  width: 22px;
  height: 0;
  border-top: 2px solid;
}

.sector-legend-nasf.nasf-3 { border-color: #7c3aed; }
.sector-legend-nasf.nasf-8 { border-color: #2563eb; }
.sector-legend-nasf.nasf-13 { border-color: #0891b2; }

.sector-legend-size {
  border: 0;
  border-radius: 50%;
  background: #64748b;
}

.sector-legend-size.small { width: 7px; height: 7px; }
.sector-legend-size.medium { width: 12px; height: 12px; }
.sector-legend-size.large { width: 18px; height: 18px; }

.sector-screened-marker {
  filter: drop-shadow(0 0 3px #dc2626) drop-shadow(0 0 1px #ffffff);
}

.sector-selected-facility {
  filter: drop-shadow(0 0 5px #dc2626) drop-shadow(0 0 2px #ffffff);
}

@media (max-width: 720px) {
  .sector-screening-popup {
    width: 82vw;
  }

  .sector-screening-popup dl {
    grid-template-columns: 1fr;
  }

  .sector-screening-popup dd {
    margin-bottom: 5px;
  }
}

/* Restricted Admin owns layout space; public layout is unchanged when closed. */
#affm_map_surface {
  position: relative;
  height: 100%;
  width: 100%;
}
#affm_map_workspace.affm-admin-open {
  display: grid;
  grid-template-columns: min(var(--affm-admin-width, 440px), 66.666667%) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}
.affm-admin-open > #candidate_roost_admin_ui {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  height: 100%;
}
.affm-admin-open > #affm_map_surface {
  container: admin-map / inline-size;
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  position: relative;
}
.affm-admin-open > #candidate_roost_admin_link_ui,
.affm-admin-open > .shiny-panel-conditional { position: absolute; }
.affm-admin-workspace {
  position: relative;
  height: 100%;
  background: #fff;
  color: #222;
  border-right: 2px solid #566b61;
  border-radius: 0;
  box-sizing: border-box;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.4;
}
.affm-admin-desktop {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.affm-admin-narrow { display: none; }
.affm-admin-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  margin: 12px 14px 0;
  padding: 12px;
  color: #344b3a;
  background: #f1f6f0;
  border: 1px solid #ccdacc;
  border-radius: 4px;
  font-family: Arial, sans-serif;
}
.affm-admin-loading[hidden] { display: none; }
.affm-admin-loading-spinner {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  box-sizing: border-box;
  border: 2px solid #ccdacc;
  border-top-color: #426747;
  border-radius: 50%;
  animation: affm-admin-loading-spin 0.8s linear infinite;
}
@keyframes affm-admin-loading-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .affm-admin-loading-spinner { animation: none; }
}
#affm_admin_controls {
  flex: 0 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
.affm-admin-has-selection #affm_admin_controls { max-height: 38%; flex-shrink: 0; }
.affm-admin-controls-panel { padding: 12px 14px; }
#affm_admin_controls .affm-admin-controls-panel,
#affm_admin_controls h4, #affm_admin_controls h5,
#affm_admin_controls label, #affm_admin_controls summary,
#affm_admin_controls button, #affm_admin_controls input,
#affm_admin_controls select, #affm_admin_controls .selectize-input {
  font-family: Arial, sans-serif !important;
}
#candidate_roost_admin_panel {
  --section-accent: #426747;
  --section-border: #ccdacc;
  --section-background: #f1f6f0;
}
#ni_admin_panel {
  --section-accent: #a65a20;
  --section-border: #ead4bf;
  --section-background: #fff5eb;
}
#sector_screening_admin_panel {
  --section-accent: #72538b;
  --section-border: #ddd0e7;
  --section-background: #f6f1fa;
}
#affm_admin_controls .affm-admin-section-card {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--section-border);
  border-left: 4px solid var(--section-accent);
  background: var(--section-background);
  line-height: 1.5;
}
#affm_admin_controls .affm-admin-section-card > h5:first-child { margin-top: 0; }
#affm_admin_controls .affm-admin-section-card > :last-child { margin-bottom: 0; }
#affm_admin_controls .affm-admin-section-card > summary {
  padding: 0;
  color: var(--section-accent);
  font-size: 14px;
}
#affm_admin_controls .affm-admin-section-card[open] > summary { margin-bottom: 12px; }
#affm_admin_controls .affm-admin-section-card .form-group { margin-bottom: 14px; }
#affm_admin_controls .affm-admin-section-card h5 { font-weight: 600; }
.affm-admin-workspace h4 { font-size: 17px; margin: 0 0 10px; }
.affm-admin-workspace h5 { font-size: 14px; margin: 12px 0 6px; }
.affm-admin-workspace .btn { font-size: 12px; padding: 5px 8px; margin: 0 3px 5px 0; white-space: normal; }
.affm-admin-workspace .form-group { margin-bottom: 9px; }
.affm-admin-workspace .shiny-input-container { width: 100%; }
.affm-admin-workspace .checkbox, .affm-admin-workspace .radio { margin: 5px 0; }
.affm-admin-workspace .row { margin-right: -6px; margin-left: -6px; }
.affm-admin-workspace .row > [class*="col-"] { padding-right: 6px; padding-left: 6px; }
.affm-admin-workspace hr { margin: 12px 0; }
.affm-admin-control-options { margin-top: 5px; }
.affm-admin-workspace summary { cursor: pointer; font-weight: 600; padding: 7px 0; color: #274d3d; }
.affm-admin-workspace summary:focus-visible, .affm-admin-workspace a:focus-visible {
  outline: 2px solid #274d3d; outline-offset: 2px;
}
.affm-admin-detail-region {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
.affm-admin-selected-detail { padding: 12px 14px 22px; border-top: 1px solid #b9c3be; overflow-wrap: anywhere; }
.affm-admin-selection-toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -12px -14px 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #b9c3be;
  background: #fff;
  font-size: 12px;
  color: #526459;
}
.affm-admin-workspace .affm-admin-clear-selection {
  margin: 0;
  padding: 6px 10px;
  border: 1px solid #526459;
  background: #f1f5f2;
  color: #274d3d;
  font-weight: 600;
  flex-shrink: 0;
}
.affm-admin-workspace .affm-admin-clear-selection:hover { background: #e2ebe4; }
.affm-admin-workspace .affm-admin-clear-selection:focus-visible {
  outline: 2px solid #274d3d;
  outline-offset: 2px;
}
.affm-admin-selection-hint { margin: 0; padding: 12px 14px; color: #56635b; border-top: 1px solid #d8dfdb; }
.sector-selected-camp-label { border: 2px solid #8b1e6d; background: #fff; color: #4e143e; font-weight: 600; }
.affm-admin-workspace .ni-admin-popup,
.affm-admin-workspace .sector-screening-popup {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.affm-admin-workspace .ni-admin-popup-plot { min-height: 0; }
.affm-admin-workspace .sector-screening-popup dl { grid-template-columns: minmax(110px, 40%) minmax(0, 1fr); }
.affm-admin-workspace .sector-screening-popup dd { min-width: 0; overflow-wrap: anywhere; }
.affm-admin-workspace .sector-screening-table { min-width: 720px; overflow-wrap: normal; font-size: 12px; }
/* Existing candidate HTML has a popup-width inline root; only its panel boundary changes. */
.affm-admin-selected-detail > div[style*="min-width"] { min-width: 0 !important; max-width: 100% !important; width: 100% !important; }
.affm-admin-summary-table { overflow-x: auto; }
.affm-admin-summary-table table { width: 100%; font-size: 12px; }
#ni_admin_panel h5:has(+ #ni_admin_layers) { margin-bottom: 16px; }
#ni_admin_panel .ni-summary-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: #754019;
  font: inherit;
  text-align: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
#ni_admin_panel .ni-summary-link:hover { color: #3f230e; }
#ni_admin_panel .ni-summary-link:focus-visible { outline: 2px solid #a65a20; outline-offset: 2px; }
#ni_admin_panel .ni-summary-table { margin-bottom: 14px; }
#ni_admin_panel .ni-summary-headline { background: #f5e1cc; font-weight: 700; }
#ni_admin_panel .ni-summary-depth-1 td:first-child { padding-left: 20px; }
#ni_admin_panel .ni-summary-depth-2 td:first-child { padding-left: 38px; font-size: 0.95em; }
#ni_admin_panel .ni-summary-reconciliation { font-size: 12px; color: #5f5043; margin: 8px 0 16px; }
#ni_admin_panel .ni-admin-review-summary { position: relative; }
#affm_admin_controls .ni-admin-review-summary > summary {
  padding-right: 120px;
  min-height: 30px;
  line-height: 30px;
}
#ni_admin_reset_selection {
  position: absolute;
  top: 14px;
  right: 14px;
  margin: 0;
}
#map .ni-admin-map-legend,
#map .sector-admin-map-legend {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px 14px;
  max-width: 290px;
  font: 12px/1.5 Arial, sans-serif;
  color: #333;
  opacity: 0.65;
  transition: opacity 500ms 1s;
  margin-right: 18px;
  margin-bottom: 10px;
}
#map .sector-admin-map-legend {
  box-sizing: border-box;
  width: 290px;
  max-width: calc(100cqw - 36px);
}
/* Clear the bottom toolbar once per stack, not once per legend. */
#map .leaflet-bottom.leaflet-left .sector-admin-map-legend:not(:has(~ .sector-admin-map-legend)) {
  margin-bottom: 80px;
}
/* Raise the legend only when the bottom toolbar occupies the same horizontal space. */
@container admin-map (max-width: 928px) {
  #map .ni-admin-map-legend { margin-bottom: 80px; }
  #map .leaflet-bottom.leaflet-right .sector-admin-map-legend:not(:has(~ .sector-admin-map-legend)) { margin-bottom: 80px; }
}
#map .ni-admin-map-legend:hover,
#map .sector-admin-map-legend:hover { opacity: 0.95; transition-delay: 0s; }
#map .ni-admin-map-legend strong,
#map .sector-admin-map-legend strong { display: block; margin-bottom: 6px; }
/* Keep the existing multi-select, with an obvious persistent dropdown affordance. */
.sector-species-dropdown .selectize-input {
  padding-right: 32px;
  cursor: pointer;
}
.sector-species-dropdown .selectize-input::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 14px;
  border: 5px solid transparent;
  border-top-color: #555;
  pointer-events: none;
}
.sector-species-dropdown .selectize-input.dropdown-active::after {
  top: 9px;
  border-top-color: transparent;
  border-bottom-color: #555;
}
#ni_admin_panel .ni-admin-about { margin: 20px 0 8px; font-size: 12px; color: #5f5043; }
#affm_admin_home_panel > h4 { margin-bottom: 16px; }
#affm_admin_home_panel .affm-admin-chapter-card {
  --card-accent: #426747;
  --card-border: #ccdacc;
  --card-background: #f1f6f0;
  --card-hover: #e8f0e7;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  column-gap: 12px;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid var(--card-border);
  border-left: 4px solid var(--card-accent);
  background: var(--card-background);
}
#affm_admin_home_panel .affm-admin-card-ni {
  --card-accent: #a65a20;
  --card-border: #ead4bf;
  --card-background: #fff5eb;
  --card-hover: #fbead9;
}
#affm_admin_home_panel .affm-admin-card-sector {
  --card-accent: #72538b;
  --card-border: #ddd0e7;
  --card-background: #f6f1fa;
  --card-hover: #eee5f5;
}
#affm_admin_home_panel .affm-admin-chapter-card:hover {
  background: var(--card-hover);
  border-color: var(--card-accent);
}
#affm_admin_home_panel .affm-admin-card-heading {
  grid-column: 2;
  margin: 0 0 5px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  color: #293d30;
}
#affm_admin_home_panel .affm-admin-card-icon {
  width: 34px;
  height: 34px;
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: start;
}
#affm_admin_home_panel .affm-admin-chapter-card p {
  grid-column: 2;
  margin: 0 0 14px;
  line-height: 1.5;
  color: #465047;
}
#affm_admin_home_panel .affm-admin-sector-icons {
  grid-column: 1;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-self: start;
}
#affm_admin_home_panel .affm-admin-sector-icons img {
  width: 34px;
  height: 34px;
}
#sector_screening_admin_panel .affm-admin-sector-choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
#sector_screening_admin_panel .affm-admin-sector-choice img {
  width: 24px;
  height: 24px;
}
.sector-source-link { text-decoration: underline; text-underline-offset: 2px; }
.sector-facility-activity-controls {
  border: 1px solid #d5dfeb;
  border-left: 3px solid #24476b;
  border-radius: 3px;
  background: #f5f8fb;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.sector-facility-activity-controls .form-group { margin-bottom: 8px; }
.sector-facility-activity-controls p { margin-bottom: 0; }
#affm_admin_home_panel .affm-admin-chapter-card .btn {
  grid-column: 2;
  justify-self: start;
  white-space: normal;
  margin: 0;
  padding: 7px 10px;
  border: 1px solid var(--card-accent);
  border-radius: 0;
  background: #fff;
  color: var(--card-accent);
  font-weight: 600;
  text-align: left;
  max-width: 100%;
}
#affm_admin_home_panel .affm-admin-chapter-card .btn:hover {
  background: var(--card-accent);
  color: #fff;
}
#affm_admin_home_panel .affm-admin-chapter-card .btn:focus-visible {
  outline: 2px solid var(--card-accent);
  outline-offset: 3px;
}
.affm-admin-logout-row { margin-top: 8px; }
.affm-admin-active #candidateRoostAdminMapControl,
.affm-admin-active #colonyPanelContainer { display: none !important; }
.affm-admin-active #controls2 {
  zoom: 1;
  left: calc(min(var(--affm-admin-width, 440px), 66.666667vw) + 10px) !important;
  width: calc(100vw - min(var(--affm-admin-width, 440px), 66.666667vw) - 20px) !important;
}
#affm_admin_splitter {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 8px;
  z-index: 5;
  cursor: col-resize;
  touch-action: none;
}
#affm_admin_splitter:hover, #affm_admin_splitter:focus-visible {
  background: #6a785f55;
  outline: 2px solid #274d3d;
  outline-offset: -2px;
}
.affm-admin-resizing { cursor: col-resize; user-select: none; }
/* Below 1024px, only the attempted Admin workspace becomes a notice.
   The public map and public navigation are neither hidden nor replaced. */
@media (max-width: 1023.98px) {
  #affm_map_workspace.affm-admin-open { display: block; }
  .affm-admin-open > #candidate_roost_admin_ui {
    position: absolute;
    /* Leave room for the existing two-row public navigation at tablet widths. */
    top: 72px;
    left: 12px;
    right: 12px;
    height: auto;
    z-index: 1050;
  }
  .affm-admin-workspace { height: auto; border: 1px solid #566b61; }
  .affm-admin-desktop { display: none; }
  #affm_admin_splitter { display: none; }
  .affm-admin-narrow { display: block; padding: 16px; }
}

.ni-admin-popup {
  width: 680px;
  max-width: 72vw;
  box-sizing: border-box;
  overflow-x: hidden;
}

.ni-admin-survey-history-caution {
  margin: 8px 0;
  font-size: 12px;
  line-height: 1.4;
}
.ni-admin-survey-history-label { color: #b42318; }
.ni-admin-popup-plot {
  position: relative;
  width: 100%;
  min-height: 255px;
  margin-bottom: 8px;
}

.ni-admin-popup-plot-title {
  font-size: 12px;
  font-weight: 700;
  color: #111;
  line-height: 1.25;
  margin-bottom: 2px;
}

.ni-admin-popup-plot-subtitle {
  font-size: 10.5px;
  color: #555;
  line-height: 1.25;
  margin-bottom: 6px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.ni-admin-popup-plot-subtitle-line {
  margin: 0;
}

.ni-admin-popup-svg {
  width: 100%;
  height: auto;
  display: block;
}

.ni-admin-popup-summary {
  font-size: 12px;
  line-height: 1.35;
}

.ni-admin-popup-download {
  margin-top: 6px;
}


/* ==========================================================================
   5. FORM & OTHER COMPONENT STYLES
   ========================================================================== */

/* Form/input spacing */
#data_entry_form .form-group { margin-bottom: 8px; }
#data_entry_form label { margin-bottom: 3px; }
#new_camp_lat, #new_camp_long {
  font-family: inherit;
  font-size: 14px;
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #eee;
  white-space: pre-wrap;
}

/* Table formatting */
#uploaded_table th:nth-child(7),
#uploaded_table td:nth-child(7) { min-width: 40px; white-space: nowrap; }

/* Split layout visibility */
.shiny-split-layout { overflow: visible; }

/* Miscellaneous leaflet and shiny styles */
.leaflet-container { background-color: white !important; }
.progress-bar { color: transparent; }


.page-content {
  margin-top: 0px;
  padding-top: 0px;
}
