.peta-body {
  overflow: hidden;
  background: #e9efed;
}
.peta-workspace {
  height: 100vh;
  overflow: hidden;
}
.peta-topbar {
  min-height: 66px;
}
.peta-main {
  width: 100%;
  height: calc(100vh - 66px);
  margin: 0;
  padding: 0;
}
.peta-page {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #dce5e2;
  isolation: isolate;
}
.peta-map {
  position: absolute;
  inset: 0;
}
.peta-map .maplibregl-canvas {
  outline: none;
}
.peta-map .maplibregl-ctrl-bottom-right {
  right: 14px;
  bottom: 14px;
}
.peta-map .maplibregl-ctrl-group {
  overflow: hidden;
  border: 1px solid rgba(20, 40, 37, 0.12);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(16, 36, 32, 0.14);
}
.peta-map .maplibregl-ctrl-group button {
  width: 35px;
  height: 35px;
}
.peta-map .maplibregl-ctrl-attrib {
  color: #42514e;
  font-size: 9px;
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(10px);
}

.peta-toolbar {
  position: absolute;
  z-index: 12;
  top: 16px;
  left: 16px;
  width: min(360px, calc(100% - 32px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 22px;
  color: #10211e;
  background: rgba(251, 253, 252, 0.94);
  box-shadow:
    0 24px 54px rgba(24, 48, 44, 0.18),
    0 2px 8px rgba(24, 48, 44, 0.08);
  backdrop-filter: blur(18px) saturate(125%);
  animation: peta-control-in 0.42s cubic-bezier(0.2, 0.75, 0.25, 1) both;
}
.peta-toolbar-head {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 18px 15px;
  background: linear-gradient(
    125deg,
    rgba(231, 242, 239, 0.9),
    rgba(255, 255, 255, 0.96)
  );
}
.peta-toolbar-head p {
  margin: 0 0 2px;
  color: #4b756f;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
}
.peta-toolbar-head h1 {
  margin: 0;
  color: #10211e;
  font-size: 25px;
  line-height: 1;
  letter-spacing: -0.045em;
}
.peta-toolbar-head span {
  display: block;
  margin-top: 7px;
  color: #697875;
  font-size: 10px;
  font-weight: 600;
}
.peta-toolbar-head button {
  width: 35px;
  height: 35px;
  display: grid;
  flex: 0 0 35px;
  place-items: center;
  border: 1px solid rgba(31, 76, 69, 0.12);
  border-radius: 11px;
  color: #315f58;
  background: rgba(255, 255, 255, 0.8);
}
.peta-toolbar-head button:hover {
  color: #fff;
  background: #315f58;
}
.peta-toolbar-head button svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s ease;
}
.peta-toolbar:not(.is-collapsed) .peta-toolbar-head button svg {
  transform: rotate(180deg);
}
.peta-toolbar-body {
  padding: 15px 17px 16px;
  border-top: 1px solid rgba(36, 73, 67, 0.08);
}
.peta-toolbar.is-collapsed .peta-toolbar-body {
  display: none;
}
.peta-toolbar.is-collapsed {
  width: 250px;
}
.peta-toolbar.is-collapsed .peta-toolbar-head {
  min-height: 70px;
  padding-block: 13px;
}

.peta-search-field,
.peta-filter-grid label {
  display: grid;
  gap: 5px;
}
.peta-search-field {
  position: relative;
}
.peta-search-field > span,
.peta-filter-grid label > span {
  color: #64736f;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.peta-search-control {
  height: 42px;
  display: grid;
  grid-template-columns: 19px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  border: 1px solid #d7e1de;
  border-radius: 12px;
  padding: 0 5px 0 11px;
  background: #fff;
  transition:
    border 0.18s ease,
    box-shadow 0.18s ease;
}
.peta-search-control:focus-within {
  border-color: #5b938b;
  box-shadow: 0 0 0 3px rgba(49, 111, 102, 0.11);
}
.peta-search-field svg {
  width: 17px;
  fill: none;
  stroke: #66807b;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.peta-search-field input {
  min-width: 0;
  height: 38px;
  border: 0;
  outline: 0;
  color: #162824;
  background: transparent;
  font-size: 11px;
}
.peta-search-field input::placeholder {
  color: #98a5a2;
}
.peta-search-control > button {
  height: 31px;
  border: 0;
  border-radius: 9px;
  padding: 0 10px;
  color: #fff;
  background: #315f58;
  font-size: 9px;
  font-weight: 700;
}
.peta-search-control > button:hover {
  background: #204e47;
}
.peta-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.peta-filter-grid select {
  width: 100%;
  height: 39px;
  min-width: 0;
  border: 1px solid #d7e1de;
  border-radius: 11px;
  padding: 0 29px 0 10px;
  color: #263c38;
  outline: 0;
  background: #fff;
  font-size: 10px;
}
.peta-filter-grid select:focus {
  border-color: #5b938b;
  box-shadow: 0 0 0 3px rgba(49, 111, 102, 0.1);
}
.peta-filter-grid .peta-status-field {
  grid-column: 1 / -1;
}
.peta-toolbar-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e2e9e7;
}

.peta-toolbar-foot button {
  min-height: 36px;
  padding-inline: 5px;
}

.peta-active-filters button {
  min-height: 36px;
  font-size: var(--peta-type-caption);
}
.peta-toolbar-foot p {
  margin: 0;
  color: #4f625e;
  font-size: 9px;
  font-weight: 600;
}
.peta-toolbar-foot > div > span {
  display: block;
  margin-top: 3px;
  color: #277367;
  font-size: 8px;
  font-weight: 700;
}
.peta-toolbar-foot button {
  flex: 0 0 auto;
  border: 0;
  padding: 5px 0;
  color: #276a60;
  background: transparent;
  font-size: 9px;
  font-weight: 700;
}
.peta-toolbar-foot button:hover {
  color: #123e38;
  text-decoration: underline;
}

.peta-reset-view {
  position: absolute;
  z-index: 10;
  right: 16px;
  bottom: 153px;
  min-height: 37px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 12px;
  padding: 0 12px;
  color: #274c46;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(22, 46, 42, 0.14);
  backdrop-filter: blur(12px);
  font-size: 9px;
  font-weight: 700;
}
.peta-reset-view:hover {
  color: #fff;
  background: #315f58;
}
.peta-reset-view svg {
  width: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.peta-legend {
  position: absolute;
  z-index: 9;
  left: 16px;
  bottom: 16px;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 14px;
  padding: 10px 12px;
  color: #53635f;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 28px rgba(22, 46, 42, 0.13);
  backdrop-filter: blur(14px);
  font-size: 8px;
}
.peta-legend strong {
  grid-row: span 3;
  align-self: stretch;
  display: flex;
  align-items: center;
  padding-right: 10px;
  border-right: 1px solid #dde6e3;
  color: #223a36;
  font-size: 9px;
}
.peta-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.peta-legend i {
  width: 12px;
  height: 8px;
  border: 1px solid #506c68;
  border-radius: 3px;
  background: rgba(119, 153, 149, 0.72);
}
.peta-legend i.is-unallocated {
  border-color: #a47627;
  background: rgba(213, 168, 79, 0.75);
}
.peta-legend i.is-selected {
  border-color: #064e3b;
  background: #0f766e;
}

.peta-tooltip {
  --tooltip-accent: #9ebcff;
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  width: max-content;
  max-width: min(280px, calc(100vw - 24px));
  display: grid;
  gap: 3px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 13px;
  padding: 10px 12px;
  color: #fff;
  background: rgba(13, 31, 28, 0.94);
  box-shadow: 0 14px 36px rgba(10, 30, 26, 0.27);
  backdrop-filter: blur(12px);
}
.peta-tooltip b {
  font-size: 11px;
  letter-spacing: 0.02em;
}
.peta-tooltip > span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 9px;
}
.peta-tooltip small {
  display: flex;
  gap: 5px;
  margin-top: 3px;
  color: #8fb8b1;
  font-size: 8px;
}
.peta-tooltip small strong {
  overflow: hidden;
  color: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.peta-tooltip small.is-officer {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  margin-top: 0;
}
.peta-tooltip small.is-officer:first-of-type {
  margin-top: 5px;
}
.peta-tooltip small.is-officer span {
  font-weight: 750;
  letter-spacing: 0.04em;
}
.peta-tooltip small.is-primary {
  color: var(--tooltip-accent);
}
.peta-tooltip small.is-primary strong {
  font-size: 10px;
}
.peta-tooltip[data-mode="backlog"] {
  --tooltip-accent: #ffb09e;
}
.peta-tooltip[data-mode="assignment"] {
  --tooltip-accent: #9ed4ff;
}
.peta-tooltip[data-mode="usaha"] {
  --tooltip-accent: #f6b6df;
}
.peta-tooltip[data-mode="ratio"] {
  --tooltip-accent: #8f96a0;
}
.peta-tooltip[data-mode="allocation"] {
  --tooltip-accent: #c7d5ff;
}

.peta-detail {
  position: absolute;
  z-index: 14;
  top: 16px;
  right: 16px;
  bottom: 16px;
  width: min(365px, calc(100% - 32px));
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 24px;
  padding: 20px;
  color: #152925;
  background: rgba(252, 253, 253, 0.96);
  box-shadow: 0 28px 70px rgba(20, 44, 40, 0.24);
  backdrop-filter: blur(20px);
  opacity: 0;
  transform: translateX(28px);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}
.peta-detail.is-open {
  opacity: 1;
  transform: translateX(0);
}
.peta-detail > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.peta-detail header p {
  margin: 0 0 5px;
  color: #4c7b74;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.peta-detail header h2 {
  margin: 0;
  font-size: 27px;
  line-height: 1.05;
  letter-spacing: -0.045em;
}
.peta-detail header button {
  width: 34px;
  height: 34px;
  display: grid;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid #dce5e2;
  border-radius: 11px;
  color: #50645f;
  background: #fff;
}
.peta-detail header button:hover {
  color: #fff;
  background: #183d37;
}
.peta-detail header svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
}
.peta-detail-status {
  width: fit-content;
  margin-top: 15px;
  border-radius: 999px;
  padding: 6px 9px;
  color: #1d5f55;
  background: #e4f2ef;
  font-size: 8px;
  font-weight: 700;
}
.peta-detail-status::before {
  content: "";
  width: 6px;
  height: 6px;
  display: inline-block;
  margin-right: 6px;
  border-radius: 50%;
  background: #2d8a7e;
  box-shadow: 0 0 0 3px rgba(45, 138, 126, 0.11);
}
.peta-detail-status.is-unallocated {
  color: #8a5c15;
  background: #fbf0d9;
}
.peta-detail-status.is-unallocated::before {
  background: #cb9437;
  box-shadow: 0 0 0 3px rgba(203, 148, 55, 0.12);
}
.peta-detail-id {
  margin-top: 20px;
  border-radius: 17px;
  padding: 15px 16px;
  color: #fff;
  background: linear-gradient(135deg, #102c27, #1b5149);
  box-shadow: 0 13px 28px rgba(19, 69, 61, 0.17);
}
.peta-detail-id > span,
.peta-detail-id small span {
  display: block;
  color: #86b8af;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.peta-detail-id > b {
  display: block;
  margin-top: 4px;
  font-size: 17px;
  letter-spacing: 0.02em;
}
.peta-detail-id small {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.peta-detail-id small strong {
  font-size: 10px;
}
.peta-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  margin: 16px 0 0;
  border: 1px solid #e1e8e6;
  border-radius: 16px;
  background: #e1e8e6;
}
.peta-detail-grid div {
  min-width: 0;
  padding: 12px;
  background: #fff;
}
.peta-detail-grid dt {
  color: #788783;
  font-size: 8px;
  font-weight: 600;
}
.peta-detail-grid dd {
  overflow: hidden;
  margin: 4px 0 0;
  color: #203733;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
}
.peta-officer-card {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  border: 1px solid #dce6e3;
  border-radius: 17px;
  padding: 14px;
  background: #f2f7f5;
}
.peta-officer-card div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
}
.peta-officer-card span {
  color: #69807b;
  font-size: 8px;
  font-weight: 700;
}
.peta-officer-card b {
  color: #183d37;
  font-size: 11px;
}
.peta-detail-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 16px;
}
.peta-detail-metrics div {
  border: 1px solid #e0e8e5;
  border-radius: 15px;
  padding: 12px;
  background: #fff;
}
.peta-detail-metrics span {
  display: block;
  color: #788783;
  font-size: 8px;
}
.peta-detail-metrics b {
  display: block;
  margin-top: 3px;
  color: #183d37;
  font-size: 18px;
}

.peta-progress-card {
  margin-top: 16px;
  border: 1px solid #cfe1dd;
  border-radius: 18px;
  padding: 15px;
  background: linear-gradient(145deg, #f4faf8, #eef6f3);
}
.peta-progress-card > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}
.peta-progress-card > header div,
.peta-progress-card > header span {
  display: block;
}
.peta-progress-card > header span {
  color: #58746e;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.peta-progress-card > header b {
  display: block;
  margin-top: 3px;
  color: #123e36;
  font-size: 25px;
  letter-spacing: -0.04em;
}
.peta-progress-card > header small {
  color: #68817c;
  font-size: 9px;
  white-space: nowrap;
}
.peta-progress-card > header small strong {
  color: #174f46;
}
.peta-progress-track {
  height: 7px;
  overflow: hidden;
  margin-top: 12px;
  border-radius: 999px;
  background: #d9e8e4;
}
.peta-progress-track i {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #2d8a7e, #5ab8aa);
  transition: width 0.35s ease;
}
.peta-progress-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 12px;
}
.peta-progress-highlights div {
  min-width: 0;
  border-radius: 11px;
  padding: 9px;
  background: rgba(255, 255, 255, 0.75);
}
.peta-progress-highlights span,
.peta-progress-account > span {
  display: block;
  color: #71847f;
  font-size: 7px;
}
.peta-progress-highlights b {
  display: block;
  margin-top: 3px;
  color: #183d37;
  font-size: 12px;
}
.peta-progress-account {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid #d8e6e2;
}
.peta-progress-account strong {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 4px;
  color: #214a43;
  font-size: 8px;
  line-height: 1.5;
}
.peta-progress-card.is-missing {
  opacity: 0.65;
}
.peta-progress-breakdown {
  margin-top: 10px;
  border: 1px solid #dfe8e5;
  border-radius: 15px;
  background: #fff;
}
.peta-progress-breakdown summary {
  cursor: pointer;
  padding: 12px 13px;
  color: #31564f;
  font-size: 9px;
  font-weight: 700;
  list-style-position: inside;
}
.peta-progress-breakdown dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  margin: 0;
  border-top: 1px solid #e3ebe8;
  background: #e3ebe8;
}
.peta-progress-breakdown dl div {
  min-width: 0;
  padding: 10px 12px;
  background: #fbfdfc;
}
.peta-progress-breakdown dt {
  color: #75847f;
  font-size: 7px;
  line-height: 1.35;
}
.peta-progress-breakdown dd {
  margin: 3px 0 0;
  color: #173e37;
  font-size: 12px;
  font-weight: 700;
}

.peta-loading,
.peta-error {
  position: absolute;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(225, 234, 231, 0.9);
  backdrop-filter: blur(12px);
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}
.peta-loading.is-ready {
  opacity: 0;
  visibility: hidden;
}
.peta-loading-card,
.peta-error > div {
  width: min(330px, 100%);
  display: grid;
  justify-items: center;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  padding: 25px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 60px rgba(28, 53, 48, 0.16);
}
.peta-loading-mark {
  display: flex;
  gap: 5px;
  margin-bottom: 15px;
}
.peta-loading-mark i {
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: #32766b;
  animation: peta-loading 1s ease-in-out infinite;
}
.peta-loading-mark i:nth-child(2) {
  animation-delay: 0.12s;
}
.peta-loading-mark i:nth-child(3) {
  animation-delay: 0.24s;
}
.peta-loading-card b {
  color: #173c36;
  font-size: 14px;
}
.peta-loading-card p,
.peta-error p {
  margin: 5px 0 0;
  color: #6d7d79;
  font-size: 10px;
}
.peta-error > div > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #9b6211;
  background: #f8e7c8;
  font-size: 18px;
  font-weight: 700;
}
.peta-error h2 {
  margin: 13px 0 0;
  color: #273b37;
  font-size: 18px;
}
.peta-error button {
  height: 37px;
  margin-top: 16px;
  border: 0;
  border-radius: 11px;
  padding: 0 15px;
  color: #fff;
  background: #315f58;
  font-size: 10px;
  font-weight: 700;
}

@keyframes peta-control-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes peta-loading {
  0%,
  100% {
    opacity: 0.25;
    transform: translateY(2px);
  }
  50% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

@media (max-width: 760px) {
  .peta-body {
    overflow: hidden;
  }
  .peta-workspace {
    height: 100svh;
  }
  .peta-topbar {
    min-height: 58px;
    width: calc(100% - 20px);
  }
  .peta-topbar .topbar-brand > span:last-child {
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .peta-main {
    width: 100%;
    height: calc(100svh - 58px);
    padding: 0;
  }
  .peta-page {
    border-radius: 0;
  }
  .peta-toolbar {
    top: 10px;
    left: 10px;
    width: calc(100% - 20px);
    border-radius: 18px;
  }
  .peta-toolbar.is-collapsed {
    width: calc(100% - 20px);
  }
  .peta-toolbar-head {
    min-height: 72px;
    padding: 13px 14px;
  }

  .peta-toolbar-head button {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .peta-basemap-switch button {
    min-width: 66px;
    height: 44px;
  }
  .peta-toolbar-head h1 {
    font-size: 21px;
  }
  .peta-toolbar-body {
    max-height: min(66vh, 510px);
    overflow-y: auto;
    padding: 13px 14px 14px;
  }
  .peta-filter-grid {
    gap: 8px;
  }
  .peta-filter-grid select {
    height: 38px;
    font-size: 9px;
  }
  .peta-toolbar-foot {
    align-items: flex-start;
  }
  .peta-toolbar-foot p {
    max-width: 180px;
  }
  .peta-detail {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 58svh;
    border-width: 1px 0 0;
    border-radius: 25px 25px 0 0;
    padding: 19px 17px 88px;
    opacity: 0;
    transform: translateY(40px);
  }
  .peta-detail.is-open {
    opacity: 1;
    transform: translateY(0);
  }
  .peta-detail::before {
    content: "";
    width: 38px;
    height: 4px;
    display: block;
    margin: -8px auto 12px;
    border-radius: 999px;
    background: #ccd8d5;
  }
  .peta-detail header h2 {
    font-size: 24px;
  }
  .peta-reset-view {
    right: 10px;
    bottom: 149px;
  }
  .peta-legend {
    left: 10px;
    bottom: 70px;
    grid-template-columns: auto;
    gap: 5px;
    padding: 8px 10px;
  }
  .peta-legend strong {
    display: none;
  }
  .peta-map .maplibregl-ctrl-bottom-right {
    right: 10px;
    bottom: 65px;
  }
  .peta-map .maplibregl-ctrl-attrib {
    bottom: 55px;
  }
  .peta-tooltip {
    display: none;
  }
  .rail {
    width: min(326px, calc(100% - 20px));
  }
  .rail-icons {
    justify-content: space-between;
  }
}

@media (max-width: 430px) {
  .peta-topbar .button-progress {
    display: none;
  }
  .peta-filter-grid {
    grid-template-columns: 1fr;
  }
  .peta-filter-grid .peta-status-field {
    grid-column: auto;
  }
  .peta-toolbar-body {
    max-height: min(68vh, 530px);
  }
  .peta-detail-grid {
    grid-template-columns: 1fr;
  }
  .peta-detail {
    max-height: 62svh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .peta-toolbar,
  .peta-loading-mark i {
    animation: none !important;
  }
}

/* PETA follows the existing Main Page design system. */
.peta-body {
  background: var(--surface-2);
}
.peta-page {
  background: #e9edf2;
}
.peta-map .maplibregl-ctrl-group {
  border-color: var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(10, 10, 10, 0.1);
}
.peta-map .maplibregl-ctrl-attrib {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: none;
}

.peta-toolbar {
  width: min(390px, calc(100% - 32px));
  border-color: var(--border);
  border-radius: 22px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 14px 38px rgba(10, 10, 10, 0.1);
  backdrop-filter: none;
  animation: none;
}
.peta-toolbar-head {
  min-height: 82px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.peta-toolbar-head p {
  color: var(--brand-blue);
  letter-spacing: 0.12em;
}
.peta-toolbar-head h1 {
  color: var(--ink);
  font-weight: 650;
}
.peta-toolbar-head span {
  color: var(--muted);
}
.peta-toolbar-head button {
  border-color: var(--border);
  color: #4d535b;
  background: var(--surface-1);
}
.peta-toolbar-head button:hover {
  color: #fff;
  background: var(--ink);
}
.peta-toolbar-head button:focus-visible,
.peta-search-control > button:focus-visible,
.peta-result-actions button:focus-visible,
.peta-result-item:focus-visible,
.peta-active-filters button:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}
.peta-toolbar-body {
  max-height: calc(100vh - 132px);
  overflow-y: auto;
  border-top: 0;
  background: #fff;
  scrollbar-width: thin;
  scrollbar-color: #cfd3da transparent;
}

.peta-view-mode {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 13px;
}
.peta-view-mode > span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
}
.peta-view-mode > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid #cfd5de;
  border-radius: 11px;
  padding: 3px;
  background: #e9ecf1;
}
.peta-view-mode button {
  height: 30px;
  border: 0;
  border-radius: 8px;
  padding: 0 10px;
  color: #6e747c;
  background: transparent;
  font-size: 9px;
  font-weight: 700;
}
.peta-view-mode button.is-active {
  color: #fff;
  background: #101820;
  box-shadow: 0 3px 10px rgba(10, 10, 10, 0.17);
}
.peta-view-mode button:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}

.peta-field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.peta-field-label kbd {
  border: 1px solid #d8dce2;
  border-radius: 5px;
  padding: 1px 5px;
  color: #7a8088;
  background: var(--surface-1);
  font-family: inherit;
  font-size: 7px;
  font-weight: 600;
}
.peta-search-field > span,
.peta-filter-grid label > span {
  color: var(--muted);
}
.peta-search-control,
.peta-filter-grid select {
  border-color: var(--border);
  color: var(--ink);
  background: #fff;
}
.peta-search-control:focus-within,
.peta-filter-grid select:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(20, 86, 240, 0.1);
}
.peta-search-field svg {
  stroke: #727881;
}
.peta-search-field input {
  color: var(--ink);
}
.peta-search-field input::placeholder {
  color: #777d85;
  opacity: 1;
}
.peta-search-control > button {
  color: #fff;
  background: var(--ink);
}
.peta-search-control > button:hover {
  background: var(--brand-blue);
}
.peta-search-options {
  position: absolute;
  z-index: 90;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  max-height: min(330px, 48vh);
  max-height: min(330px, 48dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #d5dae2;
  border-radius: 14px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.99);
  box-shadow:
    0 20px 50px rgba(24, 30, 42, 0.2),
    0 3px 10px rgba(24, 30, 42, 0.09);
  scrollbar-color: #c7ccd4 transparent;
  scrollbar-width: thin;
}
.peta-search-options[hidden] {
  display: none;
}
.peta-search-option {
  width: 100%;
  min-height: 58px;
  display: grid;
  gap: 3px;
  border: 0;
  border-radius: 10px;
  padding: 9px 12px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.peta-search-option b {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}
.peta-search-option span {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  white-space: normal;
}
.peta-search-option:hover,
.peta-search-option.is-active {
  color: #11388d;
  background: #edf2ff;
}
.peta-search-option:hover span,
.peta-search-option.is-active span {
  color: #34579e;
}
.peta-filter-grid .peta-sort-field {
  grid-column: 1 / -1;
}

.peta-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}
.peta-active-filters button {
  min-height: 27px;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid rgba(20, 86, 240, 0.18);
  border-radius: 999px;
  padding: 0 9px;
  color: #12388d;
  background: #f3f6ff;
  font-size: 8px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.peta-active-filters button:hover {
  border-color: rgba(20, 86, 240, 0.36);
  background: #eaf0ff;
}

.peta-toolbar-foot {
  border-top-color: var(--border);
}
.peta-toolbar-foot p {
  color: #4d535b;
}
.peta-toolbar-foot > div > span {
  color: #123c91;
}
.peta-toolbar-foot button {
  color: var(--muted);
}
.peta-toolbar-foot button:hover {
  color: var(--ink);
}
.peta-result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 11px;
}
.peta-result-actions button {
  min-height: 35px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 9px;
  color: #33373c;
  background: #fff;
  font-size: 9px;
  font-weight: 650;
}
.peta-result-actions button:first-child {
  border-color: var(--ink);
  color: #fff;
  background: var(--ink);
}
.peta-result-actions button:hover {
  border-color: #c9ced6;
  background: var(--surface-1);
}
.peta-result-actions button:first-child:hover {
  border-color: var(--brand-blue);
  background: var(--brand-blue);
}
.peta-result-actions button:active,
.peta-search-control > button:active,
.peta-reset-view:active {
  transform: translateY(1px);
}
.peta-result-actions button:disabled {
  cursor: not-allowed;
  border-color: var(--border);
  color: #9a9fa6;
  background: var(--surface-1);
}
.peta-result-actions b {
  border-radius: 999px;
  padding: 2px 5px;
  color: var(--muted);
  background: #eef0f3;
  font-size: 7px;
}
.peta-results-panel {
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}
.peta-result-list {
  max-height: min(300px, 36vh);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cfd3da transparent;
}
.peta-result-item {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
  border: 0;
  border-bottom: 1px solid #eceef1;
  padding: 10px 11px;
  color: var(--ink);
  text-align: left;
  background: #fff;
}
.peta-result-item:last-child {
  border-bottom: 0;
}
.peta-result-item:hover {
  background: var(--surface-1);
}
.peta-result-item.is-selected {
  box-shadow: inset 3px 0 0 var(--brand-blue);
  background: #f3f6ff;
}
.peta-result-identity {
  min-width: 0;
}
.peta-result-identity b,
.peta-result-identity small,
.peta-result-value b,
.peta-result-value small {
  display: block;
}
.peta-result-identity b {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.peta-result-identity small {
  margin-top: 2px;
  color: #747a82;
  font-size: 7px;
  font-variant-numeric: tabular-nums;
}
.peta-result-officer {
  grid-column: 1;
  overflow: hidden;
  color: var(--muted);
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.peta-result-value {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  text-align: right;
}
.peta-result-value b {
  color: #123c91;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.peta-result-value small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 7px;
  font-variant-numeric: tabular-nums;
}
.peta-results-panel > p,
.peta-results-empty {
  margin: 0;
  color: var(--muted);
  font-size: 8px;
}
.peta-results-panel > p {
  border-top: 1px solid var(--border);
  padding: 8px 10px;
  background: var(--surface-1);
}
.peta-results-empty {
  padding: 20px 14px;
  text-align: center;
}

.peta-reset-view {
  border-color: var(--border);
  color: #33373c;
  background: #fff;
  box-shadow: 0 8px 22px rgba(10, 10, 10, 0.1);
  backdrop-filter: none;
}
.peta-reset-view:hover {
  color: #fff;
  background: var(--ink);
}
.peta-legend {
  border-color: var(--border);
  color: var(--muted);
  background: #fff;
  box-shadow: 0 8px 22px rgba(10, 10, 10, 0.09);
  backdrop-filter: none;
}
.peta-legend.is-progress {
  grid-template-columns: auto auto auto;
  max-width: 560px;
}
.peta-legend strong {
  border-right-color: var(--border);
  color: var(--ink);
}
.peta-legend i,
.peta-legend i.is-allocated,
.peta-legend i.is-unallocated,
.peta-legend i.is-selected {
  border-color: color-mix(in srgb, var(--legend-color) 78%, #0a0a0a);
  background: var(--legend-color);
}

.peta-tooltip {
  border-color: rgba(255, 255, 255, 0.14);
  color: #fff;
  background: rgba(10, 10, 10, 0.94);
  box-shadow: 0 14px 36px rgba(10, 10, 10, 0.25);
  backdrop-filter: none;
}
.peta-tooltip > span {
  color: rgba(255, 255, 255, 0.7);
}
.peta-tooltip small {
  color: #9ebcff;
}

.peta-detail {
  border-color: var(--border);
  color: var(--ink);
  background: #fff;
  box-shadow: 0 22px 58px rgba(10, 10, 10, 0.16);
  backdrop-filter: none;
}
.peta-detail header p {
  color: var(--brand-blue);
}
.peta-detail header button {
  border-color: var(--border);
  color: #50555d;
  background: var(--surface-1);
}
.peta-detail header button:hover {
  color: #fff;
  background: var(--ink);
}
.peta-detail-status {
  color: #123c91;
  background: #eef3ff;
}
.peta-detail-status::before {
  background: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(20, 86, 240, 0.1);
}
.peta-detail-status.is-unallocated {
  color: #a12d16;
  background: #fff0ec;
}
.peta-detail-status.is-unallocated::before {
  background: var(--brand-coral);
  box-shadow: 0 0 0 3px rgba(255, 85, 48, 0.11);
}
.peta-detail-id {
  background: var(--ink);
  box-shadow: 0 14px 30px rgba(10, 10, 10, 0.16);
}
.peta-detail-id > span,
.peta-detail-id small span {
  color: rgba(255, 255, 255, 0.56);
}
.peta-detail-grid {
  border-color: var(--border);
  background: var(--border);
}
.peta-detail-grid dt,
.peta-detail-metrics span,
.peta-progress-breakdown dt {
  color: var(--muted);
}
.peta-detail-grid dd,
.peta-detail-metrics b,
.peta-progress-breakdown dd {
  color: var(--ink);
}
.peta-officer-card {
  border-color: var(--border);
  background: var(--surface-1);
}
.peta-officer-card span {
  color: var(--muted);
}
.peta-officer-card b {
  color: var(--ink);
}
.peta-detail-metrics div,
.peta-progress-breakdown {
  border-color: var(--border);
}
.peta-progress-card {
  border-color: #dce8ff;
  background: linear-gradient(145deg, #f5faff, #edf5ff);
}
.peta-progress-card > header span,
.peta-progress-card > header small,
.peta-progress-highlights span,
.peta-progress-account > span {
  color: #657184;
}
.peta-progress-card > header b,
.peta-progress-card > header small strong,
.peta-progress-highlights b,
.peta-progress-account strong {
  color: #123c91;
}
.peta-progress-track {
  background: rgba(20, 86, 240, 0.12);
}
.peta-progress-track i {
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-cyan));
}
.peta-progress-account {
  border-top-color: #dce8ff;
}
.peta-progress-breakdown summary {
  color: #33373c;
}
.peta-progress-breakdown dl {
  border-top-color: var(--border);
  background: var(--border);
}
.peta-progress-breakdown dl div {
  background: #fafbfc;
}

.peta-loading,
.peta-error {
  background: rgba(241, 243, 245, 0.92);
  backdrop-filter: none;
}
.peta-loading-card,
.peta-error > div {
  border-color: var(--border);
  background: #fff;
  box-shadow: 0 20px 50px rgba(10, 10, 10, 0.12);
}
.peta-loading-mark i {
  background: var(--brand-blue);
}
.peta-loading-mark i:nth-child(2) {
  background: var(--brand-magenta);
}
.peta-loading-mark i:nth-child(3) {
  background: var(--brand-coral);
}
.peta-loading-card b,
.peta-error h2 {
  color: var(--ink);
}
.peta-loading-card p,
.peta-error p {
  color: var(--muted);
}
.peta-error > div > span {
  color: #a12d16;
  background: #fff0ec;
}
.peta-error button {
  background: var(--ink);
}
.peta-error button:hover {
  background: var(--brand-blue);
}

@media (max-width: 760px) {
  .peta-toolbar {
    top: 76px;
    width: calc(100% - 20px);
  }
  .peta-toolbar-body {
    max-height: min(70vh, 590px);
  }
  .peta-detail::before {
    background: #cfd3da;
  }
  .peta-legend.is-progress {
    max-width: calc(100% - 96px);
    grid-template-columns: auto auto;
    column-gap: 10px;
  }
}

@media (max-width: 430px) {
  .peta-view-mode {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .peta-filter-grid .peta-sort-field {
    grid-column: auto;
  }
  .peta-result-actions {
    grid-template-columns: 1fr;
  }
  .peta-toolbar-body {
    max-height: min(72vh, 610px);
  }
  .peta-legend.is-progress {
    grid-template-columns: auto auto;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .peta-toolbar,
  .peta-detail,
  .peta-tooltip,
  .peta-legend,
  .peta-reset-view {
    backdrop-filter: none;
  }
}

/* PETA flight-deck refinement: the map stays continuous behind two header islands. */
.peta-workspace {
  position: relative;
}
.peta-topbar {
  position: absolute;
  z-index: 30;
  top: 14px;
  right: 16px;
  left: 16px;
  width: auto;
  min-height: 0;
  margin: 0;
  background: transparent;
  backdrop-filter: none;
  pointer-events: none;
}
.peta-topbar .topbar-brand,
.peta-topbar .topbar-actions {
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 34px rgba(10, 10, 10, 0.12);
  backdrop-filter: blur(16px) saturate(1.1);
  pointer-events: auto;
}
.peta-topbar .topbar-brand {
  border-radius: 18px;
  padding: 7px 14px 7px 7px;
}
.peta-topbar .topbar-actions {
  border-radius: 18px;
  padding: 4px 4px 4px 13px;
}
.peta-basemap-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  border: 1px solid #dfe3e9;
  border-radius: 13px;
  padding: 3px;
  background: #eef0f3;
}
.peta-basemap-switch button {
  min-width: 56px;
  height: 30px;
  border: 0;
  border-radius: 9px;
  padding: 0 9px;
  color: #6a7078;
  background: transparent;
  font-size: 8px;
  font-weight: 750;
}
.peta-basemap-switch button.is-active {
  color: #fff;
  background: var(--ink);
  box-shadow: 0 4px 12px rgba(10, 10, 10, 0.16);
}
.peta-basemap-switch button:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}
.peta-brand-label {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
}
.peta-brand-label i {
  color: #9a9fa6;
  font-style: normal;
}
.peta-brand-label strong {
  font-weight: 750;
}
.peta-main {
  height: 100vh;
}
.peta-toolbar {
  top: 78px;
}
.peta-reset-view {
  bottom: 170px;
}

@media (min-width: 761px) {
  .peta-detail {
    top: 78px;
  }
}

.peta-view-mode {
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.peta-view-mode > .peta-view-mode-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  padding: 0;
  background: transparent;
}
.peta-view-mode-heading span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.peta-view-mode-heading small {
  border-radius: 999px;
  padding: 2px 6px;
  color: #4f5660;
  background: var(--surface-2);
  font-size: 7px;
  font-weight: 700;
}
.peta-view-mode > .peta-view-mode-options {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  border: 0;
  border-radius: 0;
  padding: 1px 1px 4px;
  background: transparent;
  scrollbar-width: none;
}
.peta-view-mode-options::-webkit-scrollbar {
  display: none;
}
.peta-view-mode-options button {
  flex: 0 0 auto;
  height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 10px;
  color: #5d636c;
  background: #fff;
  box-shadow: none;
  font-size: 8px;
  font-weight: 700;
}
.peta-view-mode-options button::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--mode-color, #1456f0);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mode-color) 15%, transparent);
}
.peta-view-mode-options button[data-color-mode="progress"] {
  --mode-color: #1456f0;
}
.peta-view-mode-options button[data-color-mode="backlog"] {
  --mode-color: #ff5530;
}
.peta-view-mode-options button[data-color-mode="assignment"] {
  --mode-color: #3daeff;
}
.peta-view-mode-options button[data-color-mode="usaha"] {
  --mode-color: #ea5ec1;
}
.peta-view-mode-options button[data-color-mode="ratio"] {
  --mode-color: #1456f0;
}
.peta-view-mode-options button[data-color-mode="allocation"] {
  --mode-color: #6f8fdb;
}
.peta-view-mode-options button.is-active {
  border-color: var(--ink);
  color: #fff;
  background: var(--ink);
  box-shadow: 0 5px 14px rgba(10, 10, 10, 0.15);
}
.peta-view-mode-options button.is-active::before {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}
.peta-view-mode > p {
  margin: 0;
  color: #626973;
  font-size: 8px;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .peta-topbar {
    top: 10px;
    right: 10px;
    left: 10px;
    width: auto;
    min-height: 0;
  }
  .peta-topbar .topbar-brand,
  .peta-topbar .topbar-actions {
    min-height: 46px;
  }
  .peta-main {
    height: 100svh;
  }
  .peta-toolbar {
    top: 68px;
  }
  .peta-reset-view {
    bottom: 184px;
  }
}

@media (max-width: 430px) {
  .peta-topbar {
    justify-content: flex-start;
  }
  .peta-topbar .topbar-actions {
    display: flex;
    padding: 3px;
  }
  .peta-topbar .peta-brand-label {
    max-width: none;
  }
  .peta-brand-label > span,
  .peta-brand-label > i {
    display: none;
  }
  .peta-basemap-switch button {
    min-width: 50px;
    height: 31px;
    padding-inline: 7px;
  }
  .peta-view-mode-options button {
    height: 29px;
    padding-inline: 8px;
  }
}

/* Custom filter select: native values remain the data source, UI is fully themed. */
.peta-filter-field {
  min-width: 0;
  display: grid;
  gap: 6px;
}
.peta-filter-field > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.peta-native-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  pointer-events: none !important;
  white-space: nowrap !important;
}
.peta-select {
  min-width: 0;
}
.peta-select-trigger {
  width: 100%;
  height: 43px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 11px 0 13px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 10px;
  text-align: left;
  transition:
    border-color 0.16s ease,
    background-color 0.16s ease,
    box-shadow 0.16s ease;
}
.peta-select-trigger:hover {
  border-color: #b9c0ca;
  background: #fafbfc;
}
.peta-select-trigger:focus-visible,
.peta-select.is-open .peta-select-trigger {
  border-color: var(--brand-blue);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(20, 86, 240, 0.1);
}
.peta-select-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.peta-select-chevron {
  position: relative;
  width: 18px;
  height: 18px;
}
.peta-select-chevron::before,
.peta-select-chevron::after {
  content: "";
  position: absolute;
  top: 8px;
  width: 6px;
  height: 1.5px;
  border-radius: 999px;
  background: #343941;
  transition: transform 0.16s ease;
}
.peta-select-chevron::before {
  left: 3px;
  transform: rotate(45deg);
}
.peta-select-chevron::after {
  right: 3px;
  transform: rotate(-45deg);
}
.peta-select.is-open .peta-select-chevron::before {
  transform: rotate(-45deg);
}
.peta-select.is-open .peta-select-chevron::after {
  transform: rotate(45deg);
}
.peta-select-menu {
  position: fixed;
  z-index: 80;
  max-height: min(292px, calc(100svh - 16px));
  overflow: hidden;
  border: 1px solid #d5dae2;
  border-radius: 14px;
  padding: 5px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 18px 45px rgba(24, 30, 42, 0.16),
    0 3px 10px rgba(24, 30, 42, 0.08);
}
.peta-select-menu[hidden] {
  display: none;
}
.peta-select-search {
  padding: 3px 3px 6px;
}
.peta-select-search[hidden] {
  display: none;
}
.peta-select-search input {
  width: 100%;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 9px;
  outline: 0;
  padding: 0 10px;
  color: var(--ink);
  background: var(--surface-1);
  font: inherit;
  font-size: 9px;
}
.peta-select-search input::placeholder {
  color: #727881;
  opacity: 1;
}
.peta-select-search input:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(20, 86, 240, 0.1);
}
.peta-select-options {
  max-height: 238px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1px;
  scrollbar-color: #c7ccd4 transparent;
  scrollbar-width: thin;
}
.peta-select-option {
  width: 100%;
  min-height: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 9px;
  padding: 7px 8px 7px 10px;
  color: #444a53;
  background: transparent;
  font: inherit;
  font-size: 9px;
  line-height: 1.3;
  text-align: left;
}
.peta-select-option[hidden],
.peta-select-empty[hidden] {
  display: none;
}
.peta-select-option > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.peta-select-option:hover,
.peta-select-option:focus-visible {
  outline: 0;
  color: var(--ink);
  background: var(--surface-2);
}
.peta-select-option:active {
  transform: translateY(1px);
}
.peta-select-option.is-selected {
  color: #11388d;
  background: #edf2ff;
  font-weight: 700;
}
.peta-select-check {
  color: var(--brand-blue);
  font-size: 12px;
  font-weight: 800;
  opacity: 0;
  text-align: center;
}
.peta-select-option.is-selected .peta-select-check {
  opacity: 1;
}
.peta-select-empty {
  margin: 0;
  padding: 18px 10px;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

@media (max-width: 760px) {
  .peta-select-trigger {
    height: 43px;
    font-size: 10px;
  }
  .peta-select-option {
    min-height: 38px;
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .peta-select-trigger,
  .peta-select-chevron::before,
  .peta-select-chevron::after {
    transition: none;
  }
}

/* PETA readability pass: compact enough for map work, legible at a glance. */
.peta-body {
  --peta-type-caption: 11px;
  --peta-type-control: 13px;
  --peta-type-emphasis: 16px;
  --peta-type-title: 28px;
}

.peta-toolbar {
  --peta-toolbar-top: 78px;
  --peta-toolbar-bottom-gap: 16px;
  top: var(--peta-toolbar-top);
  width: min(420px, calc(100% - 32px));
  max-height: calc(
    100vh - var(--peta-toolbar-top) - var(--peta-toolbar-bottom-gap)
  );
  max-height: calc(
    100dvh - var(--peta-toolbar-top) - var(--peta-toolbar-bottom-gap)
  );
  display: flex;
  flex-direction: column;
}

.peta-toolbar-head {
  flex: 0 0 auto;
  min-height: 92px;
  padding: 18px 20px 16px;
}

.peta-toolbar-body {
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.peta-toolbar-head p,
.peta-toolbar-head span,
.peta-view-mode-heading span,
.peta-search-field > span,
.peta-filter-field > span,
.peta-toolbar-foot p,
.peta-toolbar-foot > div > span,
.peta-toolbar-foot button,
.peta-results-panel > p,
.peta-results-empty {
  font-size: var(--peta-type-caption);
  line-height: 1.4;
}

.peta-toolbar-head h1 {
  font-size: var(--peta-type-title);
  line-height: 1.08;
}

.peta-toolbar-head button,
.peta-detail header button {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
}

.peta-view-mode-heading small,
.peta-field-label kbd,
.peta-result-actions b {
  font-size: 10px;
}

.peta-view-mode-options button {
  width: 100%;
  height: 36px;
  justify-content: center;
  padding-inline: 12px;
  font-size: 11px;
}

.peta-view-mode > .peta-view-mode-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  overflow: visible;
  padding: 1px;
}

.peta-view-mode > p {
  font-size: var(--peta-type-caption);
  line-height: 1.5;
}

.peta-search-control {
  height: 48px;
  grid-template-columns: 20px minmax(0, 1fr) auto;
}

.peta-search-field input,
.peta-select-trigger {
  font-size: var(--peta-type-control);
}

.peta-search-field input {
  height: 44px;
}

.peta-search-control > button {
  min-width: 48px;
  height: 38px;
  padding-inline: 12px;
  font-size: 12px;
}

.peta-filter-grid {
  gap: 12px;
  margin-top: 15px;
}

.peta-filter-field {
  gap: 7px;
}

.peta-select-trigger {
  height: 48px;
  padding-inline: 14px 12px;
}

.peta-select-search input {
  height: 40px;
  font-size: 12px;
}

.peta-select-option {
  min-height: 42px;
  padding: 9px 10px 9px 12px;
  font-size: 12px;
}

.peta-select-empty {
  font-size: 12px;
}

.peta-toolbar-foot {
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
}

.peta-result-actions button {
  min-height: 44px;
  font-size: 12px;
}

.peta-result-item {
  padding: 12px 13px;
}

.peta-result-identity b {
  font-size: 13px;
}

.peta-result-identity small,
.peta-result-officer,
.peta-result-value small {
  font-size: var(--peta-type-caption);
  line-height: 1.4;
}

.peta-result-value b {
  font-size: var(--peta-type-emphasis);
}

.peta-basemap-switch button {
  min-width: 62px;
  height: 34px;
  font-size: var(--peta-type-caption);
}

.peta-reset-view {
  min-height: 42px;
  font-size: 12px;
}

.peta-legend {
  gap: 9px 12px;
  padding: 11px 13px;
  font-size: var(--peta-type-caption);
  line-height: 1.35;
}

.peta-map .maplibregl-ctrl-attrib {
  font-size: 10px;
}

.peta-tooltip {
  max-width: min(330px, calc(100vw - 24px));
  gap: 5px;
  border-radius: 15px;
  padding: 13px 15px;
}

.peta-tooltip b {
  font-size: 14px;
}

.peta-tooltip > span {
  font-size: 12px;
  line-height: 1.4;
}

.peta-tooltip small {
  gap: 8px;
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.35;
}

.peta-tooltip small.is-officer {
  grid-template-columns: 52px minmax(0, 1fr);
}

.peta-tooltip small.is-primary strong {
  font-size: 13px;
}

.peta-detail {
  width: min(420px, calc(100% - 32px));
  padding: 22px;
}

.peta-detail header p,
.peta-detail-status,
.peta-detail-id > span,
.peta-detail-id small span,
.peta-detail-grid dt,
.peta-officer-card span,
.peta-progress-card > header span,
.peta-progress-highlights span,
.peta-progress-account > span,
.peta-progress-breakdown dt,
.peta-detail-metrics span {
  font-size: var(--peta-type-caption);
  line-height: 1.4;
}

.peta-detail header h2 {
  font-size: var(--peta-type-title);
  line-height: 1.08;
}

.peta-detail-status {
  padding: 7px 11px;
}

.peta-detail-id > b {
  font-size: 20px;
}

.peta-detail-id small strong,
.peta-detail-grid dd,
.peta-officer-card b,
.peta-progress-card > header small,
.peta-progress-account strong {
  font-size: 13px;
  line-height: 1.4;
}

.peta-detail-grid div,
.peta-progress-breakdown dl div {
  padding: 13px 14px;
}

.peta-progress-card > header b {
  font-size: 28px;
}

.peta-progress-highlights b {
  font-size: var(--peta-type-emphasis);
}

.peta-progress-breakdown summary {
  min-height: 46px;
  padding: 14px;
  font-size: 13px;
  line-height: 1.35;
}

.peta-progress-breakdown dd {
  font-size: var(--peta-type-emphasis);
}

.peta-detail-metrics b {
  font-size: 21px;
}

@media (max-width: 760px) {
  .peta-body {
    --peta-type-caption: 12px;
    --peta-type-control: 14px;
    --peta-type-emphasis: 17px;
    --peta-type-title: 26px;
  }

  .peta-toolbar {
    --peta-toolbar-top: 76px;
    --peta-toolbar-bottom-gap: 72px;
    top: var(--peta-toolbar-top);
    width: calc(100% - 20px);
  }

  .peta-toolbar-head {
    min-height: 84px;
    padding: 15px 16px;
  }

  .peta-toolbar-head button {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .peta-basemap-switch button {
    min-width: 66px;
    height: 44px;
  }

  .peta-toolbar-body {
    padding: 15px 16px 17px;
  }

  .peta-view-mode-options button {
    height: 44px;
    font-size: 12px;
  }

  .peta-search-control > button,
  .peta-result-actions button {
    min-height: 44px;
  }

  .peta-toolbar-foot button,
  .peta-active-filters button,
  .peta-reset-view {
    min-height: 44px;
  }

  .peta-map .maplibregl-ctrl-group button {
    width: 44px;
    height: 44px;
  }

  .peta-select-trigger {
    height: 48px;
    font-size: var(--peta-type-control);
  }

  .peta-select-option {
    min-height: 44px;
    font-size: 13px;
  }

  .peta-detail {
    z-index: 60;
    width: 100%;
    max-height: 68svh;
    padding: 20px 18px 92px;
  }

  .peta-detail header button {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .peta-body .rail {
    transition:
      opacity 0.18s ease,
      transform 0.18s ease;
  }

  .peta-body.peta-detail-open .rail {
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, 18px);
  }

  .peta-progress-breakdown summary {
    min-height: 48px;
  }
}

@media (max-width: 430px) {
  .peta-filter-grid {
    grid-template-columns: 1fr;
  }

  .peta-detail-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .peta-body .rail {
    transition: none;
  }
}
