:root {
  --ink: #17211d;
  --forest: #153b2d;
  --green: #1b6f50;
  --lime: #c9f65b;
  --magenta: #d4145a;
  --paper: #f4f3ee;
  --white: #fff;
  --muted: #6c7772;
  --line: #dfe3df;
  --shadow: 0 16px 38px rgba(24, 42, 34, 0.08);
}
* {
  box-sizing: border-box;
}
html {
  background: var(--paper);
}
body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, Aptos, "Segoe UI", Arial, sans-serif;
  background: var(--paper);
}
h1,
h2,
h3,
strong {
  font-family: Inter, Aptos, "Segoe UI", Arial, sans-serif;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px 1fr;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--ink);
  color: #fff;
  padding: 28px 20px 18px;
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  font: 800 21px Inter, Aptos, "Segoe UI", Arial, sans-serif;
}
.brand strong,
.brand small {
  display: block;
}
.brand strong {
  font-size: 19px;
  letter-spacing: 0.18em;
}
.brand small {
  font-size: 9px;
  letter-spacing: 0.24em;
  color: #aab7b1;
}
.primary-nav {
  margin-top: 48px;
  display: grid;
  gap: 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 13px;
  border-radius: 9px;
  color: #cad3cf;
  font-weight: 600;
  font-size: 14px;
}
.nav-item:hover {
  background: #ffffff0d;
  color: #fff;
}
.nav-item span {
  width: 22px;
  font-size: 18px;
  text-align: center;
}
.nav-label {
  font-size: 9px;
  letter-spacing: 0.18em;
  color: #71817a;
  font-weight: 700;
  text-transform: uppercase;
  margin: 25px 13px 6px;
}
.account-card {
  margin-top: auto;
  border-top: 1px solid #ffffff16;
  padding-top: 17px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #315144;
  color: var(--lime);
  font-size: 12px;
  font-weight: 800;
}
.account-copy {
  min-width: 0;
  flex: 1;
}
.account-copy strong,
.account-copy small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-copy strong {
  font-size: 11px;
}
.account-copy small {
  font-size: 9px;
  color: #91a099;
  margin-top: 2px;
}
.icon-button {
  border: 0;
  background: transparent;
  color: #9aaca4;
  cursor: pointer;
  font-size: 18px;
  padding: 7px;
}
.icon-button:hover {
  color: #fff;
}
.main {
  padding: 34px 42px 50px;
  min-width: 0;
}
.messages {
  position: fixed;
  right: 25px;
  top: 20px;
  z-index: 3000;
  display: grid;
  gap: 8px;
  max-width: 440px;
}
.message {
  background: #fff;
  padding: 13px 17px;
  border-radius: 10px;
  box-shadow: 0 12px 35px #0002;
  border-left: 4px solid var(--green);
  font-size: 14px;
}
.message.error {
  border-color: #cf3b3b;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 800;
}
.eyebrow.light {
  color: var(--lime);
}
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.page-header h1 {
  font-size: 36px;
  line-height: 1;
  margin: 0;
  letter-spacing: -0.035em;
}
.subhead,
.panel-head p {
  color: var(--muted);
  margin: 8px 0 0;
  font-size: 14px;
}
.button {
  border: 1px solid transparent;
  border-radius: 8px;
  min-height: 40px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.button-primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 8px 20px rgba(27, 111, 80, 0.18);
}
.button-primary:hover {
  background: #145e43;
}
.button-ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}
.button-danger {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #b42336;
}
.button-full {
  width: 100%;
}
.button-small {
  min-height: 32px;
  padding: 0 12px;
  font-size: 11px;
}
.button-stack {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.panel-head {
  padding: 20px 22px;
  border-bottom: 1px solid #edf0ed;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.panel-head h2 {
  font-size: 16px;
  margin: 0;
}
.stat-row {
  display: grid;
  grid-template-columns: 180px 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.stat-row article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 17px 19px;
}
.stat-row span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.13em;
  font-weight: 800;
}
.stat-row strong {
  display: block;
  margin-top: 7px;
  font-size: 25px;
}
.stat-row .stat-text {
  font-size: 15px;
}
.project-panel {
  padding-bottom: 22px;
}
.project-result-count { color: var(--muted); font-size: .78rem; white-space: nowrap; }
.project-result-count b { color: var(--green); }
.project-filter-form {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) repeat(3, minmax(145px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin: 0 20px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8faf8;
}
.project-filter-form label span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 9px; font-weight: 800; }
.project-filter-form input,
.project-filter-form select { width: 100%; min-height: 38px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 8px 10px; }
.project-filter-actions { display: flex; gap: 7px; align-items: center; }
.project-grid {
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.project-card {
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  background: #fff;
  transition: 0.2s;
}
.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px #1f332914;
}
.project-map-stub {
  height: 110px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(130deg, #d8e1d9, #f0eee3);
}
.project-map-stub:before,
.project-map-stub:after,
.project-map-stub i {
  content: "";
  position: absolute;
  background: #fff9;
  transform: rotate(-20deg);
}
.project-map-stub:before {
  width: 180%;
  height: 11px;
  left: -40%;
  top: 35px;
}
.project-map-stub:after {
  height: 180%;
  width: 12px;
  top: -40%;
  left: 55%;
}
.project-map-stub i:nth-of-type(1) {
  width: 140%;
  height: 5px;
  left: -20%;
  top: 76px;
}
.project-map-stub i:nth-of-type(2) {
  height: 140%;
  width: 5px;
  left: 22%;
  top: -20%;
}
.project-map-stub i:nth-of-type(3) {
  height: 120%;
  width: 4px;
  left: 78%;
  top: -10%;
}
.project-map-stub b {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #17211dd9;
  color: #fff;
  border-radius: 5px;
  padding: 4px 7px;
  font-size: 8px;
  letter-spacing: 0.1em;
}
.map-pin {
  position: absolute;
  z-index: 2;
  left: 49%;
  top: 45%;
  color: var(--magenta);
  font-size: 24px;
}
.project-card-body {
  padding: 16px;
}
.project-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.project-card-top small {
  color: #87918c;
  font-size: 10px;
}
.project-card h3 {
  font-size: 15px;
  margin: 14px 0 4px;
}
.project-card p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-meta {
  border-top: 1px solid #edf0ed;
  margin-top: 14px;
  padding-top: 12px;
  display: flex;
  gap: 15px;
  font-size: 10px;
  color: #5d6b65;
}
.status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  background: #edf0ed;
  color: #56625c;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.status-active {
  background: #e4f7ed;
  color: #14724d;
}
.status-on_hold {
  background: #fff5d6;
  color: #946700;
}
.status-complete {
  background: #e7efff;
  color: #3159a8;
}
.status-archived {
  background: #eef0ef;
  color: #717b77;
}
.empty-state {
  text-align: center;
  padding: 65px 20px;
  color: var(--muted);
}
.empty-state > div {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #edf5f0;
  color: var(--green);
  font-size: 25px;
  margin: 0 auto 15px;
}
.empty-state h3 {
  color: var(--ink);
  margin: 0 0 7px;
}
.empty-state .button {
  margin-top: 15px;
}
.empty-state.small {
  padding: 45px 20px;
}
.form-panel {
  padding: 26px;
}
.form-panel.narrow {
  max-width: 680px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 19px 22px;
}
.field-wide {
  grid-column: 1/-1;
}
.field label,
.form-panel > p label,
.login-card label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 7px;
  color: #3c4c44;
}
.field input,
.field select,
.field textarea,
.form-panel > p input,
.form-panel > p select,
.form-panel > p textarea,
.login-card input {
  width: 100%;
  border: 1px solid #d8ded9;
  background: #fbfcfa;
  border-radius: 8px;
  padding: 10px 11px;
  color: var(--ink);
  outline: none;
}
.field input:focus,
.field select:focus,
.field textarea:focus,
.form-panel input:focus,
.form-panel select:focus,
.form-panel textarea:focus,
.login-card input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(27, 111, 80, 0.1);
}
.field small {
  color: var(--muted);
}
.field em {
  display: block;
  color: #b42336;
  font-size: 11px;
  margin-top: 5px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  border-top: 1px solid #edf0ed;
  padding-top: 21px;
  margin-top: 24px;
}
.form-panel.compact {
  padding: 22px;
}
.form-panel.compact .panel-head {
  margin: -22px -22px 20px;
}
.form-panel > p {
  margin: 0 0 14px;
}
.form-panel > p label {
  font-size: 11px;
}
.form-panel > p input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
}
.form-panel .helptext {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
}
.form-error {
  background: #fff0f0;
  color: #9c2d2d;
  border-radius: 7px;
  padding: 10px 12px;
  margin-bottom: 14px;
  font-size: 12px;
}
.split-layout {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 18px;
}
.list-row,
.dataset-card,
.file-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 20px;
  border-bottom: 1px solid #edf0ed;
}
.list-row:last-child,
.dataset-card:last-child,
.file-row:last-child {
  border-bottom: 0;
}
.list-row > div,
.dataset-card > div,
.file-row > div {
  flex: 1;
}
.list-row strong,
.list-row small,
.dataset-card strong,
.dataset-card small,
.file-row strong,
.file-row small {
  display: block;
}
.list-row small,
.dataset-card small,
.file-row small {
  color: var(--muted);
  font-size: 10px;
  margin-top: 3px;
}
.empty-mini {
  padding: 24px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.empty-mini.accent {
  background: #f0f7f3;
  border-radius: 8px;
  margin: 18px 0;
  text-align: left;
  color: #395a4b;
}
.table-panel {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  text-align: left;
  padding: 15px 18px;
  border-bottom: 1px solid #edf0ed;
  font-size: 12px;
}
th {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.1em;
}
.text-link {
  color: var(--green);
  font-weight: 700;
}
.workspace-header {
  margin: -34px -42px 24px;
  padding: 22px 42px 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.breadcrumb {
  display: flex;
  gap: 8px;
  color: #7c8782;
  font-size: 10px;
  margin-bottom: 15px;
}
.breadcrumb a {
  color: var(--green);
}
.workspace-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.workspace-title h1 {
  font-size: 27px;
  letter-spacing: -0.03em;
  margin: 7px 0 2px;
}
.workspace-title p {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}
.tabs {
  display: flex;
  gap: 22px;
  overflow: auto;
  margin-top: 24px;
}
.tabs a {
  padding: 0 0 13px;
  color: #68736e;
  font-size: 12px;
  font-weight: 700;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.tabs a.active {
  color: var(--green);
  border-color: var(--green);
}
.tabs b {
  font: 700 8px Inter, Aptos, "Segoe UI", Arial, sans-serif;
  background: #edf1ee;
  padding: 2px 5px;
  border-radius: 999px;
}
.workspace-grid {
  display: grid;
  gap: 18px;
}
.overview-grid {
  grid-template-columns: minmax(0, 1.7fr) 340px;
}
.survey-grid,
.boundary-grid {
  grid-template-columns: minmax(0, 1.7fr) 380px;
}
.output-grid {
  grid-template-columns: 400px minmax(0, 1fr);
}
.map-panel {
  position: relative;
  overflow: hidden;
}
.workspace-map {
  height: 610px;
  z-index: 1;
}
.workspace-map.tall,
.boundary-map {
  height: 680px;
}
.map-overlay {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 500;
  background: #17211de8;
  color: #fff;
  border-radius: 9px;
  padding: 9px 13px;
}
.map-overlay strong,
.map-overlay span {
  display: block;
}
.map-overlay strong {
  font-size: 20px;
}
.map-overlay span {
  font-size: 9px;
  color: #b9c7c1;
}
.overview-side,
.tool-column {
  display: grid;
  gap: 16px;
  align-content: start;
}
.summary-card dl {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  margin: 0;
  padding: 7px 22px 18px;
}
.summary-card dt,
.summary-card dd {
  padding: 11px 0;
  border-bottom: 1px solid #edf0ed;
  font-size: 11px;
}
.summary-card dt {
  color: var(--muted);
}
.summary-card dd {
  margin: 0;
  text-align: right;
  font-weight: 700;
}
.summary-card dd a {
  color: var(--green);
}
.next-actions {
  padding-bottom: 8px;
}
.next-actions > a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid #edf0ed;
}
.next-actions > a:last-child {
  border: 0;
}
.next-actions > a > span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #edf5f1;
  display: grid;
  place-items: center;
  color: var(--green);
  font-size: 9px;
  font-weight: 800;
}
.next-actions > a > div {
  flex: 1;
}
.next-actions strong,
.next-actions small {
  display: block;
}
.next-actions strong {
  font-size: 11px;
}
.next-actions small {
  color: var(--muted);
  font-size: 9px;
  margin-top: 2px;
}
.panel-head.floating {
  position: absolute;
  z-index: 500;
  top: 15px;
  left: 15px;
  background: #fff;
  border: 0;
  border-radius: 9px;
  padding: 10px 13px;
  box-shadow: 0 8px 20px #0002;
}
.dataset-card {
  padding: 13px 18px;
}
.map-toolbar-note {
  position: absolute;
  z-index: 500;
  left: 55px;
  top: 14px;
  background: #17211ddd;
  color: #fff;
  border-radius: 7px;
  padding: 9px 12px;
  font-size: 10px;
}
.boundary-status {
  padding: 22px;
}
.boundary-status h2 {
  font-size: 22px;
  margin: 0 0 10px;
}
.boundary-status > p:not(.eyebrow):not(.saved-state) {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 18px 0;
}
.metric-grid > div {
  background: #f4f7f5;
  border-radius: 8px;
  padding: 14px;
}
.metric-grid strong,
.metric-grid span {
  display: block;
}
.metric-grid strong {
  font-size: 20px;
}
.metric-grid span {
  font-size: 9px;
  color: var(--muted);
}
.saved-state {
  font-size: 10px;
  color: var(--green);
  font-weight: 700;
}
.boundary-status .button {
  margin-top: 8px;
}
.inline-feedback {
  font-size: 11px;
  color: var(--green);
  font-weight: 700;
  margin-top: 10px;
}
.guidance {
  padding: 19px;
}
.guidance h3 {
  font-size: 13px;
  margin: 0;
}
.guidance ul {
  padding-left: 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}
.output-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}
.map-output {
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}
.map-output img {
  display: block;
  width: 100%;
  aspect-ratio: 1.45;
  object-fit: cover;
}
.map-output > div {
  padding: 12px;
}
.map-output strong,
.map-output small {
  display: block;
}
.map-output strong {
  font-size: 12px;
}
.map-output small {
  font-size: 9px;
  color: var(--muted);
  margin-top: 3px;
}
.hero-tool {
  padding: 30px;
  background: var(--ink);
  color: #fff;
}
.hero-tool h2 {
  font-size: 26px;
  margin: 8px 0;
}
.hero-tool > p:not(.eyebrow) {
  color: #b8c4bf;
  line-height: 1.7;
  font-size: 13px;
}
.tool-spec {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 25px 0;
}
.tool-spec span {
  background: #ffffff12;
  border: 1px solid #ffffff19;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 8px;
  color: #d9e4df;
}
.file-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #edf5f1;
  color: var(--green);
  display: grid;
  place-items: center;
  font-size: 8px;
  font-weight: 800;
}
.file-row .button {
  margin-left: auto;
}
.file-row form {
  margin: 0;
}
.icon-button.danger {
  color: #b42336;
}
.export-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 20px;
}
.export-grid article {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
}
.export-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #edf5f1;
  color: var(--green);
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 800;
}
.export-grid h3 {
  font-size: 14px;
  margin: 16px 0 6px;
}
.export-grid p {
  font-size: 11px;
  color: var(--muted);
  min-height: 34px;
}
.public-link-card {
  padding: 24px;
}
.link-visual {
  height: 230px;
  border-radius: 10px;
  background: linear-gradient(145deg, #1a3f31, #17211d);
  color: #fff;
  padding: 25px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.link-visual span {
  font: 800 23px Inter, Aptos, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0.22em;
  color: var(--lime);
}
.link-visual strong {
  font-size: 25px;
  line-height: 1.2;
  margin: 17px 0;
}
.link-visual small {
  color: #9fb2aa;
}
.public-link-card > h2 {
  font-size: 18px;
  margin: 21px 0 5px;
}
.public-link-card > p {
  color: var(--muted);
  font-size: 11px;
}
.copy-field {
  display: flex;
  margin: 17px 0;
}
.copy-field input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px 0 0 8px;
  padding: 10px;
  font-size: 10px;
}
.copy-field button {
  border: 0;
  background: var(--ink);
  color: #fff;
  border-radius: 0 8px 8px 0;
  padding: 0 15px;
  cursor: pointer;
}
.muted {
  color: var(--muted);
}
.login-body {
  background: var(--ink);
}
.login-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
}
.login-brand-panel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #10271f, #1a523c);
  color: #fff;
  padding: 42px 54px;
  display: flex;
  flex-direction: column;
}
.login-brand-panel:before {
  content: "";
  position: absolute;
  width: 580px;
  height: 580px;
  border: 1px solid #ffffff12;
  border-radius: 50%;
  right: -180px;
  bottom: -220px;
  box-shadow:
    0 0 0 90px #ffffff08,
    0 0 0 180px #ffffff05;
}
.brand-light {
  position: relative;
  z-index: 1;
}
.login-intro {
  position: relative;
  z-index: 1;
  margin: auto 0;
  max-width: 640px;
}
.login-intro h1 {
  font-size: 54px;
  line-height: 1.04;
  letter-spacing: -0.045em;
  margin: 12px 0 23px;
}
.login-intro > p:last-child {
  max-width: 520px;
  color: #b7c9c1;
  font-size: 16px;
  line-height: 1.7;
}
.login-flow {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 13px;
  color: #cad7d1;
  font-size: 9px;
  letter-spacing: 0.13em;
  font-weight: 800;
}
.login-flow i {
  width: 38px;
  height: 1px;
  background: #ffffff38;
}
.login-form-panel {
  background: #f6f5f1;
  display: grid;
  place-items: center;
  padding: 35px;
}
.login-card {
  width: min(390px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 38px;
  box-shadow: 0 25px 70px #0a1d1514;
}
.login-card h2 {
  font-size: 30px;
  letter-spacing: -0.03em;
  margin: 0;
}
.login-card > .muted {
  font-size: 13px;
  margin: 7px 0 27px;
}
.login-card label {
  margin-top: 16px;
}
.login-card input {
  padding: 12px;
}
.login-card .button {
  margin-top: 23px;
  justify-content: space-between;
  padding: 0 15px 0 18px;
}
.security-note {
  display: flex;
  gap: 10px;
  background: #f0f6f2;
  border-radius: 8px;
  padding: 12px;
  margin-top: 20px;
}
.security-note > span {
  color: var(--green);
  font-weight: 800;
}
.security-note p {
  margin: 0;
  color: #6b7771;
  font-size: 10px;
  line-height: 1.45;
}
.security-note strong {
  font-family: Inter, Aptos, "Segoe UI", Arial, sans-serif;
  color: #3b4d44;
}
.mobile-brand {
  display: none;
}
@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 86px 1fr;
  }
  .sidebar {
    padding: 25px 13px;
  }
  .brand > span:last-child,
  .nav-item:not(:hover) {
    font-size: 0;
  }
  .brand {
    justify-content: center;
  }
  .nav-item {
    justify-content: center;
  }
  .nav-item span {
    font-size: 18px;
  }
  .nav-label,
  .account-copy {
    display: none;
  }
  .account-card {
    justify-content: center;
  }
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .project-filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-filter-search { grid-column: 1 / -1; }
  .overview-grid,
  .survey-grid,
  .boundary-grid {
    grid-template-columns: 1fr;
  }
  .overview-side {
    grid-template-columns: 1fr 1fr;
  }
  .output-grid {
    grid-template-columns: 340px 1fr;
  }
  .export-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .login-intro h1 {
    font-size: 44px;
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .project-filter-form { grid-template-columns: 1fr; margin: 0 12px; }
  .project-filter-search { grid-column: auto; }
  .sidebar {
    position: sticky;
    width: 100%;
    height: auto;
    top: 0;
    flex-direction: row;
    padding: 10px 15px;
    align-items: center;
  }
  .sidebar > .brand {
    justify-content: flex-start;
  }
  .brand > span:last-child {
    display: block;
  }
  .primary-nav {
    margin: 0 0 0 auto;
    display: flex;
  }
  .nav-item {
    padding: 8px;
  }
  .nav-item:nth-child(n + 3),
  .nav-label {
    display: none;
  }
  .account-card {
    margin: 0 0 0 8px;
    padding: 0;
    border: 0;
  }
  .avatar,
  .account-copy {
    display: none;
  }
  .main {
    padding: 22px 16px;
  }
  .workspace-header {
    margin: -22px -16px 18px;
    padding: 18px 16px 0;
  }
  .page-header {
    align-items: flex-start;
  }
  .page-header h1 {
    font-size: 29px;
  }
  .stat-row {
    grid-template-columns: 1fr 1fr;
  }
  .stat-row article:nth-child(2) {
    display: none;
  }
  .project-grid {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .field-wide {
    grid-column: auto;
  }
  .split-layout,
  .output-grid {
    grid-template-columns: 1fr;
  }
  .overview-side {
    grid-template-columns: 1fr;
  }
  .workspace-map,
  .workspace-map.tall,
  .boundary-map {
    height: 520px;
  }
  .output-cards {
    grid-template-columns: 1fr;
  }
  .export-grid {
    grid-template-columns: 1fr 1fr;
  }
  .login-layout {
    grid-template-columns: 1fr;
  }
  .login-brand-panel {
    display: none;
  }
  .login-form-panel {
    min-height: 100vh;
    padding: 18px;
  }
  .mobile-brand {
    display: flex;
    margin-bottom: 35px;
  }
  .messages {
    left: 15px;
    right: 15px;
  }
  .tabs {
    gap: 18px;
  }
  .workspace-title {
    gap: 10px;
  }
  .workspace-title .button {
    padding: 0 10px;
  }
  .table-panel {
    margin: 0 -8px;
  }
  .panel {
    border-radius: 11px;
  }
}
@media (max-width: 480px) {
  .export-grid {
    grid-template-columns: 1fr;
  }
  .login-card {
    padding: 27px;
  }
  .public-link-card {
    padding: 18px;
  }
  .stat-row {
    grid-template-columns: 1fr;
  }
  .stat-row article:nth-child(3) {
    display: none;
  }
}

/* Dynamic map editor */
.map-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 18px;
  align-items: start;
}
.map-editor-stage {
  position: relative;
  overflow: hidden;
}
.map-editor-head {
  padding: 20px 22px 17px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid #edf0ed;
}
.map-editor-head h2 {
  font-size: 18px;
  margin: 0 0 5px;
}
.map-editor-head p:last-child {
  color: var(--muted);
  font-size: 11px;
  margin: 0;
  max-width: 670px;
}
.editor-save-state {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.editor-save-state span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.editor-save-state.saved {
  background: #e4f7ed;
  color: #14724d;
}
.editor-save-state.dirty {
  background: #fff5d6;
  color: #946700;
}
.editor-save-state.saving {
  background: #e7efff;
  color: #3159a8;
}
.editor-save-state.error {
  background: #fff0f0;
  color: #a22d3b;
}
.editor-save-state strong {
  font:
    800 9px Inter, Aptos, "Segoe UI", Arial, sans-serif;
}
.map-editor-toolbar {
  height: 46px;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  background: #fbfcfa;
  border-bottom: 1px solid var(--line);
}
.editor-tool {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 7px 10px;
  color: #384841;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}
.editor-tool:hover {
  border-color: var(--green);
  color: var(--green);
}
.editor-tip {
  margin-left: auto;
  color: #74807a;
  font-size: 9px;
}
.map-editor-map {
  height: 680px;
  background: #dfe6e1;
  z-index: 1;
}
.editor-north {
  position: absolute;
  z-index: 500;
  right: 18px;
  bottom: 24px;
  width: 44px;
  height: 62px;
  border-radius: 10px;
  background: #17211de8;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px #0003;
  pointer-events: none;
}
.editor-north strong {
  font-size: 14px;
}
.editor-north span {
  font-size: 21px;
  line-height: 1;
  color: var(--lime);
}
.map-editor-controls {
  display: grid;
  gap: 13px;
  position: sticky;
  top: 18px;
}
.editor-card {
  padding: 18px;
}
.editor-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid #edf0ed;
}
.editor-card-title > span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #edf5f1;
  color: var(--green);
  font-size: 9px;
  font-weight: 800;
}
.editor-card-title > div {
  min-width: 0;
}
.editor-card-title strong,
.editor-card-title small {
  display: block;
}
.editor-card-title strong {
  font-size: 12px;
}
.editor-card-title small {
  color: var(--muted);
  font-size: 9px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.editor-card > label,
.editor-card > div > label,
.editor-fields label {
  display: block;
  font-size: 9px;
  font-weight: 800;
  color: #4b5b53;
  margin: 10px 0 5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.editor-card input[type="text"],
.editor-card > input:not([type="checkbox"]):not([type="color"]),
.editor-card select,
.editor-fields input,
.editor-fields select {
  width: 100%;
  border: 1px solid #d8ded9;
  background: #fbfcfa;
  border-radius: 7px;
  padding: 9px 10px;
  color: var(--ink);
  font-size: 11px;
  outline: none;
}
.editor-card input:focus,
.editor-card select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(27, 111, 80, 0.1);
}
.editor-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.editor-checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 14px;
}
.editor-checks label {
  display: flex !important;
  align-items: center;
  gap: 7px;
  margin: 0 !important;
  border: 1px solid #e2e6e3;
  border-radius: 7px;
  padding: 8px;
  font-size: 9px !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  cursor: pointer;
}
.editor-checks input {
  accent-color: var(--green);
}
.editor-selection-empty {
  background: #f3f6f4;
  border-radius: 7px;
  padding: 12px;
  text-align: center;
  color: var(--muted);
  font-size: 10px;
}
.colour-control {
  display: flex;
  align-items: center;
  gap: 10px;
}
.colour-control input[type="color"],
.default-colour-row input[type="color"] {
  width: 44px;
  height: 37px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 3px;
  cursor: pointer;
}
.colour-control output {
  font-size: 10px;
  font-weight: 800;
  color: #5f6c66;
}
.colour-swatches {
  display: flex;
  gap: 7px;
  margin: 11px 0 14px;
}
.colour-swatches button {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: var(--swatch);
  box-shadow: 0 0 0 1px #ccd3ce;
  cursor: pointer;
}
.colour-swatches button:hover,
.colour-swatches button:focus {
  box-shadow: 0 0 0 2px var(--green);
}
.nudge-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-bottom: 10px;
}
.nudge-grid button {
  height: 34px;
  border: 1px solid var(--line);
  background: #f9faf8;
  border-radius: 6px;
  color: var(--green);
  font-weight: 800;
  cursor: pointer;
}
.nudge-grid button:hover {
  background: #edf5f1;
}
.default-colour-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #edf0ed;
  margin-top: 15px;
  padding-top: 13px;
}
.default-colour-row label {
  margin: 0 !important;
}
.default-colour-row small {
  display: block;
  color: var(--muted);
  font-size: 8px;
  margin-top: 2px;
}
.text-action {
  border: 0;
  background: transparent;
  color: var(--green);
  padding: 10px 0 0;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}
.text-action:hover {
  text-decoration: underline;
}
.editor-actions {
  padding: 15px;
}
.editor-actions .button + .button {
  margin-top: 8px;
}
.editor-actions p {
  font-size: 9px;
  color: var(--muted);
  line-height: 1.5;
  margin: 11px 3px 0;
}
.generated-map-panel {
  margin-top: 18px;
}
.map-output-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.map-output-copy > div {
  min-width: 0;
}
.map-output-copy form {
  margin: 0;
}
.map-tree-label-wrap {
  background: transparent !important;
  border: 0 !important;
}
.map-tree-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 31px;
  height: 26px;
  padding: 0 7px;
  border: 2px solid;
  border-radius: 6px;
  box-shadow: 0 4px 12px #0003;
  font:
    800 11px Inter, Aptos, "Segoe UI", Arial, sans-serif;
  white-space: nowrap;
  cursor: grab;
  user-select: none;
  touch-action: none;
  transition:
    box-shadow 0.15s,
    transform 0.15s;
}
.map-tree-label:hover,
.map-tree-label.selected {
  box-shadow:
    0 0 0 3px var(--lime),
    0 5px 15px #0004;
  transform: translateY(-1px);
}
.leaflet-drag-target .map-tree-label {
  cursor: grabbing;
}
.leaflet-control-layers,
.leaflet-control-zoom {
  border: 0 !important;
  box-shadow: 0 5px 18px #0002 !important;
}
@media (max-width: 1180px) {
  .map-editor-layout {
    grid-template-columns: minmax(0, 1fr) 310px;
  }
  .map-editor-map {
    height: 620px;
  }
  .editor-checks {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 900px) {
  .map-editor-layout {
    grid-template-columns: 1fr;
  }
  .map-editor-controls {
    position: static;
    grid-template-columns: 1fr 1fr;
  }
  .editor-actions {
    grid-column: 1/-1;
  }
  .map-editor-map {
    height: 560px;
  }
}
@media (max-width: 620px) {
  .map-editor-controls {
    grid-template-columns: 1fr;
  }
  .editor-actions {
    grid-column: auto;
  }
  .map-editor-head {
    display: block;
  }
  .editor-save-state {
    display: inline-flex;
    margin-top: 12px;
  }
  .editor-tip {
    display: none;
  }
  .map-editor-map {
    height: 500px;
  }
  .editor-fields,
  .editor-checks {
    grid-template-columns: 1fr 1fr;
  }
}
.table-actions {
  display: flex;
  gap: 12px;
  white-space: nowrap;
}
.table-actions .text-link {
  font-size: 10px;
}

/* Neutral staff access */
.neutral-login-body {
  background: #f1f2f1;
}
.neutral-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.neutral-login-card {
  width: min(410px, 100%);
  background: #fff;
  border: 1px solid #d7dbd8;
  border-radius: 8px;
  padding: 38px;
  box-shadow: 0 18px 55px rgba(28, 35, 31, 0.08);
}
.neutral-login-icon {
  width: 34px;
  height: 34px;
  border: 1px solid #cfd4d1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #737b76;
  font-size: 9px;
  margin-bottom: 25px;
}
.neutral-login-kicker {
  margin: 0;
  color: #68716c;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 9px;
  font-weight: 800;
}
.neutral-login-card h1 {
  font-size: 27px;
  margin: 8px 0;
}
.neutral-login-copy {
  color: #68716c;
  font-size: 13px;
  margin: 0 0 26px;
}
.neutral-login-card label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  margin: 15px 0 7px;
  color: #363d39;
}
.neutral-login-card input {
  width: 100%;
  border: 1px solid #cfd4d1;
  background: #fff;
  border-radius: 5px;
  padding: 12px;
  color: #202522;
  outline: none;
}
.neutral-login-card input:focus {
  border-color: #68716c;
  box-shadow: 0 0 0 3px rgba(104, 113, 108, 0.12);
}
.neutral-login-submit {
  width: 100%;
  margin-top: 24px;
  border: 0;
  border-radius: 5px;
  background: #272d2a;
  color: #fff;
  padding: 13px;
  font-weight: 800;
  cursor: pointer;
}
.neutral-login-submit:hover {
  background: #111512;
}
.neutral-login-foot {
  border-top: 1px solid #e4e7e5;
  margin: 24px 0 0;
  padding-top: 17px;
  color: #7d8580;
  font-size: 10px;
  line-height: 1.5;
}

/* Customer red-line collection */
.boundary-delivery-panel {
  margin-top: 18px;
}
.boundary-delivery-grid {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 24px;
  padding: 22px;
}
.boundary-request-form {
  background: #f7f8f7;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.boundary-request-list h3,
.submission-register h3 {
  font-size: 14px;
  margin: 0 0 12px;
}
.boundary-request-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 14px;
  margin-bottom: 10px;
}
.boundary-request-card > div:first-child strong,
.boundary-request-card > div:first-child small {
  display: block;
}
.boundary-request-card > div:first-child small {
  color: var(--muted);
  font-size: 9px;
  margin-top: 4px;
}
.boundary-request-card .copy-field {
  margin: 12px 0;
}
.inline-actions,
.submission-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.inline-actions form,
.submission-actions form {
  margin: 0;
}
.submission-register {
  border-top: 1px solid #edf0ed;
}
.compact-head {
  padding-top: 17px;
  padding-bottom: 17px;
}
.submission-card {
  display: grid;
  grid-template-columns: 145px minmax(180px, 1fr) 150px minmax(280px, auto);
  gap: 18px;
  align-items: center;
  padding: 16px 22px;
  border-top: 1px solid #edf0ed;
}
.submission-card:first-of-type {
  border-top: 0;
}
.submission-card strong,
.submission-card small {
  display: block;
}
.submission-card small {
  color: var(--muted);
  font-size: 9px;
  margin-top: 3px;
}
.submission-card p {
  font-size: 10px;
  color: var(--muted);
  margin: 7px 0 0;
}
.submission-status small {
  margin-top: 6px;
}
.submission-metrics {
  display: flex;
  gap: 8px;
}
.submission-metrics span {
  background: #f4f7f5;
  border-radius: 7px;
  padding: 9px;
  min-width: 66px;
  font-size: 8px;
  color: var(--muted);
}
.submission-metrics b {
  display: block;
  color: var(--ink);
  font-size: 13px;
}
.editor-data-note {
  font-size: 9px;
  color: var(--muted);
  line-height: 1.45;
  margin: 12px 0 0;
}
.map-editor-map.plain-basemap {
  background: #fff;
}
.map-editor-map.plain-basemap .leaflet-container {
  background: #fff;
}
@media (max-width: 1180px) {
  .submission-card {
    grid-template-columns: 130px 1fr;
  }
  .submission-actions {
    grid-column: 1/-1;
  }
}
@media (max-width: 900px) {
  .boundary-delivery-grid {
    grid-template-columns: 1fr;
  }
  .submission-card {
    grid-template-columns: 1fr 1fr;
  }
  .submission-actions {
    grid-column: 1/-1;
  }
}
@media (max-width: 620px) {
  .neutral-login-card {
    padding: 28px;
  }
  .boundary-delivery-grid {
    padding: 15px;
  }
  .submission-card {
    grid-template-columns: 1fr;
    padding: 15px;
  }
  .submission-actions {
    grid-column: auto;
  }
  .submission-metrics {
    justify-content: flex-start;
  }
}

/* Stable, always-accessible map label editor */
.map-editor-map {
  width: 100%;
}
.map-editor-controls {
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-width: thin;
}
.label-card {
  border-color: #cfe0d7;
}
.label-picker-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
}
.label-picker-row select {
  min-width: 0;
}
.label-picker-row .editor-tool {
  height: 35px;
}
.label-picker-row .editor-tool:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
.editor-selection-empty {
  margin-top: 10px;
}
@media (max-width: 900px) {
  .map-editor-controls {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
}
.dataset-card > .dataset-actions {
  flex: 0 0 auto;
}
.oauth-callback-panel {
  display: grid;
  gap: 5px;
  margin-bottom: 18px;
  padding: 18px 20px;
}
.oauth-callback-panel strong {
  font-size: 12px;
}
.oauth-callback-panel code {
  overflow-wrap: anywhere;
  border-radius: 7px;
  background: #f2f5f3;
  padding: 10px;
  color: var(--green);
  font-size: 11px;
}
.oauth-callback-panel small {
  color: var(--muted);
  font-size: 10px;
}
.scale-status {
  display: block;
  margin-top: 5px;
  color: var(--green);
  font-size: 8px;
  line-height: 1.35;
}
.editor-card input[readonly] {
  background: #edf5f1;
  color: var(--green);
  font-weight: 800;
}
.editor-card .editor-auto-scale {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 0 4px !important;
  padding: 10px;
  border-radius: 7px;
  background: #f2f6f3;
  text-transform: none !important;
  letter-spacing: 0 !important;
  line-height: 1.4;
}
.editor-auto-scale input {
  margin-top: 2px;
  accent-color: var(--green);
}

/* Teams and project access */
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.team-card-body {
  padding: 20px;
}
.team-card-body > p {
  margin: 0 0 15px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.team-members {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 18px;
}
.team-members span,
.team-pill {
  display: inline-block;
  border-radius: 999px;
  background: #edf5f1;
  color: #315b48;
  padding: 5px 8px;
  font-size: 9px;
  font-weight: 700;
}
.team-pill {
  margin: 2px;
}
.project-access-panel {
  margin-top: 18px;
  padding-bottom: 20px;
}
.project-member-list {
  display: grid;
  gap: 8px;
  padding: 18px 20px;
}
.project-member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}
.project-member-row > div {
  flex: 1;
}
.project-member-row strong,
.project-member-row small {
  display: block;
}
.project-member-row small {
  color: var(--muted);
  font-size: 9px;
  margin-top: 3px;
}
.project-member-row form {
  margin: 0;
}
.project-member-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px auto;
  gap: 12px;
  align-items: end;
  margin: 0 20px;
  padding: 18px;
  border-radius: 9px;
  background: #f4f7f5;
}
.project-member-form p {
  margin: 0;
}
.project-member-form label {
  display: block;
  font-size: 9px;
  font-weight: 800;
  margin-bottom: 5px;
}
.project-member-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px;
  background: #fff;
}
.access-note {
  border-radius: 8px;
  background: #f2f6f3;
  color: #53635b;
  padding: 11px 12px;
  font-size: 10px;
  line-height: 1.5;
}
@media (max-width: 850px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
  .project-member-form {
    grid-template-columns: 1fr;
  }
}

/* Multiple project boundaries */
.boundary-next-style {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 16px 0;
  padding: 12px;
  background: #f4f7f5;
  border-radius: 8px;
}
.boundary-next-style > strong {
  grid-column: 1/-1;
  font-size: 11px;
}
.boundary-next-style label {
  font-size: 9px;
  color: var(--muted);
  font-weight: 800;
}
.boundary-next-style label:first-of-type {
  grid-column: 1/-1;
}
.boundary-next-style input {
  display: block;
  width: 100%;
  margin-top: 4px;
  border: 1px solid #d8ded9;
  border-radius: 6px;
  padding: 7px;
  background: #fff;
}
.boundary-next-style input[type="color"] {
  height: 34px;
  padding: 2px;
}
.staff-boundary-list {
  display: grid;
  gap: 7px;
  margin: 12px 0;
}
.staff-boundary-row {
  border: 1px solid var(--line);
  border-left: 5px solid var(--boundary-colour, #ff0000);
  border-radius: 6px;
  padding: 8px;
  background: #fff;
}
.staff-boundary-row strong {
  display: block;
  font-size: 10px;
  margin-bottom: 5px;
}
.staff-boundary-fields {
  display: grid;
  grid-template-columns: 1fr 1fr 42px;
  gap: 5px;
}
.staff-boundary-fields input {
  width: 100%;
  min-width: 0;
  border: 1px solid #d8ded9;
  border-radius: 5px;
  padding: 6px;
  font-size: 9px;
}
.staff-boundary-fields input[type="color"] {
  height: 29px;
  padding: 2px;
}
.staff-boundary-empty {
  padding: 9px;
  border: 1px dashed var(--line);
  color: var(--muted);
  font-size: 9px;
}

/* Excel export preview */
.export-grid-compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.excel-preview-panel {
  margin-top: 18px;
}
.excel-preview-head {
  align-items: flex-end;
}
.excel-preview-head > div:first-child {
  max-width: 720px;
}
.excel-preview-actions {
  display: grid;
  grid-template-columns: minmax(220px, 310px) auto;
  align-items: end;
  gap: 7px 10px;
}
.excel-preview-actions label {
  grid-column: 1/-1;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.excel-preview-actions input {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 11px;
  font-size: 11px;
  outline: none;
}
.excel-preview-actions input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(27, 111, 80, 0.1);
}
.excel-preview-actions form {
  margin: 0;
}
.excel-preview-summary {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 20px;
  background: #f4f7f5;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
}
.excel-preview-summary strong {
  color: var(--green);
}
.excel-preview-scroll {
  overflow: auto;
  max-height: 590px;
}
.excel-preview-table {
  width: 100%;
  min-width: 1500px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 10px;
}
.excel-preview-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #202522;
  color: #fff;
  padding: 10px;
  text-align: left;
  white-space: nowrap;
}
.excel-preview-table td {
  max-width: 260px;
  padding: 10px;
  vertical-align: top;
  border-right: 1px solid #e5e9e6;
  border-bottom: 1px solid #e5e9e6;
  line-height: 1.45;
}
.excel-preview-table tbody tr:nth-child(even) {
  background: #fafbf9;
}
.excel-preview-table tbody tr:hover {
  background: #edf5f1;
}
.excel-preview-table td:nth-child(1),
.excel-preview-table td:nth-child(3),
.excel-preview-table td:nth-child(4),
.excel-preview-table td:nth-child(5),
.excel-preview-table td:nth-child(10),
.excel-preview-table td:nth-child(11) {
  white-space: nowrap;
}
.excel-preview-table td:nth-child(2) strong,
.excel-preview-table td:nth-child(2) em {
  display: block;
}
.excel-preview-table td:nth-child(2) em {
  margin-top: 2px;
  color: var(--muted);
}
.excel-description {
  min-width: 235px;
  white-space: normal;
}
.excel-category {
  display: inline-grid;
  min-width: 30px;
  height: 24px;
  padding: 0 7px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
}
.excel-category.category-a {
  background: #228b22;
}
.excel-category.category-b {
  background: #2563eb;
}
.excel-category.category-c {
  background: #6b7280;
}
.excel-category.category-u {
  background: #dc2626;
}
@media (max-width: 1100px) {
  .export-grid-compact {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 900px) {
  .excel-preview-head {
    display: block;
  }
  .excel-preview-actions {
    margin-top: 18px;
    grid-template-columns: 1fr;
  }
  .excel-preview-actions label {
    grid-column: auto;
  }
  .excel-preview-summary {
    display: block;
  }
  .excel-preview-summary span {
    display: block;
    margin-top: 4px;
  }
}
@media (max-width: 620px) {
  .export-grid-compact {
    grid-template-columns: 1fr;
  }
}

/* Unified project survey data */
.dataset-edit-state {
  display: block;
  margin-top: 5px;
  color: #a05f00 !important;
  font-weight: 800;
}
.survey-data-panel {
  margin-top: 18px;
  overflow: hidden;
}
.survey-data-head {
  align-items: flex-start;
  gap: 20px;
}
.survey-data-head > div:first-child {
  max-width: 720px;
}
.survey-data-metrics {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.survey-data-metrics span {
  border-radius: 8px;
  background: #f3f6f4;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}
.survey-data-metrics b {
  color: var(--ink);
  font-size: 13px;
  margin-right: 3px;
}
.survey-data-metrics .warning {
  background: #fff4d7;
  color: #8a5c00;
}
.survey-data-metrics .changed {
  background: #e9f0ff;
  color: #3159a8;
}
.survey-data-metrics .danger {
  background: #fff0f0;
  color: #a22d3b;
}
.duplicate-warning {
  margin: 16px 20px 0;
  border: 1px solid #f1cb77;
  border-radius: 9px;
  background: #fff8e7;
  padding: 12px 14px;
  color: #77520c;
  font-size: 11px;
}
.duplicate-warning strong {
  margin-right: 5px;
}
.survey-search-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 6px 18px;
  align-items: end;
  padding: 16px 20px 0;
}
.survey-search-bar > label {
  grid-column: 1/-1;
  color: #4b5b53;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.survey-search-bar > div {
  display: flex;
  max-width: 720px;
}
.survey-search-bar input {
  flex: 1;
  min-width: 0;
  height: 40px;
  border: 1px solid #cfd7d2;
  border-radius: 8px 0 0 8px;
  padding: 0 12px;
  outline: none;
}
.survey-search-bar input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(27, 111, 80, 0.1);
}
.survey-search-bar .button {
  border-radius: 0 8px 8px 0;
}
.survey-search-bar output {
  align-self: center;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}
.survey-search-bar output strong {
  color: var(--green);
}
.survey-record-list {
  padding: 18px 20px;
}
.survey-record-columns,
.survey-record > summary {
  display: grid;
  grid-template-columns: minmax(90px, 0.65fr) minmax(165px, 1.4fr) minmax(
      175px,
      1.15fr
    ) 90px minmax(180px, 1.2fr) 52px;
  gap: 12px;
  align-items: center;
}
.survey-record-columns {
  padding: 0 13px 7px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.survey-record {
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-bottom: 8px;
  background: #fff;
  overflow: hidden;
}
.survey-record.duplicate {
  border-color: #e9b949;
  background: #fffaf0;
}
.survey-record.locally-edited {
  box-shadow: inset 4px 0 #3159a8;
}
.survey-record > summary {
  list-style: none;
  padding: 12px 13px;
  cursor: pointer;
}
.survey-record > summary::-webkit-details-marker {
  display: none;
}
.survey-record > summary:hover {
  background: #f7f9f7;
}
.survey-record > summary > span {
  min-width: 0;
}
.survey-record > summary strong,
.survey-record > summary b,
.survey-record > summary small,
.survey-record > summary em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}
.survey-record > summary strong {
  font-size: 13px;
}
.survey-record > summary b {
  font-size: 11px;
}
.survey-record > summary small,
.survey-record > summary em {
  color: var(--muted);
  font-size: 9px;
  margin-top: 3px;
}
.survey-record > summary em {
  font-family: serif;
}
.survey-record > summary .excel-category {
  display: inline-grid;
}
.survey-record > summary .row-sync-state {
  font-size: 10px;
}
.row-sync-state.changed {
  color: #3159a8;
}
.row-sync-state.synced {
  color: #14724d;
}
.survey-expand {
  color: var(--green);
  font-size: 9px !important;
  font-weight: 800;
  text-align: right;
}
.survey-record[open] .survey-expand:after {
  content: " ↑";
}
.survey-record-editor {
  border-top: 1px solid var(--line);
  padding: 18px;
  background: #fbfcfa;
}
.survey-record-editor-head {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}
.survey-record-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.survey-record-form p {
  margin: 0;
}
.survey-record-form p:has(textarea) {
  grid-column: span 2;
}
.survey-record-form label {
  display: block;
  margin-bottom: 5px;
  color: #4b5b53;
  font-size: 9px;
  font-weight: 800;
}
.survey-record-form input,
.survey-record-form select,
.survey-record-form textarea {
  width: 100%;
  border: 1px solid #d8ded9;
  border-radius: 7px;
  background: #fff;
  padding: 9px;
  font-size: 11px;
}
.survey-record-form textarea {
  resize: vertical;
}
.survey-form-actions {
  grid-column: 1/-1;
  display: flex;
  justify-content: flex-end;
  padding-top: 5px;
}
.source-diff-list,
.source-conflict {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  border-radius: 8px;
  margin-bottom: 14px;
  padding: 11px 12px;
  font-size: 9px;
}
.source-diff-list {
  background: #e9f0ff;
  color: #31527f;
}
.source-diff-list > strong {
  width: 100%;
  font-size: 10px;
}
.source-diff-list span {
  border-radius: 5px;
  background: #fff;
  padding: 5px 7px;
}
.source-conflict {
  background: #fff0f0;
  color: #902d3c;
}
.survey-record-editor > form:last-child {
  margin-top: 10px;
}
.publish-review-summary,
.publish-change-panel,
.publish-confirm-panel {
  margin-bottom: 18px;
}
.publish-review-header .workspace-title {
  padding-bottom: 22px;
}
.publish-metrics {
  grid-template-columns: repeat(3, 1fr);
  padding: 0 20px;
}
.publish-safety-note {
  margin: 0 20px 20px;
  border-radius: 9px;
  background: #f1f5f3;
  padding: 13px;
  font-size: 11px;
}
.publish-safety-note p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.5;
}
.publish-change-list {
  padding: 18px 20px;
}
.publish-change-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  margin-bottom: 12px;
}
.publish-change-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: #f7f9f7;
}
.publish-change-title strong,
.publish-change-title small {
  display: block;
}
.publish-change-title small {
  color: var(--muted);
  font-size: 9px;
  margin-top: 3px;
}
.publish-change-title > span {
  font-size: 9px;
  color: var(--green);
  font-weight: 800;
}
.publish-change-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid #edf0ed;
  font-size: 10px;
  overflow-wrap: anywhere;
}
.publish-change-row.heading {
  background: #202522;
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.publish-change-row.unsupported {
  background: #fff3f3;
  color: #8f2535;
}
.publish-confirm-panel {
  max-width: 760px;
  padding: 24px;
}
.publish-confirm-panel h2 {
  margin: 4px 0;
}
.publish-confirm-panel p {
  color: var(--muted);
  font-size: 11px;
}
.publish-check {
  display: flex !important;
  align-items: flex-start;
  gap: 9px;
  border-radius: 8px;
  background: #fff6dd;
  padding: 12px;
  margin: 18px 0 !important;
  color: #654a12 !important;
  font-size: 11px !important;
}
.publish-check input {
  width: auto !important;
  margin-top: 2px;
}
.publish-confirm-panel > label {
  display: block;
  margin: 13px 0 6px;
  font-size: 10px;
  font-weight: 800;
}
.publish-confirm-panel > input {
  width: 100%;
  max-width: 280px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px;
}
.publish-confirm-panel .button {
  display: flex;
  margin-top: 15px;
}
@media (max-width: 1050px) {
  .survey-record-form {
    grid-template-columns: repeat(3, 1fr);
  }
  .survey-record-columns,
  .survey-record > summary {
    grid-template-columns: 80px 1.3fr 1fr 70px 1fr 45px;
  }
}
@media (max-width: 760px) {
  .survey-data-head {
    display: block;
  }
  .survey-data-metrics {
    justify-content: flex-start;
    margin-top: 14px;
  }
  .survey-search-bar {
    grid-template-columns: 1fr;
  }
  .survey-search-bar output {
    white-space: normal;
  }
  .survey-record-columns {
    display: none;
  }
  .survey-record > summary {
    grid-template-columns: 70px 1fr 45px;
  }
  .survey-record > summary > span:nth-child(3),
  .survey-record > summary > span:nth-child(4),
  .survey-record > summary > span:nth-child(5) {
    display: none;
  }
  .survey-record-form {
    grid-template-columns: repeat(2, 1fr);
  }
  .publish-change-row {
    grid-template-columns: 1fr 1fr;
  }
  .publish-change-row.heading {
    display: none;
  }
}
@media (max-width: 480px) {
  .survey-record-form {
    grid-template-columns: 1fr;
  }
  .survey-record-form p:has(textarea) {
    grid-column: auto;
  }
  .publish-metrics {
    grid-template-columns: 1fr;
  }
  .publish-change-row {
    grid-template-columns: 1fr;
  }
}

/* Arborist audit and imported survey geometry */
.audit-panel {
  margin: 18px 0;
}
.audit-counts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.audit-counts span {
  border-radius: 8px;
  padding: 8px 11px;
  font-size: 10px;
  font-weight: 800;
}
.audit-counts b {
  font-size: 17px;
  margin-right: 3px;
}
.audit-error {
  background: #fff0f0 !important;
  color: #a72f35 !important;
}
.audit-warning {
  background: #fff7df !important;
  color: #8a6300 !important;
}
.audit-notice {
  background: #edf5ff !important;
  color: #315f91 !important;
}
.audit-results > summary {
  cursor: pointer;
  padding: 15px 20px;
  font-size: 12px;
  font-weight: 800;
  border-bottom: 1px solid #edf0ed;
}
.audit-issue-list {
  max-height: 520px;
  overflow: auto;
  display: grid;
}
.audit-issue {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 13px;
  padding: 13px 20px;
  border-bottom: 1px solid #edf0ed;
}
.audit-issue > span {
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  text-transform: uppercase;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
}
.audit-issue > div strong {
  font-size: 12px;
}
.audit-issue p {
  margin: 3px 0;
  color: #56615c;
  font-size: 11px;
}
.audit-issue small {
  color: #8a948f;
  font-size: 8px;
  letter-spacing: 0.08em;
}
.audit-issue.audit-error > span,
.audit-inline.audit-error {
  background: #ffe2e4;
  color: #a72f35;
}
.audit-issue.audit-warning > span,
.audit-inline.audit-warning {
  background: #fff0bf;
  color: #785600;
}
.audit-issue.audit-notice > span,
.audit-inline.audit-notice {
  background: #dcecff;
  color: #315f91;
}
.audit-inline {
  display: inline-block;
  border-radius: 5px;
  padding: 4px 7px;
  margin-top: 4px;
  font-size: 9px;
  font-weight: 800;
}
.audit-pass {
  padding: 20px;
  color: #176747;
  background: #effaf4;
}
.audit-row-error {
  border-left: 5px solid #c63f46 !important;
}
.audit-row-warning {
  border-left: 5px solid #d39a12 !important;
}
.audit-row-notice {
  border-left: 5px solid #4e83b6 !important;
}
.row-audit-list {
  display: grid;
  gap: 6px;
  background: #f8f9f7;
  border: 1px solid #e5e9e6;
  border-radius: 8px;
  padding: 13px;
  margin-bottom: 16px;
}
.row-audit-list > strong {
  font-size: 11px;
}
.row-audit-list .audit-inline {
  margin: 0;
  font-weight: 500;
}
.feature-detail-list {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 8px 15px;
  margin: 0 0 15px;
}
.feature-detail-list dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}
.feature-detail-list dd {
  margin: 0;
  font-size: 11px;
}
.survey-feature-record summary {
  background: #fbfcfb;
}

/* Background jobs and server-side survey filters */
.project-jobs {
  margin-bottom: 18px;
  overflow: hidden;
}
.project-jobs > summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  cursor: pointer;
}
.project-jobs > summary span {
  color: var(--muted);
  font-size: 10px;
}
.project-jobs > div {
  border-top: 1px solid var(--line);
}
.job-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid #edf0ed;
}
.job-row:last-child {
  border-bottom: 0;
}
.job-row strong,
.job-row small {
  display: block;
}
.job-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}
.job-row p {
  margin: 5px 0 0;
  color: #9a3442;
  font-size: 10px;
}
.job-running {
  box-shadow: inset 4px 0 var(--green);
}
.job-failed,
.job-stale {
  box-shadow: inset 4px 0 #b13a4b;
}
.survey-filter-form {
  border-bottom: 1px solid var(--line);
}
.survey-filter-drawer {
  margin: 12px 20px 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcfa;
}
.survey-filter-drawer > summary,
.survey-measure-filters > summary {
  padding: 12px 14px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}
.survey-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
  padding: 4px 14px 14px;
}
.survey-filter-grid > label {
  font-size: 9px;
  font-weight: 800;
  color: #4b5b53;
}
.survey-filter-grid input,
.survey-filter-grid select {
  display: block;
  width: 100%;
  min-height: 38px;
  margin-top: 5px;
  border: 1px solid #d8ded9;
  border-radius: 7px;
  background: #fff;
  padding: 7px;
  font-size: 10px;
}
.survey-filter-grid select[multiple] {
  min-height: 86px;
}
.survey-filter-grid fieldset {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 10px;
}
.survey-filter-grid fieldset label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 4px 8px 4px 0;
  font-size: 9px;
}
.survey-filter-grid fieldset input {
  display: inline;
  width: auto;
  min-height: 0;
  margin: 0;
}
.survey-measure-filters {
  border-top: 1px solid var(--line);
}
.survey-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px 14px;
}
.survey-filter-actions span {
  color: var(--muted);
  font-size: 9px;
}
.survey-record-columns button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  color: inherit;
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}
.survey-record-columns button:hover {
  color: var(--green);
}

.tree-review-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  margin-bottom: 18px;
}
.tree-review-header h1 { margin: 3px 0; }
.tree-review-header p { margin: 0; }
.back-link { color: var(--green); font-weight: 700; text-decoration: none; }
.tree-review-nav { display: flex; gap: 8px; align-items: center; }
.button.disabled { pointer-events: none; opacity: 0.45; }
.tree-review-statuses { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.review-status { border-radius: 999px; padding: 6px 11px; font-size: 0.78rem; font-weight: 750; }
.review-status.success { background: #e6f5ed; color: #12603e; }
.review-status.changed { background: #fff2d6; color: #815600; }
.review-status.warning { background: #fff1d9; color: #7a5100; }
.review-status.danger { background: #fee7e5; color: #9a2821; }
.review-status.neutral { background: #edf1ef; color: #49544e; }
.tree-review-findings { display: grid; gap: 8px; margin-bottom: 16px; }
.tree-review-form-error { margin-bottom: 16px; }
.tree-review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
  gap: 18px;
  align-items: start;
}
.tree-review-fields,
.tree-review-visuals { display: grid; gap: 16px; }
.tree-review-visuals { position: sticky; top: 18px; }
.tree-field-section .panel-head,
.tree-map-card .panel-head,
.tree-photo-card .panel-head { margin-bottom: 14px; }
.tree-field-section input,
.tree-field-section select,
.tree-field-section textarea { width: 100%; }
.tree-field-section .errorlist { color: #a52a24; list-style: none; padding: 0; margin: 5px 0 0; font-size: 0.8rem; }
.tree-spread-fields { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.tree-spread-fields summary { cursor: pointer; font-weight: 750; }
.tree-spread-fields .form-grid { margin-top: 12px; }
.tree-review-map { width: 100%; height: min(48vh, 480px); min-height: 340px; border-radius: 12px; overflow: hidden; background: #e8ece9; }
.tree-review-map-error { display: grid; place-items: center; padding: 24px; color: #8b2f28; text-align: center; }
.tree-review-current-icon { background: transparent; border: 0; }
.tree-review-current-icon span {
  display: block;
  width: 20px;
  height: 20px;
  margin: 2px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: #16813d;
  box-shadow: 0 0 0 3px #172c25, 0 3px 9px rgba(0, 0, 0, .32);
}
.tree-review-number-label {
  border: 1px solid #33463f;
  border-radius: 4px;
  background: rgba(255, 255, 255, .96);
  color: #24352f;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .24);
  padding: 1px 5px;
  font-size: .7rem;
  font-weight: 800;
  line-height: 1.25;
  pointer-events: none;
}
.tree-review-number-label.current { border-color: #fff; background: #173d2d; color: #fff; }
.tree-review-number-label::before { display: none; }
.tree-map-view-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 10px; }
.tree-map-context-status { margin-left: auto; color: var(--muted); font-size: .78rem; }
.tree-map-context-status.warning { color: #8b5a00; }
.tree-map-legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 10px 0 4px; font-size: 0.78rem; }
.tree-map-legend span { display: flex; align-items: center; gap: 6px; }
.tree-map-legend i { width: 18px; height: 12px; display: inline-block; border-radius: 8px; }
.tree-map-legend .stem { width: 12px; height: 12px; border-radius: 50%; background: #198754; border: 2px solid #fff; box-shadow: 0 0 0 1px #415047; }
.tree-map-legend .context { width: 10px; height: 10px; border-radius: 50%; background: #f7faf8; border: 2px solid #33463f; }
.tree-map-legend .canopy { background: rgba(34, 197, 94, .18); border: 2px solid #15803d; }
.tree-map-legend .rpa { background: rgba(96, 165, 250, .12); border: 2px dashed #2563eb; }
.tree-map-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center; }
.tree-photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tree-photo-grid a { color: inherit; text-decoration: none; min-width: 0; }
.tree-photo-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 9px; border: 1px solid var(--line); display: block; }
.tree-photo-grid span { display: block; font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 4px; }
.tree-source-diff > div:not(.panel-head) { display: grid; grid-template-columns: 1fr 1fr auto 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: .82rem; }
.tree-review-actions {
  position: sticky;
  bottom: 0;
  z-index: 900;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin: 18px -6px -6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 -8px 28px rgba(23, 33, 29, .08);
  backdrop-filter: blur(7px);
}
.tree-review-actions > :first-child { margin-right: auto; }

@media (max-width: 1150px) {
  .tree-review-layout { grid-template-columns: 1fr; }
  .tree-review-visuals { position: static; grid-row: 1; }
  .tree-review-map { height: 430px; }
}
@media (max-width: 780px) {
  .tree-review-header { align-items: flex-start; flex-direction: column; }
  .tree-review-nav { width: 100%; flex-wrap: wrap; }
  .tree-review-nav span:first-child { margin-right: auto; }
  .tree-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tree-review-actions { flex-wrap: wrap; }
}
.survey-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 15px;
}
.survey-pagination span {
  font-size: 10px;
  color: var(--muted);
}
@media (max-width: 1050px) {
  .survey-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .survey-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .job-row {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 480px) {
  .survey-filter-grid {
    grid-template-columns: 1fr;
  }
  .survey-filter-actions {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}

/* Simplified survey and export workspaces */
.mfa-enrol-card {
  width: min(470px, 100%);
}
.mfa-qr {
  display: block;
  width: 220px;
  height: 220px;
  margin: 0 auto 16px;
}
.manual-key {
  display: block;
  overflow-wrap: anywhere;
  background: #f2f4f2;
  border-radius: 6px;
  padding: 10px;
  margin-top: 8px;
  font-size: 11px;
}
.recovery-code-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.recovery-code-grid code {
  background: #f2f4f2;
  border: 1px solid #dfe3df;
  border-radius: 6px;
  padding: 12px;
  text-align: center;
  font-weight: 800;
}
.security-events {
  margin-top: 18px;
}
.security-events .panel-head input,
.security-events .panel-head select {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
}
.export-grid-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.survey-sources-panel {
  margin-top: 18px;
  overflow: hidden;
}
.survey-sources-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
}
.survey-sources-panel > summary::-webkit-details-marker {
  display: none;
}
.survey-sources-panel > summary h2 {
  margin: 0;
  font-size: 16px;
}
.survey-sources-panel > summary p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
}
.survey-sources-panel > summary > span {
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
}
.survey-sources-panel > summary > span:after {
  content: " ↓";
}
.survey-sources-panel[open] > summary > span:after {
  content: " ↑";
}
.survey-source-body {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
  border-top: 1px solid var(--line);
}
.survey-source-list {
  min-width: 0;
  padding: 20px;
}
.survey-source-list .panel-head {
  padding: 0 0 14px;
}
.survey-source-list .panel-head h3,
.survey-source-actions .panel-head h3 {
  margin: 0;
  font-size: 13px;
}
.survey-source-actions {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 20px;
  border-left: 1px solid var(--line);
  background: #f7f9f7;
}
.survey-source-actions .form-panel {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}
.survey-source-actions .panel-head {
  padding: 0 0 12px;
}
@media (max-width: 1100px) {
  .export-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .survey-source-body {
    grid-template-columns: 1fr;
  }
  .survey-source-actions {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}
@media (max-width: 620px) {
  .export-grid-compact {
    grid-template-columns: 1fr;
  }
}

/* Compact project activity and completion archive */
.job-activity {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 3500;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(390px, calc(100vw - 32px));
  padding: 11px 15px;
  border: 1px solid #ffffff22;
  border-radius: 10px;
  background: #17211df2;
  color: #fff;
  box-shadow: 0 14px 35px #0004;
  font-size: 11px;
  font-weight: 700;
}
.job-activity[hidden] {
  display: none;
}
.job-spinner {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 2px solid #ffffff55;
  border-top-color: var(--lime);
  border-radius: 50%;
  animation: job-spin 0.8s linear infinite;
}
@keyframes job-spin {
  to {
    transform: rotate(360deg);
  }
}
.files-stack {
  display: grid;
  gap: 18px;
}
.archive-panel {
  overflow: hidden;
}
.archive-body {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 22px;
}
.archive-body > div {
  flex: 1;
  min-width: 0;
}
.archive-body strong,
.archive-body small {
  display: block;
}
.archive-body small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  overflow-wrap: anywhere;
}
.archive-body form {
  margin: 0;
}
.archive-readonly-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px 16px;
  border: 1px solid #d8ded9;
  border-radius: 10px;
  background: #eef0ef;
}
.archive-readonly-banner strong {
  font-size: 11px;
}
.archive-readonly-banner span {
  color: var(--muted);
  font-size: 10px;
}
.archive-confirm-card label {
  display: block;
  margin: 18px 0 7px;
  font-size: 11px;
  font-weight: 800;
}
.archive-confirm-card input[type="text"],
.archive-confirm-card input:not([type]) {
  width: 100%;
  border: 1px solid #d8ded9;
  border-radius: 8px;
  padding: 11px;
}
.archive-check {
  display: flex !important;
  align-items: flex-start;
  gap: 9px;
}
.archive-check input {
  margin-top: 3px;
}
.archive-warning {
  padding: 15px;
  border-radius: 9px;
  background: #fff6df;
  color: #6f5417;
}
.archive-warning p {
  margin: 5px 0 0;
  font-size: 11px;
  line-height: 1.5;
}
.archive-summary {
  display: grid;
  grid-template-columns: 130px 1fr;
  margin: 20px 0;
}
.archive-summary dt,
.archive-summary dd {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.archive-summary dt {
  color: var(--muted);
}
.archive-summary dd {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.generation-issues .file-icon {
  background: #fff0f0;
  color: #a73543;
}
@media (max-width: 760px) {
  .job-activity {
    right: 16px;
    bottom: 16px;
  }
  .archive-body {
    align-items: stretch;
    flex-direction: column;
  }
  .archive-body .button,
  .archive-body form,
  .archive-body form .button {
    width: 100%;
  }
  .archive-readonly-banner {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (prefers-reduced-motion: reduce) {
  .job-spinner {
    animation-duration: 1.8s;
  }
}
.remember-device-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0;
  text-align: left;
}
.remember-device-option input {
  width: auto;
  margin-top: 4px;
}
.remember-device-option span {
  display: grid;
  gap: 2px;
}
.remember-device-option small {
  color: var(--muted);
  font-weight: 400;
}
.arcgis-project-panel {
  margin-top: 1rem;
}
.arcgis-stub {
  background: linear-gradient(145deg, #e9f4ef, #d8e8e0);
}
.arcgis-project-card .map-pin {
  color: #237a53;
}
.project-card-disabled {
  opacity: 0.72;
  cursor: default;
}
.team-gis-row {
  align-items: flex-start;
}
.team-gis-row em {
  display: block;
  color: #a33333;
  font-style: normal;
  margin-top: 0.35rem;
}
.team-gis-row .button-stack {
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Focused navigation and single-action workspaces */
.account-card {
  align-items: flex-start;
}
.account-menu {
  flex: 1;
  min-width: 0;
}
@media (max-width: 760px) {
  .sidebar { flex-wrap: wrap; row-gap: 8px; }
  .sidebar .account-card { margin-left: auto; flex: 0 1 170px; min-width: 0; max-width: 100%; }
}
.workspace-mode-form {
  display: grid;
  grid-template-columns: auto minmax(54px, 1fr) auto;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.workspace-mode-form label {
  font-size: 8px;
  color: #91a099;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.workspace-mode-form select {
  min-width: 0;
  width: 100%;
  border: 1px solid #ffffff1f;
  border-radius: 6px;
  background: #ffffff0d;
  color: #fff;
  padding: 4px 6px;
  font-size: 9px;
}
.workspace-mode-form option {
  color: var(--ink);
}
.workspace-mode-apply {
  border: 1px solid #ffffff26;
  border-radius: 6px;
  background: transparent;
  color: #dce5df;
  padding: 4px 6px;
  font-size: 8px;
  font-weight: 700;
  cursor: pointer;
}
.workspace-mode-apply:hover {
  background: #ffffff12;
}
.workspace-mode-apply:disabled {
  cursor: wait;
  opacity: 0.65;
}
.management-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.management-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 22px;
  transition: 0.18s;
}
.management-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px #1f332914;
}
.management-card > span {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #edf5f1;
  color: var(--green);
  font-size: 9px;
  font-weight: 900;
}
.management-card h2 {
  margin: 1px 0 5px;
  font-size: 15px;
}
.management-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.project-subnav {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: -6px 0 18px;
}
.project-subnav a {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 8px 13px;
  color: #68736e;
  font-size: 10px;
  font-weight: 800;
}
.project-subnav a.active {
  border-color: var(--green);
  background: #edf7f2;
  color: var(--green);
}
.project-home-summary {
  margin-bottom: 18px;
}
.project-home-summary dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
}
.project-home-summary dl > div {
  min-width: 0;
  padding: 17px 20px;
  border-right: 1px solid #edf0ed;
  border-bottom: 1px solid #edf0ed;
}
.project-home-summary dl > div:nth-child(4n) {
  border-right: 0;
}
.project-home-summary dt {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.project-home-summary dd {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 700;
}
.project-home-summary .form-actions {
  padding: 16px 20px;
  margin: 0;
}
.project-reference {
  display: block;
  margin-top: 13px;
  color: var(--green);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.project-card {
  min-height: 175px;
}
.project-card-body {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.project-card .project-meta {
  margin-top: auto;
}
.project-grid {
  grid-template-columns: repeat(3, minmax(250px, 1fr));
}
.survey-quick-filters {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  padding: 12px 20px 16px;
}
.survey-quick-filters a {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 6px 10px;
  color: #45544d;
  font-size: 9px;
  font-weight: 800;
}
.survey-quick-filters a:hover {
  border-color: var(--green);
  color: var(--green);
}
.survey-quick-filters .clear {
  margin-left: auto;
  color: #9b3442;
}
.survey-sources-panel {
  margin-top: 0;
}
.survey-source-body {
  border-top: 0;
}
.project-more-fields {
  margin-top: 22px;
  border-top: 1px solid #edf0ed;
  padding-top: 16px;
}
.project-more-fields > summary {
  cursor: pointer;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
}
.project-more-fields > .form-grid {
  margin-top: 18px;
}
@media (max-width: 1100px) {
  .management-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .project-home-summary dl {
    grid-template-columns: repeat(3, 1fr);
  }
  .project-home-summary dl > div:nth-child(4n) {
    border-right: 1px solid #edf0ed;
  }
  .project-home-summary dl > div:nth-child(3n) {
    border-right: 0;
  }
  .project-grid {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }
}
@media (max-width: 760px) {
  .management-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }
  .project-home-summary dl {
    grid-template-columns: repeat(2, 1fr);
  }
  .project-home-summary dl > div:nth-child(3n) {
    border-right: 1px solid #edf0ed;
  }
  .project-home-summary dl > div:nth-child(2n) {
    border-right: 0;
  }
  .project-subnav {
    overflow: auto;
    flex-wrap: nowrap;
  }
  .project-subnav a {
    white-space: nowrap;
  }
}

/* Additive quality evidence styling, scoped to the existing Survey panel. */
.audit-panel .audit-advisory { border-color: #78908c; }
.audit-panel .audit-results > details { margin-block: .65rem; padding: .65rem; border-inline-start: 3px solid #78908c; }
.audit-panel .audit-results > .audit-error { border-color: #bb4545; }
.audit-panel .audit-results > .audit-warning { border-color: #b78026; }
.audit-panel details p { overflow-wrap: anywhere; }
