html,
body {
  min-height: 100vh;
}

:root {
  --pm-green: #23824b;
  --pm-green-dark: #176137;
  --pm-lime: #c8f03a;
  --pm-ink: #20242a;
  --pm-muted: #68707a;
  --pm-surface: #ffffff;
  --pm-page: #f6f8fb;
  --pm-border: #dde3e0;
  --pm-accent: #0ea5a3;
}

body {
  background:
    radial-gradient(circle at 10% 0%, rgba(14, 165, 163, 0.09), transparent 28rem), linear-gradient(180deg, #ffffff 0, var(--pm-page) 18rem);
  color: var(--pm-ink);
  display: flex;
  flex-direction: column;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

main {
  flex: 1 0 auto;
}

.app-navbar.navbar.bg-success {
  background: linear-gradient(90deg, #176137, #23824b 50%, #0f766e) !important;
  box-shadow: 0 10px 26px rgba(21, 87, 51, 0.18);
  min-height: 3.5rem;
}

.navbar .nav-link {
  border-radius: 8px;
  font-weight: 600;
  padding-left: 0.8rem;
  padding-right: 0.8rem;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  background: rgba(255, 255, 255, 0.12);
}

.navbar .nav-link.active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

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

.language-submenu > .dropdown-menu {
  margin-right: 0.1rem;
}

@media (min-width: 992px) {
  .language-submenu:hover > .dropdown-menu,
  .language-submenu:focus-within > .dropdown-menu {
    display: block;
    left: auto;
    right: 100%;
    top: 0;
  }
}

@media (max-width: 991.98px) {
  .language-submenu > .dropdown-menu {
    border: 0;
    box-shadow: none;
    margin-left: 1rem;
  }
}

.card,
.map-toolbar,
.parcel-map,
.parcel-panel {
  border-color: var(--pm-border) !important;
  box-shadow: 0 14px 36px rgba(31, 44, 38, 0.08) !important;
}

.card {
  border-radius: 8px;
}

.card-header {
  border-top-left-radius: 8px !important;
  border-top-right-radius: 8px !important;
}

.btn {
  border-radius: 8px;
  font-weight: 600;
}

.btn-success {
  background: var(--pm-green);
  border-color: var(--pm-green);
}

.btn-success:hover,
.btn-success:focus {
  background: var(--pm-green-dark);
  border-color: var(--pm-green-dark);
}

.form-control,
.form-select,
.input-group-text {
  border-color: var(--pm-border);
  border-radius: 8px;
}

.table > :not(caption) > * > * {
  padding: 0.9rem 1rem;
}

.brand-map-icon {
  height: 1.35rem;
  width: 1.35rem;
}

.account-avatar {
  align-items: center;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 700;
  height: 1.75rem;
  justify-content: center;
  line-height: 1;
  width: 1.75rem;
}

.map-layout main {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 1rem !important;
  padding-top: 1rem !important;
}

.map-layout footer {
  flex: 0 0 auto;
}

.map-page {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.map-workspace {
  flex: 1 1 auto;
  min-height: 0;
}

.map-workspace > [class*="col-"] {
  min-height: 0;
}

.parcel-map-wrap {
  height: 100%;
  min-height: 0;
  position: relative;
}

.parcel-map {
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #eef3f0;
  overflow: hidden;
  position: relative;
}

.parcel-map.leaflet-container {
  font-family: inherit;
}

.map-status {
  bottom: 1rem;
  left: 1rem;
  max-width: min(420px, calc(100% - 2rem));
  position: absolute;
  z-index: 500;
}

.map-search-panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--pm-border);
  border-radius: 8px;
  left: 4.5rem;
  max-width: min(32rem, calc(100% - 30rem));
  padding: 0.45rem;
  position: absolute;
  right: auto;
  top: 0.75rem;
  z-index: 700;
}

.map-search-results {
  background: #fff;
  border: 1px solid var(--pm-border);
  border-radius: 8px;
  left: 0.45rem;
  max-height: 18rem;
  overflow-y: auto;
  position: absolute;
  right: 0.45rem;
  top: calc(100% + 0.35rem);
}

.map-search-result {
  background: transparent;
  border: 0;
  border-bottom: 1px solid #edf1ef;
  display: block;
  padding: 0.65rem 0.75rem;
  text-align: left;
  width: 100%;
}

.map-search-result:hover,
.map-search-result:focus {
  background: #f3f8f5;
}

.map-search-result:last-child {
  border-bottom: 0;
}

.map-filter-panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--pm-border);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  position: absolute;
  right: 10rem;
  top: 0.75rem;
  width: 14rem;
  z-index: 650;
}

.parcel-panel {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
}

.parcel-summary {
  background: #f8faf9;
}

.status-color-preview {
  background: #fff;
  min-width: 2.75rem;
}

.status-color-chip {
  align-items: center;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  display: inline-flex;
  font-size: 0.85rem;
  gap: 0.4rem;
  line-height: 1;
  padding: 0.45rem 0.6rem;
  white-space: nowrap;
}

.status-color-chip::before {
  background: var(--status-color, #198754);
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 50%;
  content: "";
  height: 0.8rem;
  width: 0.8rem;
}

.status-color-chip-empty {
  font-size: 0;
  height: 2.2rem;
  justify-content: center;
  padding: 0.35rem 0.55rem;
  width: 3.4rem;
}

.status-color-chip-empty::before {
  border-radius: 6px;
  height: 1.25rem;
  width: 2.2rem;
}

.icon-button {
  align-items: center;
  display: inline-flex;
  height: 2.2rem;
  justify-content: center;
  padding: 0;
  width: 2.4rem;
}

.icon-button svg {
  height: 1.15rem;
  width: 1.15rem;
}

.settings-action-group {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  white-space: nowrap;
}

.settings-action-cell {
  min-width: 6.4rem;
  width: 6.4rem;
}

.parcel-details-toggle summary {
  cursor: pointer;
}

.parcel-note-preview {
  max-width: 18rem;
}

.pdf-export-map-wrap {
  background: #eef3f0;
  border: 1px solid #d8dee2;
  border-radius: 8px;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  position: relative;
}

.pdf-export-map {
  height: 100%;
}

.pdf-export-frame {
  border: 3px solid #dc3545;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.18);
  left: 50%;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
}

.pdf-print-map {
  background: #fff;
  height: 848px;
  left: 0;
  overflow: hidden;
  pointer-events: none;
  position: fixed;
  top: 0;
  width: 1200px;
  z-index: -1;
}

.pdf-print-map-brand,
.pdf-print-map-legend,
.pdf-print-map-title,
.pdf-print-map-list {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  color: #212529;
  font-family: Arial, sans-serif;
  position: absolute;
  z-index: 1000;
}

.pdf-print-map-title {
  font-size: 20px;
  font-weight: 700;
  left: 24px;
  padding: 8px 12px;
  top: 18px;
}

.pdf-print-map-brand {
  bottom: 18px;
  font-size: 18px;
  font-weight: 700;
  left: 24px;
  padding: 8px 12px;
}

.pdf-print-map-legend {
  bottom: 18px;
  font-size: 16px;
  max-width: 460px;
  padding: 10px 12px;
  right: 24px;
}

.pdf-print-map-list {
  font-size: 13px;
  max-height: 270px;
  max-width: 520px;
  overflow: hidden;
  padding: 10px 12px;
  right: 24px;
  top: 18px;
}

.pdf-print-map-list-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.pdf-print-map-list-item {
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  padding-top: 4px;
  margin-top: 4px;
}

.pdf-print-map-legend-title {
  font-weight: 700;
  margin-bottom: 8px;
}

.pdf-print-map-legend-item {
  align-items: center;
  display: flex;
  gap: 8px;
  margin-top: 5px;
}

.pdf-print-map-legend-color {
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 4px;
  display: inline-block;
  height: 15px;
  width: 28px;
}

@media (max-width: 767.98px) {
  .map-layout main {
    overflow: visible;
  }

  .map-workspace {
    min-height: auto;
  }

  .parcel-map-wrap {
    height: 58vh;
  }

  .parcel-map {
    min-height: 440px;
  }

  .map-search-panel {
    left: 4.5rem;
    max-width: none;
    right: 0.75rem;
    top: 0.75rem;
  }

  .map-filter-panel {
    left: 0.75rem;
    right: 0.75rem;
    top: 4.25rem;
    width: auto;
  }

  .parcel-panel {
    height: auto;
  }
}
