:root {
  --canvas: #f3f1ec;
  --surface: #fdfcf9;
  --surface-solid: #fdfcf9;
  --surface-muted: #eeece6;
  --label: #192522;
  --secondary: #626d68;
  --tertiary: #78817d;
  --separator: #d7d3ca;
  --blue: #1f5a52;
  --blue-pressed: #174740;
  --blue-soft: #e1ebe8;
  --green: #2f7450;
  --green-bright: #4d8a69;
  --green-soft: #e3eee7;
  --orange: #8a4c25;
  --orange-bright: #b96f3f;
  --orange-soft: #f1e5db;
  --red: #a94742;
  --red-soft: #f3e3e1;
  --copper: #c58a52;
  --radius-xl: 14px;
  --radius-lg: 12px;
  --radius-md: 9px;
  --shadow: 0 10px 28px rgba(25, 37, 34, 0.07);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  color: var(--label);
  background: var(--canvas);
  font-family: var(--font);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background: var(--canvas);
}
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: 0.45; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 74px;
  padding: 13px clamp(18px, 4vw, 52px);
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 24px;
  background: rgba(248, 248, 250, 0.78);
  border-bottom: 0.5px solid var(--separator);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
}
.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; font-weight: 680; letter-spacing: -0.02em; }
.brand small { margin-top: 1px; color: var(--secondary); font-size: 11px; font-weight: 500; }
.segmented {
  min-height: 40px;
  padding: 3px;
  display: flex;
  align-items: center;
  gap: 2px;
  border-radius: 11px;
  background: rgba(118, 118, 128, 0.12);
}
.nav-button {
  min-height: 34px;
  padding: 6px 18px;
  border: 0;
  border-radius: 9px;
  color: var(--secondary);
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  transition: background 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.nav-button.is-active {
  color: var(--label);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
}
.connection {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--secondary);
  font-size: 12px;
  font-weight: 590;
}
.connection-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--orange-bright);
  box-shadow: 0 0 0 4px var(--orange-soft);
}
.connection.is-live .connection-dot { background: var(--green-bright); box-shadow: 0 0 0 4px var(--green-soft); }
.connection.is-offline .connection-dot { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }

.app-main {
  width: min(1540px, 100%);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 54px) clamp(16px, 4vw, 52px) 44px;
}
.app-view { display: none; }
.app-view.is-active { display: block; animation: view-in 260ms cubic-bezier(.2,.8,.2,1); }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.view-heading {
  margin: 0 2px 26px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 28px;
}
.view-heading h1 { margin: 4px 0 6px; font-size: clamp(34px, 4vw, 54px); line-height: 1; letter-spacing: -0.055em; }
.view-heading p { max-width: 660px; margin: 0; color: var(--secondary); font-size: 15px; line-height: 1.45; }
.eyebrow { margin: 0 !important; color: #8a5a32 !important; font-size: 11px !important; font-weight: 720; letter-spacing: 0.1em; text-transform: uppercase; }
.compact-heading h1 { font-size: clamp(32px, 3.4vw, 46px); }
.soft-badge {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 7px 12px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 12px;
  font-weight: 650;
}
.stat-strip {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(82px, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 0.5px solid var(--separator);
  border-radius: 15px;
  background: var(--separator);
}
.stat-strip div { min-width: 92px; padding: 10px 14px; background: rgba(255,255,255,.75); text-align: center; }
.stat-strip strong, .stat-strip span { display: block; }
.stat-strip strong { font-size: 19px; font-weight: 700; letter-spacing: -0.03em; }
.stat-strip span { margin-top: 1px; color: var(--secondary); font-size: 10px; }
.glass-card {
  border: 0.5px solid rgba(60, 60, 67, 0.12);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: saturate(140%) blur(22px);
  -webkit-backdrop-filter: saturate(140%) blur(22px);
}

.map-layout { min-height: 650px; padding: 14px; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; }
.map-column { min-width: 0; display: flex; flex-direction: column; }
.map-search, .owner-search {
  position: relative;
  min-height: 48px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 5px 6px 5px 14px;
  border: 0.5px solid var(--separator);
  border-radius: 14px;
  background: var(--surface-muted);
}
.search-icon { width: 15px; height: 15px; border: 1.8px solid var(--tertiary); border-radius: 50%; position: relative; }
.search-icon::after { content: ""; position: absolute; right: -5px; bottom: -3px; width: 6px; height: 1.8px; border-radius: 2px; background: var(--tertiary); transform: rotate(45deg); }
.map-search input, .owner-search input {
  min-width: 0;
  height: 36px;
  padding: 0 6px;
  border: 0;
  outline: 0;
  color: var(--label);
  background: transparent;
  font-size: 16px;
}
.map-search input::placeholder, .owner-search input::placeholder { color: var(--tertiary); }
.map-search > button, .owner-search > button {
  min-height: 36px;
  padding: 7px 14px;
  border: 0;
  border-radius: 10px;
  color: white;
  background: var(--blue);
  font-size: 13px;
  font-weight: 650;
}
.map-search > button:active, .owner-search > button:active { background: var(--blue-pressed); }
.map-context-bar {
  min-height: 40px;
  margin: 9px 3px 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--secondary);
  font-size: 10px;
}
.map-context-bar label { font-weight: 650; }
.map-context-bar select {
  min-width: 190px;
  min-height: 34px;
  padding: 6px 30px 6px 10px;
  border: .5px solid var(--separator);
  border-radius: 10px;
  color: var(--label);
  background: var(--surface-solid);
  font-size: 11px;
}
.map-context-bar span { margin-left: auto; color: var(--tertiary); }
.search-suggestions {
  position: absolute;
  z-index: 1200;
  top: 54px;
  left: 0;
  right: 0;
  overflow: hidden;
  border: 0.5px solid var(--separator);
  border-radius: 14px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 18px 40px rgba(0,0,0,.16);
}
.search-suggestions button {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 0;
  border-bottom: 0.5px solid var(--separator);
  background: transparent;
  color: var(--label);
  text-align: left;
  font-size: 13px;
}
.search-suggestions button:last-child { border-bottom: 0; }
.search-suggestions button:hover { background: var(--surface-muted); }
.map-frame { position: relative; flex: 1; min-height: 555px; margin-top: 10px; overflow: hidden; border-radius: 19px; background: #e9ecef; }
#parcel-map { position: absolute; inset: 0; z-index: 1; }
.map-loading {
  position: absolute;
  z-index: 500;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  color: var(--secondary);
  font-size: 12px;
}
.map-loading[hidden] { display: none; }
.map-legend {
  position: absolute;
  z-index: 500;
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  padding: 8px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  border: 0.5px solid rgba(60,60,67,.12);
  border-radius: 11px;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--secondary);
  font-size: 10px;
  font-weight: 590;
}
.map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend-swatch { width: 11px; height: 11px; border-radius: 3px; border: 1px solid rgba(0,0,0,.12); }
.legend-swatch.neutral { background: #c7c7cc; }
.legend-swatch.processing { background: var(--orange-bright); }
.legend-swatch.completed { background: var(--green-bright); }
.map-attribution { margin: 7px 5px 0; color: var(--tertiary); font-size: 9px; }
.leaflet-container { font-family: var(--font); background: #e8ebee; }
.leaflet-control-attribution { font-size: 8px !important; }
.leaflet-control-zoom { overflow: hidden; border: 0 !important; border-radius: 12px !important; box-shadow: 0 8px 24px rgba(0,0,0,.13) !important; }
.leaflet-control-zoom a { width: 38px !important; height: 38px !important; line-height: 38px !important; color: var(--blue) !important; border: 0 !important; border-bottom: .5px solid var(--separator) !important; }
.leaflet-pane.leaflet-av-pane { filter: grayscale(1) contrast(.86); opacity: .72; mix-blend-mode: multiply; }
.leaflet-interactive { transition: fill-opacity 160ms ease, stroke-width 160ms ease; }

.parcel-inspector { min-width: 0; padding: 24px 20px; border-radius: 20px; background: var(--surface-muted); }
.inspector-empty { min-height: 100%; display: grid; align-content: center; justify-items: center; padding: 22px 8px; text-align: center; }
.inspector-empty[hidden], .inspector-content[hidden] { display: none; }
.inspector-empty h2, .inspector-content h2 { margin: 14px 0 6px; font-size: 22px; letter-spacing: -0.035em; }
.inspector-empty p, .inspector-note { margin: 0; color: var(--secondary); font-size: 12px; line-height: 1.55; }
.map-pin { width: 43px; height: 43px; border: 3px solid var(--blue); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); position: relative; }
.map-pin::after { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: var(--blue); }
.inspector-kicker { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--secondary); font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; }
.inspector-kicker span:first-child { padding: 5px 7px; border-radius: 7px; color: var(--blue); background: var(--blue-soft); }
.parcel-facts { margin: 19px 0; padding: 0; }
.parcel-facts div { padding: 10px 0; display: flex; justify-content: space-between; gap: 12px; border-bottom: .5px solid var(--separator); }
.parcel-facts dt { color: var(--secondary); font-size: 11px; }
.parcel-facts dd { margin: 0; overflow-wrap: anywhere; text-align: right; font-size: 11px; font-weight: 620; }
.inspector-content label { display: block; margin: 14px 0 6px; color: var(--secondary); font-size: 11px; font-weight: 600; }
.inspector-content select { width: 100%; min-height: 44px; padding: 8px 11px; border: .5px solid var(--separator); border-radius: 11px; outline: 0; color: var(--label); background: var(--surface-solid); font-size: 13px; }
.inspector-content .primary-button { width: 100%; margin-top: 12px; }
.inspector-note { margin-top: 9px; text-align: center; font-size: 10px; }

.inbox-grid { display: grid; grid-template-columns: minmax(330px, .82fr) minmax(520px, 1.18fr); gap: 18px; align-items: start; }
.composer, .queue-card, .search-card, .outbox-card { overflow: hidden; }
.composer { padding: 22px; }
.composer-heading, .card-heading { min-height: 44px; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.composer-heading > div, .card-heading > div { display: flex; align-items: center; gap: 10px; min-width: 0; }
.composer-heading h2, .card-heading h2 { margin: 0; font-size: 17px; letter-spacing: -0.025em; }
.composer-heading > span, .card-heading > span { color: var(--secondary); font-size: 11px; }
.step-number { width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; color: var(--blue); background: var(--blue-soft); font-size: 12px; font-weight: 700; }
textarea {
  width: 100%;
  min-height: 205px;
  margin-top: 15px;
  padding: 15px 16px;
  resize: vertical;
  border: .5px solid var(--separator);
  border-radius: 15px;
  outline: 0;
  color: var(--label);
  background: var(--surface-muted);
  font-size: 16px;
  line-height: 1.55;
  transition: box-shadow 160ms ease, background 160ms ease;
}
textarea:focus, input:focus-visible, select:focus-visible { background: #fffefa; box-shadow: 0 0 0 3px rgba(31,90,82,.16); }
textarea::placeholder { color: var(--tertiary); }
.composer-actions { margin-top: 15px; display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.composer-actions p { max-width: 270px; margin: 0; color: var(--secondary); font-size: 11px; line-height: 1.45; }
.primary-button, .secondary-button, .text-button, .action-button {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  font-weight: 650;
}
.primary-button { padding: 10px 15px; display: inline-flex; align-items: center; justify-content: center; gap: 16px; color: white; background: var(--blue); box-shadow: 0 7px 16px rgba(31,90,82,.18); }
.primary-button:active { background: var(--blue-pressed); transform: scale(.985); }
.button-plus { width: 15px; height: 15px; position: relative; display: inline-block; }
.button-plus::before, .button-plus::after { content: ""; position: absolute; top: 50%; left: 50%; width: 14px; height: 2px; border-radius: 2px; background: currentColor; transform: translate(-50%, -50%); }
.button-plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.button-arrow { width: 14px; height: 10px; position: relative; display: inline-block; border-bottom: 2px solid currentColor; transform: translateY(-3px); }
.button-arrow::after { content: ""; position: absolute; right: -1px; bottom: -5px; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
.secondary-button { padding: 9px 13px; color: var(--blue); background: var(--blue-soft); }
.text-button { min-height: 36px; padding: 6px 8px; color: var(--blue); background: transparent; font-size: 12px; }
.form-message { min-height: 17px; margin: 11px 0 -5px; color: var(--green); font-size: 12px; font-weight: 590; }
.form-message.is-error { color: var(--red); }
.preflight-card { overflow: hidden; }
.preflight-card[hidden] { display: none; }
.preflight-progress { height: 3px; overflow: hidden; background: var(--surface-muted); }
.preflight-progress i { width: 0; height: 100%; display: block; border-radius: 999px; background: linear-gradient(90deg, var(--blue), #5ac8fa); transition: width 220ms ease; }
.preflight-summary { margin: 14px 20px 8px; color: var(--secondary); font-size: 11px; line-height: 1.45; }
.preflight-list { max-height: 375px; padding: 0 20px; overflow: auto; }
.preflight-item { padding: 12px 0; display: grid; grid-template-columns: 28px minmax(0,1fr) auto; gap: 10px; align-items: start; border-top: .5px solid var(--separator); }
.preflight-item:first-child { border-top: 0; }
.preflight-index { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; color: var(--secondary); background: var(--surface-muted); font-size: 10px; font-weight: 700; }
.preflight-item h3 { margin: 1px 0 3px; overflow-wrap: anywhere; font-size: 12px; line-height: 1.35; }
.preflight-item p { margin: 2px 0 0; color: var(--secondary); font-size: 9px; line-height: 1.45; }
.preflight-status { max-width: 135px; padding: 5px 7px; border-radius: 999px; color: var(--secondary); background: var(--surface-muted); font-size: 8px; font-weight: 700; text-align: center; text-transform: uppercase; letter-spacing: .035em; }
.preflight-status.enqueue { color: var(--green); background: var(--green-soft); }
.preflight-status.existing { color: var(--blue); background: var(--blue-soft); }
.preflight-status.invalid { color: var(--red); background: var(--red-soft); }
.preflight-status.duplicate_address, .preflight-status.same_parcel { color: var(--orange); background: var(--orange-soft); }
.preflight-status.pending { color: var(--blue); background: var(--blue-soft); animation: preflight-pulse 1.3s ease-in-out infinite; }
@keyframes preflight-pulse { 50% { box-shadow: 0 0 0 3px rgba(31,90,82,.12); } }
.review-organization { margin: 12px 20px 0; padding: 12px; border: .5px solid var(--separator); border-radius: 13px; background: var(--surface-muted); }
.review-organization legend { padding: 0 5px; color: var(--secondary); font-size: 10px; font-weight: 650; }
.review-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.review-fields label { color: var(--secondary); font-size: 9px; font-weight: 650; }
.review-fields label:last-child { grid-column: 1 / -1; }
.review-fields input, .review-fields select { width: 100%; min-height: 39px; margin-top: 5px; padding: 8px 10px; border: .5px solid var(--separator); border-radius: 10px; outline: 0; color: var(--label); background: white; font-size: 12px; }
.review-fields [hidden] { display: none; }
.preflight-actions { padding: 14px 20px 4px; display: flex; justify-content: space-between; gap: 10px; }
.preflight-actions button { flex: 1; }
.preflight-card .form-message { margin: 8px 20px 14px; }
.card-heading { padding: 18px 20px 14px; border-bottom: .5px solid var(--separator); }
.active-run { margin: 15px; padding: 17px; border-radius: 16px; background: linear-gradient(135deg, rgba(255,149,0,.13), rgba(255,255,255,.88)); border: .5px solid rgba(255,149,0,.2); }
.active-run[hidden] { display: none; }
.active-run-head { display: flex; align-items: flex-start; gap: 13px; }
.processing-orb { width: 35px; height: 35px; flex: 0 0 auto; position: relative; border-radius: 50%; background: var(--orange-soft); }
.processing-orb::before { content: ""; position: absolute; inset: 7px; border: 2px solid rgba(255,149,0,.25); border-top-color: var(--orange-bright); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.active-run h3 { margin: 1px 0 3px; font-size: 14px; letter-spacing: -.02em; }
.active-run p { margin: 0; color: var(--secondary); font-size: 11px; }
.stage-timeline { margin: 15px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5,1fr); list-style: none; }
.stage-timeline li { position: relative; padding-top: 18px; color: var(--tertiary); text-align: center; font-size: 8px; line-height: 1.2; }
.stage-timeline li::before { content: ""; position: absolute; z-index: 2; top: 2px; left: 50%; width: 9px; height: 9px; transform: translateX(-50%); border: 2px solid white; border-radius: 50%; background: #c7c7cc; box-shadow: 0 0 0 1px #c7c7cc; }
.stage-timeline li::after { content: ""; position: absolute; top: 6px; left: -50%; right: 50%; height: 2px; background: #d1d1d6; }
.stage-timeline li:first-child::after { display: none; }
.stage-timeline li.is-done, .stage-timeline li.is-active { color: var(--label); }
.stage-timeline li.is-done::before { background: var(--green-bright); box-shadow: 0 0 0 1px var(--green-bright); }
.stage-timeline li.is-active::before { background: var(--orange-bright); box-shadow: 0 0 0 4px var(--orange-soft); animation: timeline-pulse 1.6s ease-in-out infinite; }
@keyframes timeline-pulse { 50% { box-shadow: 0 0 0 7px rgba(255,149,0,.05); } }
.queue-groups { padding: 0 15px 15px; }
.queue-day { margin-top: 15px; }
.queue-day-heading { margin: 0 2px 7px; display: flex; justify-content: space-between; color: var(--secondary); font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; }
.queue-item { min-height: 58px; padding: 10px 11px; display: grid; grid-template-columns: 27px minmax(0,1fr) auto; align-items: center; gap: 10px; border-bottom: .5px solid var(--separator); }
.queue-item:last-child { border-bottom: 0; }
.queue-position { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; color: var(--secondary); background: var(--surface-muted); font-size: 10px; font-weight: 650; }
.queue-item h3 { margin: 0; overflow-wrap: anywhere; font-size: 12px; line-height: 1.35; }
.queue-item p { margin: 3px 0 0; color: var(--secondary); font-size: 9px; }
.queue-item button { min-width: 44px; min-height: 44px; border: 0; color: var(--red); background: transparent; font-size: 11px; }

.dossier-card { margin-bottom: 18px; overflow: hidden; }
.dossier-heading { align-items: center; }
.dossier-actions { display: flex; gap: 7px; }
.dossier-create-row { margin: 15px 20px 10px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.dossier-create-row input {
  min-width: 0;
  min-height: 42px;
  padding: 9px 12px;
  border: .5px solid var(--separator);
  border-radius: 11px;
  outline: 0;
  color: var(--label);
  background: var(--surface-muted);
  font-size: 13px;
}
.dossier-list { padding: 2px 20px 13px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.dossier-chip { min-width: 158px; padding: 11px 12px; border: .5px solid var(--separator); border-radius: 13px; color: var(--label); background: var(--surface-muted); text-align: left; }
.dossier-chip.is-active { border-color: rgba(31,90,82,.35); background: var(--blue-soft); box-shadow: inset 0 0 0 1px rgba(31,90,82,.08); }
.dossier-chip strong, .dossier-chip span { display: block; }
.dossier-chip strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.dossier-chip span { margin-top: 3px; color: var(--secondary); font-size: 9px; }
.archive-filters { padding: 12px 20px; display: grid; grid-template-columns: minmax(160px,1fr) minmax(140px,.7fr) auto; align-items: end; gap: 10px; border-top: .5px solid var(--separator); background: rgba(242,242,247,.65); }
.archive-filters label { color: var(--secondary); font-size: 9px; font-weight: 650; }
.archive-filters select { width: 100%; min-height: 39px; margin-top: 4px; padding: 8px 28px 8px 10px; border: .5px solid var(--separator); border-radius: 10px; color: var(--label); background: white; font-size: 11px; }
.archive-filters > span { min-height: 39px; display: flex; align-items: center; justify-content: flex-end; color: var(--secondary); font-size: 10px; }
.organization-delete-row {
  min-height: 58px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--separator);
}
.organization-delete-row p { max-width: 650px; margin: 0; color: var(--secondary); font-size: 11px; line-height: 1.45; }
.organization-delete-row > div { display: flex; gap: 8px; }
.danger-button {
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid #d7b9b6;
  border-radius: 7px;
  color: var(--red);
  background: #fffaf9;
  font-size: 11px;
  font-weight: 680;
}
.danger-button:hover:not(:disabled) { background: var(--red-soft); }
.danger-button:disabled { color: var(--tertiary); border-color: var(--separator); background: var(--surface-muted); }
.dossier-message { margin: 0 20px 10px; }
.organization-chips { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; }
.organization-chip { padding: 4px 7px; border-radius: 999px; color: var(--blue); background: var(--blue-soft); font-size: 8px; font-weight: 650; }
.organization-chip.tag { color: #86522f; background: #f1e5db; }
.organize-panel { margin-top: 10px; padding: 11px; display: grid; grid-template-columns: minmax(130px,.7fr) minmax(180px,1fr) auto; gap: 8px; align-items: end; border-radius: 12px; background: var(--surface-muted); }
.organize-panel label { color: var(--secondary); font-size: 8px; font-weight: 650; }
.organize-panel select, .organize-panel input { width: 100%; min-height: 37px; margin-top: 4px; padding: 7px 9px; border: .5px solid var(--separator); border-radius: 9px; color: var(--label); background: white; font-size: 10px; }
.organize-panel button { min-height: 37px; padding: 7px 10px; border: 0; border-radius: 9px; color: white; background: var(--blue); font-size: 10px; font-weight: 650; }
.archive-view { max-width: 1180px; margin: 0 auto; }
.search-card { margin-bottom: 18px; }
.archive-search-heading { align-items: center; }
.owner-search { margin: 17px 20px 13px; }
.selection-bar { min-height: 39px; margin: 0 20px 10px; padding: 7px 10px; display: flex; align-items: center; justify-content: space-between; border-radius: 10px; color: var(--blue); background: var(--blue-soft); font-size: 11px; font-weight: 620; }
.selection-bar[hidden] { display: none; }
.selection-bar button { border: 0; color: var(--blue); background: transparent; font-size: 11px; }
.search-results { padding: 0 20px 18px; }
.search-result { padding: 14px 0; display: grid; grid-template-columns: 30px minmax(0,1fr) auto; gap: 11px; align-items: start; border-top: .5px solid var(--separator); }
.search-result:first-child { border-top: 0; }
.search-result input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--blue); }
.search-result h3 { margin: 0; font-size: 14px; letter-spacing: -.02em; }
.search-result .owner-match { margin: 4px 0 0; color: var(--green); font-size: 11px; font-weight: 590; }
.search-result .result-meta { margin: 5px 0 0; color: var(--secondary); font-size: 10px; }
.search-result a { min-height: 38px; padding: 8px 10px; display: inline-flex; align-items: center; border-radius: 10px; color: var(--blue); background: var(--blue-soft); font-size: 10px; font-weight: 650; text-decoration: none; }
.job-list { padding: 0 20px 18px; }
.job-card { padding: 16px 0; border-bottom: .5px solid var(--separator); }
.job-card:last-child { border-bottom: 0; }
.job-topline { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.job-address { margin: 0; font-size: 14px; line-height: 1.4; letter-spacing: -.02em; }
.status-pill { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; color: var(--secondary); background: var(--surface-muted); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.status-pill.completed { color: var(--green); background: var(--green-soft); }
.status-pill.processing { color: var(--orange); background: var(--orange-soft); }
.status-pill.blocked { color: var(--orange); background: var(--orange-soft); }
.status-pill.failed { color: var(--red); background: var(--red-soft); }
.status-pill.pending { color: var(--blue); background: var(--blue-soft); }
.job-meta { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 5px; color: var(--secondary); font-size: 10px; }
.meta-separator { color: #c7c7cc; }
.result-grid { margin-top: 12px; padding: 11px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; border-radius: 12px; background: var(--surface-muted); }
.result-item span, .result-item strong { display: block; }
.result-item span { color: var(--secondary); font-size: 8px; text-transform: uppercase; letter-spacing: .06em; }
.result-item strong { margin-top: 3px; overflow-wrap: anywhere; font-size: 11px; }
.owner-list { margin: 10px 0 0; padding: 0; list-style: none; }
.owner-list li { margin-top: 5px; padding-left: 13px; position: relative; color: #3a3a3c; font-size: 11px; line-height: 1.45; }
.owner-list li::before { content: ""; position: absolute; left: 0; top: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--green-bright); }
.result-note, .error-copy { margin: 8px 0 0; color: var(--secondary); font-size: 10px; line-height: 1.45; }
.error-copy { color: var(--orange); }
.job-actions { margin-top: 11px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.action-button { min-height: 40px; padding: 8px 11px; display: inline-flex; align-items: center; justify-content: center; color: white; background: var(--blue); font-size: 10px; text-decoration: none; }
.action-button.secondary { color: var(--blue); background: var(--blue-soft); }
.action-button.danger { color: var(--red); background: transparent; }
.empty-state { min-height: 170px; padding: 30px 18px; display: grid; place-content: center; justify-items: center; text-align: center; color: var(--secondary); }
.empty-state[hidden] { display: none; }
.empty-state > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: var(--blue); background: var(--blue-soft); font-size: 18px; }
.empty-state h3 { margin: 11px 0 4px; color: var(--label); font-size: 14px; }
.empty-state p { max-width: 350px; margin: 0; font-size: 11px; line-height: 1.5; }
.compact-empty { min-height: 140px; }
.mobile-tabbar { display: none; }
.app-footer { width: min(1540px,100%); margin: 0 auto; padding: 0 clamp(18px,4vw,52px) 28px; display: flex; justify-content: space-between; gap: 16px; color: var(--tertiary); font-size: 9px; }

button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 3px solid rgba(31,90,82,.28); outline-offset: 2px; }

@media (max-width: 1080px) {
  .app-header { grid-template-columns: 1fr auto auto; }
  .map-layout { grid-template-columns: minmax(0,1fr) 280px; }
  .inbox-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  body { padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
  .app-header { min-height: 64px; padding: 10px 16px; grid-template-columns: 1fr auto; }
  .desktop-nav { display: none; }
  .brand small { display: none; }

  .connection { font-size: 0; gap: 0; }
  .connection-dot { width: 9px; height: 9px; }
  .app-main { padding: 24px 14px 28px; }
  .view-heading { display: block; margin-bottom: 18px; }
  .view-heading h1 { font-size: 36px; }
  .view-heading p { font-size: 13px; }
  .stat-strip { width: 100%; margin-top: 17px; }
  .stat-strip div { min-width: 0; }
  .map-context-bar { flex-wrap: wrap; }
  .map-context-bar select { flex: 1; min-width: 160px; }
  .map-context-bar span { width: 100%; margin-left: 0; }
  .map-layout { min-height: 0; grid-template-columns: 1fr; padding: 10px; border-radius: 23px; }
  .map-frame { min-height: 54vh; }
  .parcel-inspector { padding: 18px 16px; }
  .inspector-empty { min-height: 160px; }
  .mobile-tabbar {
    position: fixed;
    z-index: 1500;
    left: 10px;
    right: 10px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    min-height: 61px;
    padding: 5px;
    display: grid;
    grid-template-columns: repeat(3,1fr);
    border: .5px solid rgba(60,60,67,.17);
    border-radius: 20px;
    background: rgba(248,248,250,.9);
    box-shadow: 0 12px 34px rgba(0,0,0,.16);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
  }
  .mobile-tab { position: relative; min-height: 51px; border: 0; border-radius: 15px; color: var(--secondary); background: transparent; font-size: 9px; font-weight: 620; }
  .mobile-tab > .tab-icon { width: 19px; height: 19px; display: block; position: relative; margin: 0 auto 3px; color: currentColor; }
  .tab-map { border: 2px solid currentColor; border-radius: 50%; }
  .tab-map::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: currentColor; }
  .tab-map::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateX(-50%) rotate(45deg); background: inherit; }
  .tab-inbox { border: 2px solid currentColor; border-radius: 5px; }
  .tab-inbox::before, .tab-inbox::after { content: ""; position: absolute; top: 50%; left: 50%; width: 10px; height: 2px; border-radius: 2px; background: currentColor; transform: translate(-50%, -50%); }
  .tab-inbox::after { transform: translate(-50%, -50%) rotate(90deg); }
  .tab-archive { border: 2px solid currentColor; border-radius: 3px; }
  .tab-archive::before { content: ""; position: absolute; left: 2px; right: 2px; top: 4px; border-top: 2px solid currentColor; }

  .mobile-tab.is-active { color: var(--blue); background: var(--blue-soft); }
  .app-footer { display: block; padding: 0 16px 18px; line-height: 1.65; }
  .app-footer span { display: block; }
}

@media (max-width: 560px) {
  .brand strong { font-size: 15px; }
  .app-main { padding-left: 10px; padding-right: 10px; }
  .view-heading { margin-left: 6px; margin-right: 6px; }
  .view-heading h1 { font-size: 34px; }
  .glass-card { border-radius: 22px; }
  .map-search, .owner-search { grid-template-columns: auto 1fr; padding-right: 10px; }
  .map-search > button, .owner-search > button { grid-column: 1 / -1; width: 100%; }
  .map-frame { min-height: 52vh; }
  .map-legend { gap: 8px; }
  .composer { padding: 16px; }
  textarea { min-height: 190px; }
  .composer-actions { display: block; }
  .composer-actions p { max-width: none; margin-bottom: 11px; }
  .composer-actions .primary-button { width: 100%; justify-content: space-between; }
  .preflight-item { grid-template-columns: 27px minmax(0,1fr); }
  .preflight-status { grid-column: 2; justify-self: start; }
  .review-fields { grid-template-columns: 1fr; }
  .review-fields label:last-child { grid-column: auto; }
  .preflight-actions { display: grid; }
  .dossier-heading { align-items: flex-start; }
  .dossier-actions { display: grid; }
  .dossier-create-row { margin-left: 14px; margin-right: 14px; grid-template-columns: 1fr; }
  .dossier-create-row .primary-button { width: 100%; }
  .dossier-list { padding-left: 14px; padding-right: 14px; }
  .archive-filters { padding-left: 14px; padding-right: 14px; grid-template-columns: 1fr; }
  .archive-filters > span { min-height: 20px; justify-content: flex-start; }
  .organize-panel { grid-template-columns: 1fr; }
  .card-heading { padding-left: 15px; padding-right: 15px; }
  .stage-timeline li { font-size: 7px; }
  .archive-search-heading { align-items: flex-start; }
  .archive-search-heading .secondary-button { min-height: 44px; }
  .owner-search { margin-left: 14px; margin-right: 14px; }
  .search-results, .job-list { padding-left: 15px; padding-right: 15px; }
  .search-result { grid-template-columns: 28px minmax(0,1fr); }
  .search-result a { grid-column: 2; justify-self: start; }
  .result-grid { grid-template-columns: 1fr 1fr; }
  .job-actions .action-button { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .processing-orb::before { border-color: var(--orange-bright); }
  .stage-timeline li.is-active::before { box-shadow: 0 0 0 4px var(--orange-soft); }
}

/* 0.4 record-workspace redesign */
:root {
  --canvas: #f3f1ec;
  --surface: #fdfcf9;
  --surface-solid: #fdfcf9;
  --surface-muted: #eeece6;
  --label: #192522;
  --secondary: #626d68;
  --tertiary: #78817d;
  --separator: #d7d3ca;
  --blue: #1f5a52;
  --blue-pressed: #174740;
  --blue-soft: #e1ebe8;
  --green: #2f7450;
  --green-bright: #4d8a69;
  --green-soft: #e3eee7;
  --orange: #8a4c25;
  --orange-bright: #b96f3f;
  --orange-soft: #f1e5db;
  --red: #a94742;
  --red-soft: #f3e3e1;
  --copper: #c58a52;
  --radius-xl: 14px;
  --radius-lg: 12px;
  --radius-md: 9px;
  --shadow: 0 10px 28px rgba(25, 37, 34, 0.07);
}
body { background: var(--canvas); }
.app-header {
  min-height: 68px;
  padding: 0 clamp(20px, 3vw, 34px);
  grid-template-columns: auto 1fr auto;
  gap: 38px;
  background: #1b2926;
  border-bottom: 1px solid #35433f;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.brand { color: #f7f4ed; }
.brand-wordmark { display: block; padding-left: 14px; border-left: 2px solid var(--copper); }
.brand strong { font-size: 16px; font-weight: 680; letter-spacing: -0.01em; }
.brand small { margin-top: 3px; color: #aeb9b5; font-size: 10px; font-weight: 540; letter-spacing: .035em; text-transform: uppercase; }
.desktop-nav.segmented {
  justify-self: start;
  height: 68px;
  padding: 0;
  gap: 27px;
  border-radius: 0;
  background: transparent;
}
.desktop-nav .nav-button {
  height: 68px;
  min-height: 68px;
  padding: 0;
  border-radius: 0;
  border-bottom: 3px solid transparent;
  color: #aeb9b5;
  font-size: 13px;
  font-weight: 680;
}
.desktop-nav .nav-button:hover { color: #ffffff; }
.desktop-nav .nav-button.is-active { color: #ffffff; background: transparent; border-bottom-color: var(--copper); box-shadow: none; }

.connection { color: #c2ccc8; }
.connection.is-live .connection-dot { background: #6da581; box-shadow: 0 0 0 3px rgba(109,165,129,.18); }
.connection.is-offline .connection-dot { background: #d07068; box-shadow: 0 0 0 3px rgba(208,112,104,.18); }
.app-main { width: min(1540px, 100%); padding: 26px clamp(18px, 3vw, 34px) 38px; }
.card,
.glass-card {
  border: 1px solid var(--separator);
  border-radius: var(--radius-xl);
  background: var(--surface-solid);
  box-shadow: var(--shadow);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.primary-button,
.secondary-button,
.action-button { min-height: 44px; border-radius: 8px; font-size: 13px; }
.primary-button { background: var(--blue); box-shadow: 0 5px 12px rgba(31,90,82,.18); }
.primary-button:hover { background: var(--blue-pressed); }
.secondary-button { color: var(--blue); background: var(--blue-soft); }
.secondary-button:hover { background: #d5e3df; }
.overview-view { max-width: 1480px; margin: 0 auto; }
.overview-heading { margin-bottom: 16px; display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.overview-heading h1 { margin: 4px 0 6px; font-size: clamp(34px, 3.2vw, 46px); line-height: 1; letter-spacing: -0.04em; font-weight: 680; }
.overview-heading p:not(.eyebrow) { margin: 0; color: var(--secondary); font-size: 14px; }

.overview-new {
  position: relative;
  min-height: 90px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}
.overview-new-label strong,
.overview-new-label span { display: block; }
.overview-new-label strong { font-size: 15px; }
.overview-new-label span { margin-top: 4px; color: var(--secondary); font-size: 12px; }
.overview-new textarea {
  width: 100%;
  min-height: 52px;
  max-height: 118px;
  margin: 0;
  padding: 14px 16px;
  resize: vertical;
  border: 1px solid var(--separator);
  border-radius: 9px;
  color: var(--label);
  background: #f7f5f0;
  font-size: 16px;
  line-height: 1.45;
}
.overview-message { position: absolute; left: 206px; bottom: 1px; margin: 0; font-size: 12px; }
.overview-grid {
  min-height: 570px;
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(320px, 0.62fr);
  gap: 16px;
  align-items: stretch;
}
.overview-records { min-width: 0; overflow: hidden; }
.overview-section-heading {
  min-height: 58px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--separator);
}
.overview-section-heading h2 { margin: 0; font-size: 17px; letter-spacing: -0.02em; }
.overview-section-heading .secondary-button { min-height: 38px; }
.overview-filters { display: flex; gap: 8px; }
.overview-filters select {
  height: 38px;
  min-width: 130px;
  padding: 0 30px 0 11px;
  border: 1px solid var(--separator);
  border-radius: 8px;
  color: var(--label);
  background: #fffefa;
  font-size: 12px;
}
.overview-search { margin: 14px 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.overview-search input {
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--separator);
  border-radius: 8px;
  outline: 0;
  color: var(--label);
  background: #f7f5f0;
  font-size: 15px;
}
.overview-table-head,
.overview-record {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) 74px 86px minmax(165px, 1fr) 132px;
  gap: 12px;
  align-items: center;
}
.overview-table-head {
  min-height: 30px;
  margin: 0 16px;
  color: var(--secondary);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.overview-record-list { padding: 0 16px 14px; }
.overview-record { min-height: 82px; border-top: 1px solid var(--separator); }
.overview-property strong,
.overview-property small { display: block; }
.overview-property strong { overflow-wrap: anywhere; font-size: 13px; line-height: 1.35; }
.overview-property small { margin-top: 4px; color: var(--secondary); font-size: 11px; }
.overview-canton,
.overview-units { font-size: 13px; }
.overview-owners { min-width: 0; font-size: 12px; line-height: 1.4; }
.overview-owners > span:first-child { display: block; overflow-wrap: anywhere; }
.overview-ownership {
  width: fit-content;
  max-width: 100%;
  margin-top: 5px;
  padding: 4px 8px;
  display: block;
  overflow: visible;
  border-radius: 5px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
  white-space: normal;
}
.overview-open { min-height: 40px; padding: 8px 11px; border-radius: 7px; font-size: 11px; }
.overview-side { min-width: 0; display: grid; grid-template-rows: auto 1fr; gap: 16px; }
.overview-status,
.overview-dossiers { overflow: hidden; }
.overview-stat-grid { padding: 16px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.overview-stat-grid div { padding: 14px 12px; border-radius: 7px; background: var(--surface-muted); }
.overview-stat-grid strong,
.overview-stat-grid span { display: block; }
.overview-stat-grid strong { font-size: 23px; }
.overview-stat-grid span { margin-top: 3px; color: var(--secondary); font-size: 11px; }
.overview-dossier-list { padding: 5px 16px 15px; }
.overview-dossier-row {
  width: 100%;
  min-height: 64px;
  padding: 11px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-top: 1px solid var(--separator);
  color: var(--label);
  background: transparent;
  text-align: left;
}
.overview-dossier-row:first-child { border-top: 0; }
.overview-dossier-row:hover { color: var(--blue); }
.overview-dossier-row strong,
.overview-dossier-row small { display: block; }
.overview-dossier-row strong { font-size: 13px; }
.overview-dossier-row small { margin-top: 4px; color: var(--secondary); font-size: 11px; }
.overview-dossier-row b { color: var(--blue); font-size: 12px; }
.status-pill,
.soft-badge,
.organization-chip { border-radius: 5px; }
.selection-bar { border-radius: 7px; }
.map-pin { border-color: var(--blue); }
.leaflet-control-zoom a { color: var(--blue) !important; }
.preflight-progress i { background: linear-gradient(90deg, var(--blue), #5f9189); }
.dossier-chip.is-active { border-color: rgba(31,90,82,.38); background: var(--blue-soft); box-shadow: inset 0 0 0 1px rgba(31,90,82,.08); }
.view-heading { margin-bottom: 18px; }
.view-heading h1 { font-size: clamp(34px, 3.2vw, 46px); }
.map-layout { border-radius: 20px; }
.inbox-grid { gap: 16px; }
.composer,
.queue-card { border-radius: 20px; }
.archive-view { max-width: 1480px; }
.dossier-card,
.search-card { margin-bottom: 16px; }
.job-address { font-size: 14px; }
.job-meta,
.result-note,
.error-copy { font-size: 11px; }
.result-item span { font-size: 10px; }
.result-item strong,
.owner-list li { font-size: 12px; }
.preflight-summary,
.preflight-item h3 { font-size: 12px; }
.preflight-item p,
.preflight-status,
.review-fields label { font-size: 10px; }
.preflight-status { max-width: 190px; line-height: 1.3; }
.data-provenance { color: #6f5a46; font-weight: 600; }

@media (max-width: 1120px) {
  .overview-grid { grid-template-columns: 1fr; }
  .overview-side { grid-template-columns: minmax(280px, 0.7fr) minmax(360px, 1.3fr); grid-template-rows: auto; }
  .overview-table-head,
  .overview-record { grid-template-columns: minmax(210px, 1.35fr) 65px 75px minmax(150px, 1fr) 120px; }
}

@media (max-width: 820px) {
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .app-header { min-height: 64px; padding: 0 16px; grid-template-columns: 1fr auto; }
  .brand small { display: none; }
  .app-main { padding: 22px 10px 26px; }
  .overview-heading { display: block; margin: 0 6px 16px; }
  .overview-heading h1 { max-width: 100%; font-size: 31px; overflow-wrap: anywhere; }
  .overview-heading p:not(.eyebrow) { font-size: 13px; }

  .overview-new { padding: 18px; grid-template-columns: 1fr; gap: 12px; }
  .overview-new textarea { min-height: 76px; }
  .overview-new .primary-button { width: 100%; }
  .overview-message { position: static; grid-column: 1; min-height: 0; }
  .overview-grid { min-height: 0; grid-template-columns: 1fr; }
  .overview-side { display: contents; }
  .overview-status { order: 1; }
  .overview-records { order: 2; }
  .overview-dossiers { order: 3; }
  .overview-filters { width: 100%; }
  .overview-filters select { flex: 1; min-width: 0; }
  .overview-table-head { display: none; }
  .overview-record-list { padding: 0 16px 12px; }
  .overview-record {
    min-height: 0;
    padding: 16px 0;
    grid-template-columns: 1fr auto auto;
    gap: 9px 12px;
    align-items: start;
  }
  .overview-property { grid-column: 1 / -1; }
  .overview-canton::before { content: "Kanton "; color: var(--secondary); font-weight: 500; }
  .overview-units::before { content: "Einheiten "; color: var(--secondary); font-weight: 500; }
  .overview-owners { grid-column: 1 / -1; }
  .overview-open { grid-column: 1 / -1; width: 100%; }
  .overview-section-heading { align-items: flex-start; min-height: 58px; padding-top: 12px; padding-bottom: 12px; }
  .overview-section-heading:has(.overview-filters) { display: grid; }
  .mobile-tabbar { grid-template-columns: repeat(4, 1fr); }
  .mobile-tab > .tab-icon { display: none; }
  .mobile-tab { min-height: 51px; font-size: 10px; }

  .app-footer { padding-bottom: 12px; font-size: 10px; }
}

@media (max-width: 520px) {
  .overview-heading h1 { font-size: 31px; }

  .overview-section-heading { display: grid; }
  .overview-filters { display: grid; grid-template-columns: 1fr 1fr; }
  .overview-search { grid-template-columns: 1fr; }
  .overview-search .secondary-button { width: 100%; }
  .overview-stat-grid div { padding: 12px 9px; }
  .map-search,
  .owner-search { grid-template-columns: auto 1fr; }
  .map-search > button,
  .owner-search > button { grid-column: 1 / -1; width: 100%; }
}
