body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(180deg, #f5f8fc 0%, #ffffff 35%, #eef3f8 100%);
}

/* ── Landing Page ── */
.lp-hero {
  padding: 4rem 0 3.5rem;
  background:
    radial-gradient(ellipse at 80% 20%, rgba(59,130,246,.12), transparent 55%),
    radial-gradient(ellipse at 20% 80%, rgba(16,185,129,.10), transparent 50%);
}
.lp-hero-text { position: relative; z-index: 1; }
.lp-badge {
  background: linear-gradient(135deg,#10b981,#059669);
  color: #fff;
  font-size: .82rem;
  padding: .35rem .9rem;
  letter-spacing: .02em;
}
.lp-hero-title {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  color: #0f172a;
}
.lp-hero-lead {
  font-size: 1.08rem;
  color: #475569;
  max-width: 520px;
  line-height: 1.65;
}
.lp-hero-logo {
  height: 3rem;
  width: auto;
  object-fit: contain;
  display: block;
}
.lp-hero-visual { max-width: 380px; margin: 0 auto; }
.lp-hero-svg { width: 100%; height: auto; }

.lp-btn-primary {
  background: linear-gradient(135deg,#2563eb,#4f46e5);
  border: 0; color: #fff;
  border-radius: .6rem;
  padding: .6rem 1.6rem;
  font-weight: 600;
}
.lp-btn-primary:hover { background: linear-gradient(135deg,#1d4ed8,#4338ca); color: #fff; }
.lp-btn-outline {
  border: 1.5px solid #2563eb;
  color: #2563eb;
  border-radius: .6rem;
  padding: .6rem 1.6rem;
  font-weight: 600;
  background: transparent;
}
.lp-btn-outline:hover { background: #2563eb; color: #fff; }
.lp-btn-outline-light {
  border: 1.5px solid rgba(255,255,255,.6);
  color: #fff;
  border-radius: .6rem;
  padding: .6rem 1.6rem;
  font-weight: 600;
  background: transparent;
}
.lp-btn-outline-light:hover { background: rgba(255,255,255,.15); color: #fff; }

/* Sections */
.lp-section { padding: 4rem 0; }
.lp-section-alt { background: #f8fafc; }
.lp-section-title {
  font-size: 1.75rem; font-weight: 700; color: #0f172a;
}
.lp-section-sub {
  font-size: 1.05rem; color: #64748b; max-width: 600px; line-height: 1.6;
}

/* Stat cards */
.lp-stat-card {
  text-align: center;
  padding: 1.8rem 1.2rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  transition: box-shadow .2s, transform .2s;
}
.lp-stat-card:hover {
  box-shadow: 0 8px 24px rgba(15,23,42,.08);
  transform: translateY(-2px);
}
.lp-stat-icon {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 3.2rem; height: 3.2rem;
  border-radius: .75rem;
  background: #eff6ff; color: #2563eb;
  margin-bottom: .8rem;
}
.lp-stat-icon.lp-icon-amber  { background: #fffbeb; color: #d97706; }
.lp-stat-icon.lp-icon-emerald { background: #ecfdf5; color: #059669; }
.lp-stat-icon.lp-icon-rose   { background: #fff1f2; color: #e11d48; }
.lp-stat-label { font-weight: 700; font-size: .95rem; color: #0f172a; margin-bottom: .3rem; }
.lp-stat-desc  { font-size: .84rem; color: #64748b; line-height: 1.5; margin: 0; }

/* Module cards */
.lp-module-card {
  position: relative;
  padding: 1.6rem 1.4rem 1.3rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  height: 100%;
  transition: box-shadow .2s, transform .2s;
}
.lp-module-card:hover {
  box-shadow: 0 8px 24px rgba(15,23,42,.08);
  transform: translateY(-2px);
}
.lp-module-card-muted { background: #f8fafc; }
.lp-module-num {
  font-size: 2rem; font-weight: 800; color: #e2e8f0; line-height: 1;
  margin-bottom: .5rem;
}
.lp-module-card:hover .lp-module-num { color: #cbd5e1; }
.lp-module-title { font-size: 1.05rem; font-weight: 700; color: #0f172a; margin-bottom: .4rem; }
.lp-module-desc  { font-size: .86rem; color: #64748b; line-height: 1.55; margin-bottom: .8rem; }
.lp-module-tag {
  display: inline-block;
  font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  padding: .2rem .55rem; border-radius: 4px;
  background: #f1f5f9; color: #475569;
}
.lp-tag-blue    { background: #eff6ff; color: #2563eb; }
.lp-tag-amber   { background: #fffbeb; color: #d97706; }
.lp-tag-emerald { background: #ecfdf5; color: #059669; }
.lp-tag-violet  { background: #f5f3ff; color: #7c3aed; }
.lp-tag-slate   { background: #f1f5f9; color: #64748b; }

/* Steps */
.lp-steps {
  display: flex; align-items: flex-start; justify-content: center;
  gap: 0; flex-wrap: wrap;
}
.lp-step {
  flex: 1 1 180px; max-width: 220px;
  text-align: center; padding: 0 .6rem;
}
.lp-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: linear-gradient(135deg,#2563eb,#4f46e5);
  color: #fff; font-weight: 700; font-size: 1.1rem;
  margin-bottom: .7rem;
}
.lp-step-title { font-size: .95rem; font-weight: 700; color: #0f172a; margin-bottom: .3rem; }
.lp-step-desc  { font-size: .82rem; color: #64748b; line-height: 1.5; }
.lp-step-arrow {
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: #cbd5e1; padding-top: .4rem;
  flex: 0 0 auto; width: 2rem;
}
@media (max-width: 767px) {
  .lp-step-arrow { transform: rotate(90deg); width: 100%; }
  .lp-step { max-width: 100%; }
}

/* SDG badge */
.lp-sdg-badge {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .5rem 1rem; border-radius: .6rem;
  background: #fffbeb; border: 1px solid #fde68a;
  color: #b45309; font-weight: 700; font-size: 1rem;
}

/* Impact cards */
.lp-impact-card {
  padding: 1.2rem;
  border-radius: .75rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  height: 100%;
}
.lp-impact-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.4rem; height: 2.4rem; border-radius: .5rem;
  background: #eff6ff; color: #2563eb; margin-bottom: .6rem;
}
.lp-impact-icon.lp-icon-emerald { background: #ecfdf5; color: #059669; }
.lp-impact-icon.lp-icon-amber   { background: #fffbeb; color: #d97706; }
.lp-impact-icon.lp-icon-rose    { background: #fff1f2; color: #e11d48; }
.lp-impact-title { font-size: .9rem; font-weight: 700; color: #0f172a; margin-bottom: .25rem; }
.lp-impact-desc  { font-size: .8rem; color: #64748b; line-height: 1.5; margin: 0; }

/* Partners */
.lp-partner-logo {
  height: 3.5rem;
  width: auto;
  object-fit: contain;
}
.lp-partner-chip {
  display: inline-flex; align-items: center;
  padding: .45rem 1rem; border-radius: 999px;
  border: 1px solid #e2e8f0; background: #fff;
  font-size: .88rem; font-weight: 600; color: #334155;
}

/* CTA */
.lp-cta {
  padding: 3.5rem 0;
  background: linear-gradient(135deg,#1e3a5f,#2563eb 55%,#4f46e5);
  color: #fff;
}
.lp-cta-title { font-size: 1.6rem; font-weight: 700; }
.lp-cta-sub   { font-size: 1.05rem; color: rgba(255,255,255,.78); }

/* Legacy compat (keep old class for non-landing pages) */
.hero-section {
  background: radial-gradient(circle at top right, rgba(25, 135, 84, 0.16), transparent 45%);
}

.app-navbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.94), rgba(37, 99, 235, 0.94) 52%, rgba(124, 58, 237, 0.92)),
    #2563eb;
  box-shadow: 0 0.8rem 1.8rem rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(10px);
}

.app-navbar .navbar-brand,
.app-navbar .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
}

.app-navbar .navbar-brand {
  letter-spacing: 0;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link:focus,
.app-navbar .nav-link.show {
  color: #ffffff !important;
}

.app-navbar .dropdown-menu {
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 0.75rem;
  box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.2);
}

.app-navbar .dropdown-item {
  border-radius: 0.5rem;
}

.app-navbar .dropdown-item:hover,
.app-navbar .dropdown-item:focus {
  background: #e0f2fe;
  color: #075985;
}

.app-navbar .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.5);
}

.app-navbar .navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.28);
}

.btn-sci-primary {
  background: linear-gradient(135deg, #198754, #157347);
  border-color: #157347;
  color: #fff;
}

.btn-sci-primary:hover,
.btn-sci-primary:focus {
  background: linear-gradient(135deg, #157347, #146c43);
  border-color: #146c43;
  color: #fff;
}

.btn-sci-outline {
  border-color: #198754;
  color: #198754;
  background: #fff;
}

.btn-sci-outline:hover,
.btn-sci-outline:focus {
  background: #198754;
  border-color: #198754;
  color: #fff;
}

.logged-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 260px;
  padding: 0.2rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 0.85rem;
}

.logged-chip strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu {
  min-width: 280px;
  border: 1px solid #dbe4ef;
  border-radius: 0.75rem;
  padding: 0.35rem;
  box-shadow: 0 0.9rem 2rem rgba(15, 23, 42, 0.14);
}

.user-menu-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.6rem 0.45rem;
}

.user-menu-avatar {
  display: inline-flex;
  width: 2.25rem;
  height: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #0d6efd;
  color: #ffffff;
  font-weight: 800;
}

.user-menu-name {
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.15;
}

.user-menu-role {
  color: #64748b;
  font-size: 0.74rem;
}

.user-menu-item {
  border-radius: 0.5rem;
  font-size: 0.86rem;
  padding: 0.45rem 0.6rem;
}

.user-menu .dropdown-divider {
  margin: 0.3rem 0;
}

.navbar-logo {
  height: 2rem;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.brand-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: #facc15;
  box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.24);
}

.hero-image-wrap {
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid #dfe7ef;
}

.hero-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
}

.feature-card {
  border-top: 4px solid #198754;
}

.info-image-card {
  position: relative;
  border-radius: 0.9rem;
  overflow: hidden;
  border: 1px solid #d6e0ea;
  min-height: 240px;
}

.info-image {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.info-overlay {
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: 0.8rem;
  color: #fff;
  font-weight: 600;
  background: rgba(7, 26, 46, 0.62);
  border-radius: 0.55rem;
  padding: 0.45rem 0.7rem;
}

.app-footer {
  border-top: 1px solid #dfe7ef;
  background: #fff;
  padding: 0.9rem 0;
  margin-top: 1.2rem;
}

.app-footer-color {
  border-top: 0;
  background:
    linear-gradient(135deg, #0f766e, #2563eb 56%, #7c3aed),
    #2563eb;
  color: #ffffff;
  box-shadow: 0 -0.8rem 1.8rem rgba(15, 23, 42, 0.1);
}

.app-footer-color .text-secondary {
  color: rgba(255, 255, 255, 0.86) !important;
}

#map {
  width: 100%;
  height: 580px;
  border-radius: 0.6rem;
}

input[type="file"] {
  width: 100%;
}

.availability-block {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 0.5rem;
  padding: 0.7rem;
}

.availability-list {
  max-height: 140px;
  overflow-y: auto;
  padding-left: 1rem;
}

.upload-overlay {
  position: fixed;
  inset: 0;
  z-index: 1060;
  background: rgba(15, 23, 42, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.upload-overlay-card {
  width: 100%;
  max-width: 460px;
  background: #ffffff;
  border-radius: 0.75rem;
  padding: 1.2rem;
  text-align: center;
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.16);
}

.data-management-page .container-fluid {
  max-width: 1680px;
}

.data-management-card,
.data-management-page .data-stat-box,
.data-management-page .data-upload-panel,
.data-management-page .data-guide-panel {
  border: 1px solid #dbe4ef;
  border-radius: 0.7rem;
  background: #ffffff;
}

.data-management-card {
  border-top: 4px solid #0d6efd;
}

.data-management-card .card-body {
  padding: 0.85rem;
}

.data-stat-box {
  min-height: 70px;
  padding: 0.55rem 0.65rem;
  background: #f8fbff !important;
}

.data-stat-warning {
  border-color: #f5c2c7 !important;
  background: #fff7f8 !important;
}

.data-stat-label {
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.data-stat-value {
  margin-top: 0.18rem;
  color: #0f172a;
  font-size: 1.15rem;
  font-weight: 800;
}

.data-management-tabs {
  display: flex;
  gap: 0.35rem;
  border: 1px solid #dbeafe;
  border-radius: 0.75rem;
  background: #f8fbff;
  padding: 0.3rem;
}

.data-management-tabs .nav-link {
  border-radius: 0.55rem;
  color: #1e3a8a;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.38rem 0.7rem;
}

.data-management-tabs .nav-link.active {
  background: #0d6efd;
  color: #ffffff;
  box-shadow: 0 0.35rem 0.9rem rgba(13, 110, 253, 0.18);
}

.data-management-page h2.h5 {
  font-size: 1rem;
}

.data-management-page h3.h6 {
  font-size: 0.92rem;
}

.data-management-page .small,
.data-management-page .text-secondary {
  font-size: 0.78rem;
}

.data-upload-panel,
.data-guide-panel {
  padding: 0.85rem;
}

.data-upload-panel label {
  margin-bottom: 0.2rem;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 700;
}

.data-upload-panel .form-control,
.data-upload-panel .form-select,
.data-management-page .form-control,
.data-management-page .form-select,
.data-management-page .btn {
  font-size: 0.84rem;
}

.data-guide-panel {
  background: #f8fbff;
}

.data-guide-panel ul {
  padding-left: 1rem;
}

.management-filter-toolbar {
  border: 1px solid #dbe4ef;
  border-radius: 0.65rem;
  background: #f8fbff;
  padding: 0.65rem;
}

.management-table-wrap {
  max-height: calc(100vh - 21rem);
  min-height: 320px;
  overflow: auto;
  scrollbar-width: thin;
}

.management-table {
  min-width: 1320px;
}

.management-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #eef4ff;
}

.management-table .history-name {
  max-width: 210px;
}

.management-table .history-result {
  max-width: 230px;
}

.management-table .publish-state {
  display: inline-flex;
  width: 5.1rem;
  justify-content: center;
}

.management-table .publish-toggle-btn {
  width: 4.75rem;
}

.management-table .layer-detail-row td {
  background: #f8fbff;
  white-space: normal;
}

.layer-detail-panel {
  border: 1px solid #dbe4ef;
  border-radius: 0.65rem;
  background: #ffffff;
  padding: 0.8rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.layer-detail-title {
  color: #0f172a;
  font-weight: 800;
}

.layer-detail-item,
.layer-detail-path {
  border: 1px solid #e2e8f0;
  border-radius: 0.55rem;
  background: #ffffff;
  padding: 0.55rem 0.65rem;
}

.layer-detail-item span,
.layer-detail-path span {
  display: block;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.layer-detail-item strong {
  display: block;
  margin-top: 0.18rem;
  color: #0f172a;
  font-size: 0.84rem;
}

.layer-detail-path code {
  display: block;
  margin-top: 0.22rem;
  color: #334155;
  white-space: normal;
  overflow-wrap: anywhere;
}

.delete-layer-summary {
  border: 1px solid #fecaca;
  border-radius: 0.65rem;
  background: #fff7f7;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
}

.delete-layer-name {
  color: #991b1b;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.table td,
.table th {
  vertical-align: middle;
}

.form-check {
  background: #fff;
}

.upload-card {
  border-top: 4px solid #198754;
}

.management-table-wrap {
  max-height: 68vh;
  border: 1px solid #e2e8f0;
  border-radius: 0.6rem;
}

.management-table thead th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  z-index: 1;
  white-space: nowrap;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.management-table td {
  font-size: 0.88rem;
}

.management-filter-toolbar {
  border: 1px solid #dbe4ef;
  border-radius: 0.6rem;
  background: #f8fbff;
  padding: 0.75rem;
}

.upload-card .card-body {
  padding: 0.9rem;
}

.upload-card label {
  font-size: 0.83rem;
  margin-bottom: 0.2rem;
}

.upload-card small {
  font-size: 0.75rem;
}

.layer-list-scroll {
  max-height: 38vh;
  overflow-y: auto;
}

.layer-option {
  border: 1px solid #dbe2ea;
  border-radius: 0.7rem;
  padding: 0.7rem 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease;
  background: #ffffff;
}

.layer-option:hover {
  border-color: #87b7ff;
  background: #f4f8ff;
}

.layer-option-active {
  border-color: #2563eb;
  background: #eef4ff;
  box-shadow: 0 0 0 1px #2563eb inset;
}

.layer-toggle {
  width: 1.3rem;
  height: 1.3rem;
  cursor: pointer;
}

.layer-name {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
}

.layer-meta {
  color: #64748b;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.growth-card {
  border-top: 4px solid #0d6efd;
}

.growth-page .container-fluid {
  max-width: 1680px;
}

.growth-page .row {
  --bs-gutter-x: 0.8rem;
  --bs-gutter-y: 0.8rem;
}

.growth-page .growth-card {
  margin-bottom: 0.8rem !important;
}

.growth-page .growth-card,
.growth-page .compliance-card {
  border-top: 4px solid #0d6efd;
}

.growth-page > .container-fluid > .row > [class*="col-"] > .card {
  border-top: 4px solid #0d6efd;
}

.growth-page .card-body,
.growth-page .growth-card .card-body {
  padding: 0.85rem !important;
}

.growth-page .card-body > .d-flex.justify-content-between,
.growth-page .growth-section-header {
  gap: 0.75rem;
  margin-bottom: 0.55rem !important;
}

.growth-page h2.h5,
.growth-page h2.h6 {
  font-size: 1rem;
  line-height: 1.2;
}

.growth-page h2.h5,
.growth-page h2.h6,
.growth-page h3.h6,
.growth-page .fw-semibold {
  color: #0f172a;
}

.growth-page .card-body > h2.h5,
.growth-page .card-body > h2.h6 {
  margin-bottom: 0.55rem !important;
}

.growth-page .card-body > .d-flex.justify-content-between small,
.growth-page .text-secondary,
.growth-page .small {
  font-size: 0.78rem;
}

.growth-page .form-control,
.growth-page .form-select,
.growth-page .btn {
  font-size: 0.84rem;
}

.growth-primary-config .card-body > .d-flex {
  margin-bottom: 0.55rem !important;
}

.growth-primary-config h2 {
  font-size: 1rem;
}

.growth-primary-config .small {
  font-size: 0.76rem;
}

.growth-page #growthMap,
.growth-page #complianceMap,
.growth-page #facilityCoverageMap,
.growth-page #floodExposureMap,
.growth-page #criticalInfraMap {
  height: 380px !important;
}

.growth-page #compareMapA,
.growth-page #compareMapB {
  height: 280px !important;
}

.growth-page .growth-kpi-box {
  min-height: 64px;
  padding: 0.45rem 0.55rem;
}

.growth-page .compliance-kpi-box {
  min-height: 64px;
  border-color: #dbe4ef;
  background: #f8fbff;
  padding: 0.45rem 0.55rem;
}

.growth-page .compliance-kpi-label {
  color: #64748b;
  letter-spacing: 0.03em;
}

.growth-page .growth-kpi-value {
  font-size: 0.95rem;
}

.growth-page .compliance-kpi-value {
  font-size: 0.95rem;
  color: #1e293b;
}

.growth-page .growth-map-box {
  border-radius: 0.6rem;
}

.growth-page .growth-map-header {
  padding: 0.45rem 0.6rem;
  font-size: 0.84rem;
}

.growth-page .growth-map-body {
  min-height: 160px;
  padding: 0.75rem;
}

.growth-result-map {
  height: 420px;
  border: 1px solid #dbe4ef;
  border-radius: 0.7rem;
  overflow: hidden;
}

.growth-map-toolbar {
  display: grid;
  grid-template-columns: minmax(11rem, 0.85fr) minmax(16rem, 1.25fr) minmax(8rem, 0.6fr) minmax(8rem, 0.6fr);
  gap: 0.65rem;
  align-items: end;
  border: 1px solid #dbe4ef;
  border-radius: 0.65rem;
  background: #f8fbff;
  padding: 0.7rem;
}

.growth-map-toolbar .form-label {
  color: #475569;
  font-weight: 700;
}

.growth-opacity-slider {
  min-width: 10rem;
}

.growth-opacity-value {
  width: 2.8rem;
  text-align: right;
}

.growth-map-toolbar-action {
  min-width: 0;
}

.growth-page .table-responsive {
  scrollbar-width: thin;
}

.growth-page .table {
  font-size: 0.82rem;
}

.growth-page .table th,
.growth-page .table td {
  padding: 0.38rem 0.45rem;
  vertical-align: middle;
}

.growth-page .border.rounded.p-3,
.growth-page .border.rounded.p-2,
.growth-page #growthChartPanel .card-body {
  padding: 0.65rem !important;
}

.growth-page .bg-light-subtle,
.growth-page .growth-detail-box {
  border-color: #dbe4ef !important;
  background: #f8fbff !important;
}

.growth-page .alert {
  padding: 0.55rem 0.7rem;
  font-size: 0.82rem;
}

.growth-page #growthChartPanel {
  border: 1px solid #dbe4ef !important;
  border-radius: 0.65rem;
}

.growth-page #growthChartPanel .row {
  --bs-gutter-x: 0.7rem;
  --bs-gutter-y: 0.7rem;
}

.growth-page #growthChartPanel canvas {
  max-height: 280px;
}

.growth-page code {
  font-size: 0.78rem;
}

.growth-page-heading {
  margin-bottom: 0.7rem !important;
}

.growth-page-heading h1 {
  font-size: 1.35rem;
  line-height: 1.15;
}

.growth-page-heading p {
  font-size: 0.9rem;
}

.growth-tab-shell {
  border-radius: 0.65rem;
}

.growth-tabs {
  border-bottom: 1px solid #dbe4ef;
  gap: 0.35rem;
  overflow-x: auto;
  padding-bottom: 0.45rem;
}

.growth-tabs .nav-link {
  border: 1px solid transparent;
  border-radius: 0.5rem;
  color: #475569;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

.growth-tabs .nav-link:hover {
  border-color: #dbe4ef;
  color: #0f172a;
}

.growth-tabs .nav-link.active {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.growth-tab-content > .tab-pane > .growth-card {
  box-shadow: none !important;
  border: 1px solid #dbe4ef !important;
}

.growth-tab-content #growthNewScenarioSection,
.growth-tab-content #camNewProjectionSection {
  max-width: 980px;
}

.growth-config-card .card-body {
  padding: 0.85rem;
}

.growth-config-card .form-label {
  margin-bottom: 0.2rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
}

.growth-config-card .form-control,
.growth-config-card .form-select {
  font-size: 0.84rem;
}

.growth-step-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
}

.growth-step-strip div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid #dbeafe;
  border-radius: 0.55rem;
  background: #f8fbff;
  color: #1e3a8a;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem;
}

.growth-step-strip span {
  display: inline-flex;
  flex: 0 0 auto;
  width: 1.1rem;
  height: 1.1rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #0d6efd;
  color: #ffffff;
  font-size: 0.68rem;
}

.growth-raster-sequence {
  display: grid;
  gap: 0.5rem;
}

.growth-inline-panel {
  border: 1px solid #dbe4ef;
  border-radius: 0.65rem;
  background: #f8fbff;
  padding: 0.7rem;
}

.growth-class-scroll {
  max-height: 18rem;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.growth-advanced-panel {
  border: 1px solid #dbe4ef;
  border-radius: 0.65rem;
  background: #ffffff;
  padding: 0.65rem;
}

.growth-advanced-panel summary {
  cursor: pointer;
  color: #0f172a;
  font-size: 0.86rem;
  font-weight: 700;
}

.growth-advanced-panel summary::marker {
  color: #0d6efd;
}

.growth-advanced-panel[open] {
  background: #f8fbff;
}

.growth-advanced-panel .form-label {
  font-size: 0.76rem;
}

.growth-page .growth-slider {
  margin-top: -0.15rem;
}

.growth-map-box {
  border: 1px solid #dbe4ef;
  border-radius: 0.7rem;
  overflow: hidden;
  background: #ffffff;
}

.growth-map-header {
  padding: 0.55rem 0.75rem;
  font-weight: 600;
  color: #1e293b;
  background: #eef4ff;
  border-bottom: 1px solid #dbe4ef;
}

.growth-map-body {
  min-height: 210px;
  padding: 0.85rem;
  background:
    radial-gradient(circle at 85% 18%, rgba(13, 110, 253, 0.16), transparent 38%),
    radial-gradient(circle at 18% 80%, rgba(255, 193, 7, 0.14), transparent 40%),
    #f8fbff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.growth-placeholder-pill {
  display: inline-flex;
  width: fit-content;
  border: 1px solid #bfd2ff;
  background: #eaf1ff;
  color: #274c96;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  margin-bottom: 0.45rem;
}

.growth-kpi-box {
  border: 1px solid #dbe4ef;
  border-radius: 0.65rem;
  padding: 0.55rem 0.6rem;
  background: #f8fbff;
  min-height: 74px;
}

.growth-kpi-label {
  font-size: 0.74rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.growth-kpi-value {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  margin-top: 0.2rem;
}

.compliance-card {
  border-top: 4px solid #dc3545;
}

.compliance-list {
  padding-left: 1rem;
}

.compliance-step-box {
  border: 1px solid #f3d4d9;
  border-radius: 0.7rem;
  background: #fff6f8;
  padding: 0.75rem 0.8rem;
  min-height: 104px;
}

.compliance-step-title {
  font-weight: 600;
  color: #7a1123;
  margin-bottom: 0.25rem;
}

.compliance-kpi-box {
  border: 1px solid #f0cdd3;
  border-radius: 0.65rem;
  padding: 0.55rem 0.6rem;
  background: #fff7f9;
  min-height: 74px;
}

.compliance-kpi-label {
  font-size: 0.74rem;
  color: #8f4a57;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.compliance-kpi-value {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  margin-top: 0.2rem;
}

.analysis-history-table {
  min-width: 860px;
  font-size: 0.82rem;
}

.analysis-history-table th,
.analysis-history-table td {
  white-space: nowrap;
  padding: 0.38rem 0.45rem;
}

.analysis-history-table .history-name {
  max-width: 190px;
}

.analysis-history-table .history-result {
  max-width: 260px;
}

.analysis-history-table .history-name,
.analysis-history-table .history-result {
  overflow: hidden;
  text-overflow: ellipsis;
}

.analysis-history-table .history-actions-cell {
  width: 1%;
}

.history-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

.history-actions form {
  display: inline-flex;
  margin: 0;
}

.history-actions .btn {
  padding: 0.16rem 0.42rem;
  font-size: 0.74rem;
  line-height: 1.15;
}

.compliance-legend-box {
  border: 1px solid #efd6db;
  border-radius: 0.7rem;
  background: #fff8fa;
  padding: 0.65rem 0.75rem;
}

.legend-chip {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid #d2d8e1;
  margin-right: 8px;
}

.legend-green {
  background: #2fa05d;
}

.legend-yellow {
  background: #eab308;
}

.legend-red {
  background: #dc2626;
}

.classify-card {
  border-top: 4px solid #0f766e;
}

.classify-list {
  padding-left: 1rem;
}

.classify-step-box {
  border: 1px solid #cae9e5;
  border-radius: 0.7rem;
  background: #f4fbfa;
  padding: 0.75rem 0.8rem;
  min-height: 108px;
}

.classify-step-title {
  font-weight: 600;
  color: #0f5a55;
  margin-bottom: 0.25rem;
}

.classify-kpi-box {
  border: 1px solid #cae9e5;
  border-radius: 0.65rem;
  padding: 0.55rem 0.6rem;
  background: #f4fbfa;
  min-height: 74px;
}

.classify-kpi-label {
  font-size: 0.74rem;
  color: #3b7c75;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.classify-kpi-value {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  margin-top: 0.2rem;
}

.auth-shell {
  min-height: calc(100vh - 7rem);
  padding: 2.2rem 0;
  background:
    radial-gradient(circle at 12% 10%, rgba(13, 110, 253, 0.12), transparent 32%),
    radial-gradient(circle at 88% 20%, rgba(25, 135, 84, 0.10), transparent 30%),
    #f5f8fc;
}

.auth-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  overflow: hidden;
  border: 1px solid #dbe4ef;
  border-radius: 0.95rem;
  background: #ffffff;
  box-shadow: 0 1rem 2.4rem rgba(15, 23, 42, 0.12);
}

.auth-panel-wide {
  grid-template-columns: minmax(0, 0.8fr) minmax(480px, 1.2fr);
}

.auth-intro {
  padding: 1.5rem;
  background:
    linear-gradient(145deg, rgba(13, 110, 253, 0.92), rgba(25, 135, 84, 0.86)),
    #0d6efd;
  color: #ffffff;
}

.auth-intro h1 {
  font-size: 1.55rem;
  font-weight: 800;
}

.auth-intro p,
.auth-note-list {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.9rem;
}

.auth-note-list {
  display: grid;
  gap: 0.55rem;
}

.auth-note-list div {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 0.6rem;
  background: rgba(255, 255, 255, 0.12);
  padding: 0.55rem 0.65rem;
}

.auth-form-card {
  padding: 1.35rem;
}

.auth-form-card .form-label,
.profile-page .form-label {
  margin-bottom: 0.2rem;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 700;
}

.auth-form-card .form-control,
.profile-page .form-control {
  font-size: 0.9rem;
}

.captcha-box {
  border: 1px solid #dbe4ef;
  border-radius: 0.65rem;
  background: #f8fbff;
  padding: 0.6rem 0.75rem;
}

.auth-switch {
  margin-top: 0.9rem;
  color: #64748b;
  font-size: 0.84rem;
  text-align: center;
}

.profile-page {
  min-height: calc(100vh - 7rem);
  background:
    radial-gradient(circle at 12% 12%, rgba(13, 110, 253, 0.08), transparent 30%),
    radial-gradient(circle at 88% 16%, rgba(25, 135, 84, 0.08), transparent 28%),
    transparent;
}

.profile-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid #dbe4ef;
  border-top: 4px solid #0d6efd;
  border-radius: 0.9rem;
  background: #ffffff;
  padding: 1rem;
  box-shadow: 0 0.75rem 1.8rem rgba(15, 23, 42, 0.08);
}

.profile-hero-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.85rem;
}

.profile-hero h1 {
  color: #0f172a;
  font-size: 1.35rem;
  font-weight: 800;
}

.profile-subtitle {
  color: #64748b;
  font-size: 0.86rem;
}

.profile-card {
  border: 1px solid #dbe4ef;
  border-top: 4px solid #0d6efd;
  border-radius: 0.85rem;
  background: #ffffff;
  padding: 0.9rem;
  box-shadow: 0 0.65rem 1.4rem rgba(15, 23, 42, 0.07);
}

.profile-section-title {
  margin-bottom: 0.65rem;
  color: #0f172a;
  font-size: 0.98rem;
  font-weight: 800;
}

.profile-avatar {
  display: inline-flex;
  width: 3.1rem;
  height: 3.1rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #0d6efd;
  color: #ffffff;
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.profile-avatar-lg {
  flex: 0 0 auto;
  width: 4rem;
  height: 4rem;
  margin-bottom: 0;
  font-size: 1.55rem;
}

.profile-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.profile-meta-grid div {
  display: grid;
  gap: 0.1rem;
  border: 1px solid #dbe4ef;
  border-radius: 0.55rem;
  background: #f8fbff;
  padding: 0.45rem 0.55rem;
}

.profile-meta-grid span {
  color: #64748b;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.profile-meta-grid strong {
  color: #0f172a;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.profile-access-note {
  margin-top: 0.75rem;
  border: 1px solid #bfdbfe;
  border-radius: 0.65rem;
  background: #eff6ff;
  padding: 0.65rem;
}

.profile-role-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.profile-role-grid div {
  display: grid;
  gap: 0.2rem;
  border: 1px solid #dbe4ef;
  border-radius: 0.65rem;
  background: #f8fbff;
  padding: 0.65rem;
}

.profile-role-grid strong {
  color: #0f172a;
  font-size: 0.84rem;
}

.profile-role-grid span {
  color: #64748b;
  font-size: 0.76rem;
}

.user-role-form {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.user-role-select {
  width: 11.5rem;
}

@media (max-width: 991.98px) {
  .auth-panel,
  .auth-panel-wide {
    grid-template-columns: 1fr;
  }

  .profile-role-grid,
  .profile-meta-grid {
    grid-template-columns: 1fr;
  }

  .profile-hero {
    align-items: flex-start;
    flex-direction: column;
  }
}

.rtrw-card {
  border-top: 4px solid #1d4ed8;
}

#rtrwMap {
  width: 100%;
  height: 72vh;
  min-height: 520px;
  border-radius: 0.7rem;
}

.rtrw-layer-chip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.1rem;
  border-bottom: 1px dashed #dbe4ef;
}

.rtrw-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.rtrw-toolbar {
  border: 1px solid #dbe4ef;
  border-radius: 0.6rem;
  background: #f8fbff;
  padding: 0.7rem;
}

.rtrw-theme-accordion {
  max-height: 52vh;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.rtrw-theme-group {
  border: 1px solid #dbe4ef;
  border-radius: 0.6rem;
  margin-bottom: 0.5rem;
  background: #fff;
}

.rtrw-theme-summary {
  list-style: none;
  cursor: pointer;
  padding: 0.55rem 0.7rem;
}

.rtrw-theme-summary::-webkit-details-marker {
  display: none;
}

.rtrw-theme-body {
  border-top: 1px solid #edf2f7;
  max-height: 220px;
  overflow-y: auto;
  padding: 0.45rem;
}

.rtrw-layer-row {
  display: block;
  border: 1px solid #edf2f7;
  border-radius: 0.5rem;
  padding: 0.4rem 0.5rem;
  margin-bottom: 0.35rem;
  background: #fff;
}

.rtrw-layer-row:hover {
  background: #f8fbff;
  border-color: #bfd3f2;
}

.rtrw-layer-name {
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.2;
}

.viz-card {
  border-top: 4px solid #0ea5e9;
}

#dataVizMap {
  width: 100%;
  height: 80vh;
  min-height: 640px;
  border-radius: 0.7rem;
}

.viz-map-wrap {
  position: relative;
}

.viz-map-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 0.7rem;
  z-index: 1200;
  pointer-events: none;
}

.viz-map-loading-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.05rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.6rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
  font-size: 0.9rem;
  font-weight: 500;
  color: #1f2937;
}

.raster-workflow-card,
.vector-workflow-card {
  max-height: calc(80vh + 4.3rem);
  overflow: hidden;
}

.raster-chart-box {
  height: 220px;
}

.spatial-viz-page .container-fluid {
  padding-left: 0.75rem !important;
  padding-right: 0.75rem !important;
}

.spatial-viz-page .row {
  --bs-gutter-x: 0.75rem;
  --bs-gutter-y: 0.75rem;
}

.spatial-viz-page .spatial-viz-heading {
  margin-bottom: 0.55rem !important;
}

.spatial-viz-page .spatial-viz-heading h1 {
  font-size: 1.15rem;
  line-height: 1.15;
}

.spatial-viz-page .spatial-viz-heading p {
  font-size: 0.82rem;
}

.spatial-viz-page .card-body {
  padding: 0.65rem !important;
}

.spatial-viz-page .viz-layer-toolbar {
  padding: 0.45rem;
}

.spatial-viz-page .form-label {
  font-size: 0.74rem;
}

.spatial-viz-page .form-control-sm,
.spatial-viz-page .form-select-sm,
.spatial-viz-page .btn-sm {
  font-size: 0.76rem;
}

.spatial-viz-page .layer-option {
  border-radius: 0.5rem;
  padding: 0.38rem 0.5rem;
}

.spatial-viz-page .layer-toggle {
  width: 1.05rem;
  height: 1.05rem;
}

.spatial-viz-page .layer-name {
  font-size: 0.84rem;
}

.spatial-viz-page .layer-meta {
  font-size: 0.68rem;
}

.spatial-viz-page .viz-layer-segment {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 0.35rem;
}

.spatial-viz-page .viz-layer-segment .btn {
  padding-top: 0.22rem;
  padding-bottom: 0.22rem;
}

.viz-layer-autocomplete {
  position: relative;
}

.viz-layer-suggestions {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  right: 0;
  z-index: 760;
  max-height: 15rem;
  overflow-y: auto;
  border: 1px solid #cbd5e1;
  border-radius: 0.55rem;
  background: #ffffff;
  box-shadow: 0 0.9rem 1.8rem rgba(15, 23, 42, 0.18);
}

.viz-layer-suggestion {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  background: transparent;
  padding: 0.48rem 0.55rem;
  color: #0f172a;
  text-align: left;
}

.viz-layer-suggestion:hover,
.viz-layer-suggestion:focus {
  background: #f1f5ff;
}

.viz-layer-suggestion strong {
  display: block;
  font-size: 0.78rem;
  line-height: 1.15;
}

.viz-layer-suggestion small {
  display: block;
  color: #64748b;
  font-size: 0.67rem;
  text-transform: uppercase;
}

.viz-layer-suggestion em {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.65rem;
  font-style: normal;
  padding: 0.1rem 0.35rem;
}

.viz-layer-suggestion-empty {
  padding: 0.55rem;
  color: #64748b;
  font-size: 0.76rem;
}

.spatial-viz-page .viz-layer-list {
  max-height: 70vh;
}

.viz-panel-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border: 1px solid rgba(203, 213, 225, 0.78);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0.65rem 1.4rem rgba(15, 23, 42, 0.14);
  padding: 0.45rem 0.55rem;
  backdrop-filter: blur(10px);
}

.viz-panel-controls span {
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 700;
}

.viz-panel-controls > div {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.spatial-viz-page .panel-content-hidden > .viz-card {
  display: none !important;
}

.spatial-viz-page .viz-layer-layout {
  display: grid;
  gap: 0.75rem;
}

#rasterStyleControls {
  order: 1;
  grid-column: 1;
  grid-row: 1;
}

#rasterStyleCard {
  order: 2;
  grid-column: 1;
  grid-row: 2;
}

#rasterChartPanel {
  order: 3;
  grid-column: 1;
  grid-row: 3;
}

#vectorStyleControls {
  order: 4;
  grid-column: 2;
  grid-row: 1;
}

#vectorStyleCard {
  order: 5;
  grid-column: 2;
  grid-row: 2;
}

.spatial-viz-page #dataVizMap {
  height: calc(100vh - 11rem);
  min-height: 680px;
}

@media (min-width: 1200px) {
  .spatial-viz-page .spatial-viz-shell {
    position: relative;
    display: block;
    min-height: calc(100vh - 9.8rem);
    margin-left: 0;
    margin-right: 0;
  }

  .spatial-viz-page .spatial-map-panel {
    width: 100%;
    max-width: none;
    padding-left: 0;
    padding-right: 0;
  }

  .spatial-viz-page .spatial-map-panel .viz-card {
    border-top-width: 0;
    border-radius: 0.75rem;
    overflow: hidden;
  }

  .spatial-viz-page .spatial-map-panel .card-body {
    padding: 0 !important;
  }

  .spatial-viz-page .spatial-map-panel .d-flex.justify-content-between {
    position: absolute;
    top: 0.75rem;
    left: 50%;
    z-index: 650;
    transform: translateX(-50%);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    padding: 0.35rem 0.7rem !important;
    box-shadow: 0 0.6rem 1.4rem rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(8px);
  }

  .spatial-viz-page .spatial-map-panel h2 {
    font-size: 0.9rem;
  }

  .spatial-viz-page .spatial-map-panel small {
    display: none;
  }

  .spatial-viz-page #dataVizMap {
    height: calc(100vh - 8.6rem);
    min-height: 700px;
    border-radius: 0.75rem;
  }

  .spatial-viz-page .spatial-layer-panel,
  .spatial-viz-page .spatial-style-panel {
    position: absolute;
    top: 3.6rem;
    bottom: 0.75rem;
    z-index: 700;
    width: clamp(340px, 25vw, 430px);
    max-width: none;
    padding-left: 0;
    padding-right: 0;
    /* The column spans the full map height but is mostly empty. Let map clicks
       (identify + popup move/close) pass through the empty areas; the controls
       and cards inside re-enable pointer events below. */
    pointer-events: none;
  }

  .spatial-viz-page .spatial-layer-panel > *,
  .spatial-viz-page .spatial-style-panel > * {
    pointer-events: auto;
  }

  .spatial-viz-page .spatial-layer-panel {
    left: 0.75rem;
  }

  .spatial-viz-page .spatial-layer-panel.layer-list-open {
    width: clamp(660px, 48vw, 820px);
  }

  .spatial-viz-page .spatial-layer-panel.panel-expanded {
    width: clamp(760px, 56vw, 980px);
  }

  .spatial-viz-page .spatial-layer-panel.panel-content-hidden {
    width: clamp(220px, 18vw, 280px);
  }

  .spatial-viz-page .spatial-style-panel {
    right: 0.75rem;
    display: grid !important;
    width: clamp(620px, 45vw, 780px);
    grid-template-columns: minmax(290px, 1fr) minmax(290px, 1fr);
    align-content: start;
    align-items: start;
    grid-auto-rows: min-content;
    overflow-y: auto;
    padding-bottom: 0.25rem;
  }

  .spatial-viz-page .spatial-style-panel.panel-expanded {
    width: clamp(760px, 56vw, 980px);
  }

  .spatial-viz-page .spatial-style-panel.raster-style-expanded,
  .spatial-viz-page .spatial-style-panel.vector-style-expanded {
    width: clamp(760px, 56vw, 980px);
  }

  .spatial-viz-page .spatial-style-panel.raster-style-expanded:has(#vectorStyleControls:not(.d-none)),
  .spatial-viz-page .spatial-style-panel.vector-style-expanded:has(#rasterStyleControls:not(.d-none)) {
    width: clamp(760px, 56vw, 980px);
  }

  .spatial-viz-page .spatial-style-panel.panel-content-hidden {
    width: clamp(420px, 32vw, 560px);
  }

  .spatial-viz-page .spatial-layer-panel > .viz-card,
  .spatial-viz-page .spatial-style-panel > .viz-card {
    max-height: 100%;
    overflow: hidden;
    border: 1px solid rgba(203, 213, 225, 0.78);
    border-top: 0;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 0.9rem 2rem rgba(15, 23, 42, 0.18) !important;
    backdrop-filter: blur(10px);
  }

  .spatial-viz-page .spatial-layer-panel .card-body,
  .spatial-viz-page .spatial-style-panel .card-body {
    max-height: 100%;
    overflow: hidden;
  }

  .spatial-viz-page .spatial-layer-panel .card-body {
    display: flex;
    min-height: 0;
    flex-direction: column;
  }

  .spatial-viz-page .spatial-layer-panel .card-body {
    padding: 0.9rem !important;
  }

  .spatial-viz-page .spatial-layer-panel h2,
  .spatial-viz-page .spatial-style-panel h2 {
    font-size: 0.9rem;
  }

  .spatial-viz-page .spatial-layer-panel .viz-layer-list {
    flex: 1 1 auto;
    max-height: none;
  }

  .spatial-viz-page .spatial-layer-panel.layer-list-open .viz-layer-layout {
    grid-template-columns: minmax(310px, 0.86fr) minmax(300px, 1fr);
    align-items: start;
  }

  .spatial-viz-page .spatial-layer-panel.layer-list-open .viz-layer-list {
    max-height: calc(100vh - 16.5rem);
  }
}

.raster-workflow-card .card-body {
  display: flex;
  min-height: 0;
  flex-direction: column;
}

.raster-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
}

.vector-style-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.vector-style-control {
  min-width: 0;
}

.vector-style-control span {
  display: block;
  margin-bottom: 0.25rem;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
}

.vector-style-control .form-control-color {
  width: 100%;
  min-width: 0;
}

.raster-opacity-control {
  border: 1px solid #dbe4ef;
  border-radius: 0.5rem;
  background: #f8fbff;
  padding: 0.45rem;
}

.raster-class-scroll {
  min-height: 0;
  max-height: 42vh;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.raster-class-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2.5rem;
  gap: 0.35rem;
  align-items: center;
  border: 1px solid #dbe4ef;
  border-radius: 0.5rem;
  background: #ffffff;
  padding: 0.45rem;
}

.raster-class-row-meta {
  grid-column: 1 / -1;
  min-width: 0;
  line-height: 1.15;
}

.raster-class-row .form-control-color {
  width: 2.5rem;
  min-width: 2.5rem;
  padding: 0.18rem;
}

.spatial-viz-page #rasterClassStatus,
.spatial-viz-page #rasterClassSummary,
.spatial-viz-page #rasterClassLegend {
  font-size: 0.76rem;
}

@media (max-width: 1199.98px) {
  .raster-workflow-card,
  .vector-workflow-card {
    max-height: none;
  }

  .raster-class-scroll {
    max-height: none;
  }
}

@media (max-width: 575.98px) {
  .raster-class-row {
    grid-template-columns: 1fr 2.8rem;
  }

  .raster-class-row-meta {
    grid-column: 1 / -1;
  }
}

.viz-layer-toolbar {
  border: 1px solid #dbe4ef;
  border-radius: 0.65rem;
  background: #f8fbff;
  padding: 0.7rem;
}

.viz-layer-list {
  max-height: 62vh;
  overflow-y: auto;
  padding-right: 0.15rem;
}

/* On desktop the layer/style panels float over the map at z-index 700 — the
   same as Leaflet's popup pane — which lets a panel sit on top of an identify
   popup and swallow clicks on its "×" close button. Lift popups above the
   panels (700) but keep them below the map controls (1000). */
.leaflet-popup-pane {
  z-index: 900;
}

.viz-popup {
  min-width: 280px;
}

.viz-popup-title {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.15rem;
}

.viz-popup-subtitle {
  font-size: 0.78rem;
  color: #64748b;
  margin-bottom: 0.45rem;
}

.viz-popup-table-wrap {
  max-height: 240px;
  overflow: auto;
  border: 1px solid #dbe4ef;
  border-radius: 0.45rem;
}

.viz-popup-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.viz-popup-table th,
.viz-popup-table td {
  padding: 0.32rem 0.4rem;
  border-bottom: 1px solid #edf2f7;
  vertical-align: top;
}

.viz-popup-table th {
  width: 40%;
  background: #f8fbff;
  color: #334155;
  font-weight: 600;
}

.viz-empty {
  font-size: 0.82rem;
  color: #64748b;
}

.executive-dashboard .card {
  border-radius: 0.5rem;
}

.executive-score-bar {
  height: 0.42rem;
  max-width: 7rem;
}

.executive-priority-table td {
  vertical-align: middle;
}

.executive-signal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.82rem;
  line-height: 1.25;
}

.executive-activity {
  border-bottom: 1px solid #e5edf6;
  padding-bottom: 0.8rem;
}

.executive-activity:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.sprawl-workspace {
  align-items: flex-start;
}

.sprawl-history-panel,
.sprawl-detail-panel {
  border-radius: 0.65rem;
}

.sprawl-history-list {
  display: grid;
  max-height: calc(100vh - 16rem);
  overflow-y: auto;
  gap: 0.5rem;
  padding-right: 0.15rem;
}

.sprawl-history-item {
  border: 1px solid #dbe4ef;
  border-radius: 0.5rem;
  background: #ffffff;
  padding: 0.55rem;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.sprawl-history-item:hover {
  border-color: #93c5fd;
  background: #f8fbff;
  box-shadow: 0 0.5rem 1.2rem rgba(15, 23, 42, 0.07);
}

.sprawl-history-item.is-selected {
  border-color: #60a5fa;
  background: #eff6ff;
  box-shadow: inset 4px 0 0 #2563eb;
}

.sprawl-history-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.sprawl-history-title {
  color: #0f172a;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.sprawl-history-subtitle {
  color: #64748b;
  font-size: 0.76rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.sprawl-history-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
}

.sprawl-history-summary div {
  border: 1px solid #e5edf6;
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.72);
  padding: 0.35rem 0.45rem;
}

.sprawl-history-summary span {
  display: block;
  color: #64748b;
  font-size: 0.68rem;
}

.sprawl-history-summary strong {
  display: block;
  color: #0f172a;
  font-size: 0.78rem;
}

.sprawl-history-delete {
  line-height: 1.2;
  padding-block: 0.3rem;
}

.sprawl-detail-header {
  position: sticky;
  top: 4.4rem;
  z-index: 20;
  border: 1px solid #dbe4ef;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.96);
  padding: 0.8rem;
  box-shadow: 0 0.45rem 1rem rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(8px);
}

.sprawl-result-map {
  height: 520px;
  border: 1px solid #dbe4ef;
  border-radius: 0.65rem;
  overflow: hidden;
}

.sprawl-map-toolbar {
  display: grid;
  grid-template-columns: minmax(11rem, 0.85fr) minmax(16rem, 1.25fr) minmax(10rem, 0.75fr);
  gap: 0.65rem;
  align-items: end;
  border: 1px solid #dbe4ef;
  border-radius: 0.65rem;
  background: #f8fbff;
  padding: 0.7rem;
}

.sprawl-map-toolbar .form-label {
  color: #475569;
  font-weight: 700;
}

.sprawl-opacity-slider {
  min-width: 10rem;
}

.sprawl-opacity-value {
  width: 2.8rem;
  text-align: right;
}

.sprawl-map-toolbar-action {
  min-width: 0;
}

.sprawl-tabs {
  border-bottom: 1px solid #dbe4ef;
  gap: 0.35rem;
  overflow-x: auto;
  padding-bottom: 0.45rem;
}

.sprawl-tabs .nav-link {
  border: 1px solid transparent;
  border-radius: 0.5rem;
  color: #475569;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

.sprawl-tabs .nav-link:hover {
  border-color: #dbe4ef;
  color: #0f172a;
}

.sprawl-tabs .nav-link.active {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.sprawl-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  border: 1px solid #dbe4ef;
  border-radius: 0.65rem;
  background: #f8fbff;
  padding: 0.65rem;
}

.sprawl-kpi-strip > div {
  min-width: 0;
  border-right: 1px solid #dbe4ef;
  padding: 0.2rem 0.7rem 0.2rem 0.2rem;
}

.sprawl-kpi-strip > div:last-child {
  border-right: 0;
}

.sprawl-kpi-strip span,
.sprawl-kpi-strip em {
  display: block;
  color: #64748b;
  font-size: 0.78rem;
  font-style: normal;
  line-height: 1.25;
}

.sprawl-kpi-strip strong {
  display: block;
  color: #0f172a;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.1;
  margin: 0.12rem 0;
}

.sprawl-chart-box {
  height: 360px;
  min-height: 360px;
  border: 1px solid #dbe4ef;
  border-radius: 0.6rem;
  background: #ffffff;
  padding: 0.75rem;
}

.sprawl-chart-box-sm {
  height: 300px;
  min-height: 300px;
}

.sprawl-map-legend {
  padding: 0.7rem 0.8rem;
}

.sprawl-insight-box {
  height: 100%;
  border: 1px solid #dbe4ef;
  border-radius: 0.6rem;
  background: #f8fbff;
  padding: 0.7rem;
  text-align: center;
}

@media (max-width: 991.98px) {
  .sprawl-history-list {
    max-height: none;
  }

  .sprawl-detail-header {
    position: static;
  }

  .sprawl-result-map {
    height: 420px;
  }

  .sprawl-map-toolbar {
    grid-template-columns: 1fr;
  }

  .sprawl-opacity-slider {
    min-width: 0;
  }

  .growth-map-toolbar {
    grid-template-columns: 1fr;
  }

  .growth-opacity-slider {
    min-width: 0;
  }

  .sprawl-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sprawl-kpi-strip > div {
    border-right: 0;
    border-bottom: 1px solid #dbe4ef;
    padding-bottom: 0.55rem;
  }

  .sprawl-kpi-strip > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
}

@media (max-width: 575.98px) {
  .sprawl-kpi-strip {
    grid-template-columns: 1fr;
  }

  .sprawl-kpi-strip > div,
  .sprawl-kpi-strip > div:nth-last-child(-n + 2) {
    border-bottom: 1px solid #dbe4ef;
  }

  .sprawl-kpi-strip > div:last-child {
    border-bottom: 0;
  }
}
