body {
  font-family: var(--bs-font-sans-serif), system-ui, sans-serif;
}

.layout-navbar .landing-navbar {
  box-shadow: 0 0.125rem 0.5rem rgba(67, 89, 113, 0.12);
}

.layout-navbar .navbar-brand,
.layout-navbar .app-brand-link {
  min-width: 0;
}

.sdat-navbar-title {
  display: inline-block;
  max-width: min(52vw, 520px);
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.sdat-title-short {
  display: none;
}

.sdat-brand-logo {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.sdat-footer-logo {
  width: 22px;
  height: 22px;
  object-fit: cover;
  border-radius: 4px;
}

.sdat-landing-hero {
  padding-top: 7.25rem;
  padding-bottom: 2.75rem;
}

#landingFeatures,
#landingReferences,
#landingProjects {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

#landingProjects {
  padding-bottom: 2.5rem !important;
}

.sdat-landing-hero .mb-4 {
  margin-bottom: 1rem !important;
}

.landing-features .features-icon-wrapper {
  margin-top: 1.75rem;
}

.sdat-start-card {
  overflow: hidden;
}

.sdat-project-panel {
  top: 6rem;
}

.sdat-payment-page {
  padding-top: 7rem;
  padding-bottom: 4.5rem;
}

.sdat-payment-card {
  overflow: hidden;
}

.chart-wrap {
  position: relative;
  width: 100%;
  height: 390px;
  min-height: 390px;
}

#seriesChart {
  width: 100%;
  height: 100%;
}

#map {
  width: 100%;
  height: 100%;
  min-height: 340px;
  border-radius: 0.375rem;
}

#mapHistory {
  margin-bottom: 1.5rem;
}

.sdat-map-card,
.sdat-history-card {
  min-height: 430px;
}

.sdat-map-card-body {
  padding: 0.75rem;
  min-height: 372px;
}

.sdat-map-controls {
  display: grid;
  gap: 0.625rem;
  justify-items: center;
}

.sdat-map-meta {
  color: #697a8d;
  font-size: 0.875rem;
  text-align: center;
}

.sdat-map-control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  justify-content: center;
}

.sdat-map-control-row .btn {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-width: 148px;
}

.sdat-history-card .card-body {
  min-height: 290px;
}

.result-pill {
  display: inline-block;
  margin-inline-end: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  background: #eef3ff;
  color: #334155;
}

.sdat-status {
  align-items: center;
}

.sdat-status:not(.d-none) {
  display: flex !important;
}

.sdat-raster-legend {
  background: rgba(255, 255, 255, 0.94);
  border-radius: 0.375rem;
  box-shadow: 0 0.25rem 0.75rem rgba(67, 89, 113, 0.18);
  color: #334155;
  font-size: 0.75rem;
  line-height: 1.2;
  padding: 0.5rem 0.625rem;
}

.sdat-raster-legend-title {
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.sdat-raster-legend-bar {
  background: linear-gradient(90deg, rgb(220, 0, 0), rgb(245, 247, 250), rgb(0, 80, 255));
  border-radius: 999px;
  height: 0.5rem;
  width: 9rem;
}

.sdat-raster-legend-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.25rem;
}

#scaleList.scale-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem 0.75rem;
}

#scaleList .scale-item {
  margin-bottom: 0;
}

#scaleList .form-check-label {
  cursor: pointer;
}

.sdat-nav-buttons {
  display: grid;
  gap: 0.625rem;
  justify-items: center;
}

.sdat-nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  justify-content: center;
}

.sdat-nav-buttons .btn {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-width: 158px;
}

.project-mini-card .card {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.project-mini-card .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(67, 89, 113, 0.12) !important;
}

.xsmall {
  font-size: 0.75rem;
}

.table-responsive {
  min-height: 230px;
}

.landing-footer {
  border-top: 1px solid rgba(67, 89, 113, 0.12);
}

.min-w-0 {
  min-width: 0;
}

@media (min-width: 1400px) {
  .container {
    max-width: 1280px;
  }
}

@media (max-width: 991.98px) {
  .sdat-landing-hero,
  .sdat-payment-page {
    padding-top: 6.5rem;
  }

  #landingFeatures,
  #landingReferences,
  #landingProjects {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .chart-wrap {
    height: 340px;
    min-height: 340px;
  }

  .sdat-navbar-title {
    max-width: 44vw;
    font-size: 0.95rem;
  }

  .layout-navbar .landing-navbar {
    padding-inline: 0.75rem !important;
  }

  .layout-navbar .container-fluid {
    padding-inline: 0.75rem !important;
  }

  #map {
    min-height: 320px;
  }

  .sdat-map-card,
  .sdat-history-card {
    min-height: 390px;
  }

  .sdat-map-card-body {
    min-height: 330px;
  }

  .sdat-history-card .card-body,
  .table-responsive {
    min-height: 220px;
  }
}

@media (max-width: 575.98px) {
  .sdat-navbar-title {
    max-width: 31vw;
    font-size: 0.88rem;
  }

  .sdat-title-full {
    display: none;
  }

  .sdat-title-short {
    display: inline;
  }

  .layout-navbar .navbar-brand {
    margin-right: 0.25rem !important;
  }

  .sdat-brand-logo {
    width: 28px;
    height: 28px;
  }

  .sdat-nav-row {
    width: 100%;
  }

  .sdat-nav-buttons .btn {
    flex: 1 1 0;
    min-width: 0;
  }
}
.chart-wrap,
.sdat-map-card-body {
  position: relative;
}

.sdat-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(248, 249, 252, 0.88);
  backdrop-filter: blur(2px);
  border-radius: inherit;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.sdat-loading-overlay.d-none {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.sdat-loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.12);
  color: #32475c;
}

.sdat-loading-text {
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
}
