:root {
  --paper: #fbfbf7;
  --paper-deep: #eef3ef;
  --surface: #ffffff;
  --surface-soft: #f4f7f2;
  --ink: #16211d;
  --muted: #5b6862;
  --line: #d9e0dc;
  --line-strong: #aebbb4;
  --blue: #1e5f77;
  --blue-dark: #123f51;
  --green: #42735d;
  --yellow: #f0c65a;
  --coral: #d86f57;
  --help: #d86f57;
  --basics: #1e5f77;
  --free: #b88415;
  --safe: #42735d;
  --access: #5f6d72;
  --fix: #123f51;
  --bright: #f0c65a;
  --bright-deep: #b88415;
  --danger: #a9443a;
  --shadow: 0 18px 50px rgba(22, 33, 29, 0.12);
  --shadow-soft: 0 8px 26px rgba(22, 33, 29, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(240, 198, 90, 0.16), rgba(255, 255, 255, 0) 42%),
    linear-gradient(180deg, rgba(18, 63, 81, 0.08), rgba(255, 255, 255, 0) 220px),
    var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.45;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

.app-shell {
  min-height: 100vh;
  padding-bottom: 86px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(18, 63, 81, 0.96);
  box-shadow: 0 10px 34px rgba(18, 33, 29, 0.18);
  backdrop-filter: blur(14px);
}

.brand-button,
.top-actions,
.desktop-nav,
.bottom-nav,
.card-actions,
.row-actions,
.card-topline,
.form-actions,
.segmented,
.filter-chips,
.report-tabs {
  display: flex;
  align-items: center;
}

.brand-button {
  min-width: 0;
  gap: 10px;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 0;
  text-align: left;
}

.brand-button strong {
  display: block;
  font-size: 1rem;
  letter-spacing: 0;
}

.brand-button small {
  display: block;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.78rem;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(240, 198, 90, 0.55);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(6, 20, 24, 0.2);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-actions {
  flex-wrap: wrap;
  gap: 8px;
}

.desktop-nav {
  display: none;
  gap: 6px;
}

.bright-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  border: 1px solid rgba(240, 198, 90, 0.62);
  border-radius: 8px;
  background: var(--yellow);
  color: var(--ink);
  padding: 0 13px;
  font-weight: 900;
}

.subtle-admin {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.bright-link:hover {
  border-color: #fff;
  background: #f6d77a;
}

.view {
  display: none;
  width: min(1220px, 100%);
  margin: 0 auto;
  padding: 16px 14px 28px;
}

.view.is-active {
  display: block;
}

.home-hero,
.screen-heading {
  display: grid;
  gap: 10px;
}

.home-hero {
  position: relative;
  min-height: clamp(360px, 58vh, 500px);
  align-content: end;
  gap: 16px;
  isolation: isolate;
  overflow: hidden;
  border-radius: 8px;
  background: var(--blue-dark);
  color: #fff;
  padding: clamp(28px, 7vw, 72px);
  box-shadow: var(--shadow);
}

.home-hero::before,
.home-hero::after {
  position: absolute;
  inset: 0;
  content: "";
}

.home-hero::before {
  z-index: -2;
  background: url("assets/community-hero.png") center / cover no-repeat;
  transform: scale(1.01);
}

.home-hero::after {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(12, 31, 34, 0.92) 0%, rgba(12, 31, 34, 0.72) 44%, rgba(12, 31, 34, 0.18) 100%),
    linear-gradient(0deg, rgba(12, 31, 34, 0.74), rgba(12, 31, 34, 0.06) 56%);
}

.eyebrow {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.home-hero .eyebrow {
  color: var(--yellow);
}

h1 {
  max-width: 1080px;
  font-size: clamp(2rem, 6.4vw, 3.3rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.home-hero h1 {
  max-width: 720px;
  color: #fff;
  font-size: clamp(3rem, 14vw, 7.2rem);
  line-height: 0.86;
}

h2 {
  font-size: clamp(1.7rem, 7vw, 3rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  font-size: 1.05rem;
}

h4 {
  font-size: 1rem;
}

.hero-copy,
.screen-heading p,
.description,
.admin-help,
.detail-grid dd,
.queue-card p,
.admin-record p,
.home-strip span {
  color: var(--muted);
}

.hero-copy {
  max-width: 680px;
  font-size: 1.03rem;
}

.home-hero .hero-copy {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1rem, 2.1vw, 1.22rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.hero-actions > * {
  justify-content: center;
}

.emergency-note {
  display: grid;
  gap: 6px;
  margin: 14px 0;
  border: 1px solid rgba(216, 111, 87, 0.22);
  border-left: 4px solid var(--help);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  padding: 10px 14px;
  box-shadow: var(--shadow-soft);
}

.emergency-note span {
  color: #675b55;
}

.quick-need-panel {
  display: grid;
  gap: 12px;
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 14px;
}

.quick-need-panel h2 {
  margin-top: 2px;
  font-size: clamp(1.55rem, 4.8vw, 2.3rem);
}

.quick-need-grid {
  display: grid;
  gap: 10px;
}

.quick-need-button {
  display: grid;
  min-height: 92px;
  gap: 6px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  padding: 14px;
  text-align: left;
  box-shadow: var(--shadow-soft);
}

.quick-need-button span {
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.1;
}

.quick-need-button small {
  color: var(--muted);
  font-size: 0.88rem;
}

.quick-need-button:hover {
  border-color: rgba(30, 95, 119, 0.34);
  transform: translateY(-1px);
}

.quick-need-button.primary-need {
  border-color: rgba(240, 198, 90, 0.72);
  background:
    linear-gradient(135deg, rgba(240, 198, 90, 0.3), rgba(255, 255, 255, 0.96)),
    #fff;
  box-shadow: 0 18px 40px rgba(22, 33, 29, 0.11);
}

.bright-bridge {
  position: relative;
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 12px;
  margin: 18px 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background:
    radial-gradient(circle at 88% 14%, rgba(240, 198, 90, 0.2), transparent 26%),
    linear-gradient(135deg, #123f51, #16211d 62%, #42735d);
  color: #fff;
  box-shadow: var(--shadow);
  padding: 16px;
}

.bright-ribbon {
  min-height: 100%;
  border-radius: 999px;
  background:
    linear-gradient(180deg, var(--yellow), var(--coral) 52%, var(--green));
}

.bright-bridge h2 {
  margin: 4px 0 8px;
  font-size: clamp(1.7rem, 5vw, 2.4rem);
}

.bright-bridge p {
  max-width: 820px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.36;
}

.bridge-line {
  margin-top: 10px;
  color: var(--yellow) !important;
  font-weight: 900;
}

.bridge-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.home-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.home-card {
  position: relative;
  display: grid;
  min-height: 112px;
  gap: 8px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 15px;
  padding-right: 86px;
  text-align: left;
  box-shadow: var(--shadow-soft);
}

.home-card::after {
  position: absolute;
  right: 16px;
  bottom: 16px;
  border: 1px solid rgba(22, 33, 29, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  content: "Open";
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 900;
}

.home-card span {
  display: block;
  font-size: 1.14rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.08;
}

.home-card small {
  color: var(--muted);
  font-size: 0.9rem;
}

.home-card.urgent {
  border-left: 7px solid var(--help);
}

.home-card.basics {
  border-left: 7px solid var(--basics);
}

.home-card.free {
  border-left: 7px solid var(--free);
}

.home-card.calm {
  border-left: 7px solid var(--safe);
}

.home-card.access {
  border-left: 7px solid var(--access);
}

.home-card.fix {
  border-left: 7px solid var(--fix);
}

.home-card:hover,
.record-card:hover {
  transform: translateY(-1px);
}

.home-card:hover {
  border-color: rgba(30, 95, 119, 0.32);
  box-shadow: 0 18px 40px rgba(22, 33, 29, 0.12);
}

.home-strip {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.home-strip article {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

.screen-heading {
  margin-bottom: 14px;
}

.screen-heading .primary-button,
.screen-heading .secondary-button {
  justify-self: start;
}

.helper-panel,
.filters-panel,
.map-workspace,
.report-panel,
.admin-panel,
.record-card,
.queue-card,
.admin-record,
.empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.helper-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border-color: rgba(196, 69, 54, 0.35);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.helper-grid {
  display: grid;
  gap: 8px;
}

.helper-grid button {
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  text-align: left;
  font-weight: 800;
}

.helper-result {
  color: var(--coral);
  font-weight: 800;
}

.filters-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  color: #394742;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px 11px;
}

textarea {
  min-height: 116px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(30, 95, 119, 0.24);
  outline-offset: 2px;
}

.filter-chips,
.event-filters,
.report-tabs {
  flex-wrap: wrap;
  gap: 8px;
}

.chip,
.tab-button,
.mode-button,
.text-button,
.primary-button,
.secondary-button,
.danger-button,
.exit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 13px;
  font-weight: 850;
}

.chip,
.tab-button,
.mode-button,
.text-button {
  border-color: var(--line);
  background: #fff;
  color: #4b585c;
}

.chip.is-active,
.tab-button.is-active,
.mode-button.is-active {
  background: var(--blue-dark);
  color: #fff;
}

.primary-button {
  border-color: var(--yellow);
  background: var(--yellow);
  color: var(--ink);
}

.primary-button:hover {
  border-color: #f6d77a;
  background: #f6d77a;
}

.secondary-button {
  border-color: var(--line-strong);
  background: #fff;
  color: var(--ink);
}

.secondary-button:hover,
.text-button:hover {
  border-color: var(--blue);
  color: var(--blue-dark);
}

.topbar .text-button {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.topbar .text-button:hover {
  border-color: rgba(240, 198, 90, 0.8);
  color: var(--yellow);
}

.home-hero .secondary-button,
.bright-bridge .secondary-button {
  border-color: transparent;
  background: #fff;
  color: var(--ink);
}

.bright-bridge .primary-button {
  border-color: var(--yellow);
  background: var(--yellow);
  color: var(--ink);
}

.danger-button,
.exit-button {
  border-color: rgba(169, 47, 47, 0.25);
  background: #fff7f7;
  color: var(--danger);
}

.danger-button:hover,
.exit-button:hover {
  background: #ffecec;
}

.compact {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.86rem;
}

.map-workspace {
  overflow: hidden;
}

.workspace-toolbar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.segmented {
  flex-wrap: wrap;
  gap: 8px;
}

.result-count {
  color: var(--muted);
  font-weight: 800;
}

.workspace-grid {
  display: grid;
}

.map-workspace[data-mode="map"] .list-panel,
.map-workspace[data-mode="list"] .map-panel {
  display: none;
}

.map-panel {
  position: relative;
  min-height: 430px;
  border-bottom: 1px solid var(--line);
  background: #eef4f1;
}

.map-controls {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 12px;
  z-index: 8;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  pointer-events: none;
}

.map-controls > * {
  pointer-events: auto;
}

.zoom-control {
  display: flex;
  gap: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  padding: 4px;
}

.zoom-button {
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0 8px;
  font-size: 0.78rem;
  font-weight: 900;
}

.zoom-button.is-active {
  background: var(--blue-dark);
  color: #fff;
}

.legend-panel,
.cluster-list {
  position: absolute;
  z-index: 12;
  display: grid;
  gap: 10px;
  width: min(330px, calc(100% - 24px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 36px rgba(31, 42, 46, 0.16);
  padding: 12px;
}

.legend-panel {
  right: 12px;
  top: 62px;
}

.legend-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #3d4a4e;
  font-size: 0.86rem;
  font-weight: 850;
}

.legend-panel p {
  color: var(--muted);
  font-size: 0.86rem;
}

.cluster-list {
  left: 12px;
  bottom: 12px;
  max-height: 310px;
  overflow: auto;
}

.map-status {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 7;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--muted);
  padding: 12px 14px;
  transform: translate(-50%, -50%);
}

.city-map {
  position: absolute;
  inset: 12px;
  width: calc(100% - 24px);
  height: calc(100% - 24px);
  filter: drop-shadow(0 12px 22px rgba(31, 42, 46, 0.08));
}

.google-map-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #e8eee9;
}

.map-label {
  fill: #667275;
  font-size: 2.5px;
  font-weight: 900;
  letter-spacing: 0;
}

.map-markers {
  position: absolute;
  inset: 12px;
}

.map-marker {
  position: absolute;
  display: grid;
  min-width: 42px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--marker-color);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(31, 42, 46, 0.24);
  transform: translate(-50%, -50%);
  transition: width 150ms ease, height 150ms ease, transform 150ms ease;
}

.map-marker::after {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 7px);
  max-width: 190px;
  padding: 7px 9px;
  border-radius: 8px;
  background: var(--blue-dark);
  color: #fff;
  content: attr(data-label);
  font-size: 0.78rem;
  line-height: 1.15;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(3px);
  transition: opacity 150ms ease, transform 150ms ease;
  white-space: nowrap;
}

.map-marker:hover::after,
.map-marker:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.map-marker.is-selected {
  min-width: 54px;
  height: 40px;
  border-color: var(--blue-dark);
  box-shadow:
    0 0 0 5px rgba(255, 255, 255, 0.84),
    0 0 0 9px color-mix(in srgb, var(--marker-color), transparent 62%),
    0 14px 28px rgba(31, 42, 46, 0.28);
  z-index: 6;
}

.pin-icon {
  display: block;
  padding: 0 9px;
  line-height: 1;
  white-space: nowrap;
}

.map-pin-label {
  position: absolute;
  left: 50%;
  top: calc(100% + 5px);
  display: none;
  max-width: 110px;
  border: 1px solid rgba(31, 42, 46, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  padding: 3px 7px;
  font-size: 0.72rem;
  font-weight: 900;
  transform: translateX(-50%);
  white-space: nowrap;
}

.map-workspace[data-zoom="close"] .map-pin-label {
  display: block;
}

.map-cluster {
  position: absolute;
  display: grid;
  width: 52px;
  height: 52px;
  padding: 0;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--cluster-color);
  color: #fff;
  box-shadow:
    0 0 0 6px color-mix(in srgb, var(--cluster-color), transparent 74%),
    0 12px 26px rgba(31, 42, 46, 0.28);
  transform: translate(-50%, -50%);
}

.map-cluster span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 999px;
  background: rgba(31, 42, 46, 0.18);
  font-weight: 950;
}

.list-panel {
  background: var(--surface-soft);
}

.item-list,
.event-list,
.queue-list,
.admin-record-list,
.area-items,
.cluster-items {
  display: grid;
  gap: 12px;
}

.area-list {
  display: grid;
  gap: 12px;
  max-height: 280px;
  overflow: auto;
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 12px;
}

.area-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.area-item p {
  color: var(--muted);
  font-size: 0.86rem;
}

.mini-pin {
  display: grid;
  min-width: 38px;
  height: 30px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--marker-color);
  color: #fff;
  padding: 0 8px;
  font-size: 0.7rem;
  font-weight: 950;
  box-shadow: 0 6px 14px rgba(31, 42, 46, 0.18);
}

.item-list {
  padding: 12px;
}

.province-group {
  display: grid;
  gap: 12px;
}

.province-group + .province-group {
  margin-top: 6px;
}

.province-group-heading {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(251, 251, 247, 0.96);
  padding: 10px 12px;
}

.event-list,
#savedList {
  padding-bottom: 18px;
}

.record-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.record-card.is-selected {
  border-color: var(--blue);
  box-shadow:
    inset 4px 0 0 var(--blue),
    var(--shadow);
}

.selection-panel {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: 86px;
  z-index: 38;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 42px rgba(31, 42, 46, 0.22);
  padding: 10px;
}

.preview-card {
  display: grid;
  gap: 10px;
}

.preview-handle {
  justify-self: center;
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: var(--line-strong);
}

.place-line {
  color: var(--muted);
  font-size: 0.9rem;
}

.card-topline {
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.category-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--dot-color);
}

.description {
  font-size: 0.98rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 0;
}

.detail-grid div {
  display: grid;
  gap: 2px;
  border-top: 1px solid #edf0ec;
  padding-top: 8px;
}

.detail-grid dt {
  color: #3d4a4e;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.warning-row,
.admin-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.warning-row span,
.admin-badges span,
.pill {
  border: 1px solid rgba(189, 123, 22, 0.28);
  border-radius: 999px;
  background: #fff3dd;
  color: #76500f;
  padding: 4px 8px;
  font-size: 0.78rem;
  font-weight: 850;
}

.card-actions,
.row-actions,
.form-actions {
  flex-wrap: wrap;
  gap: 8px;
}

.card-actions {
  padding-top: 2px;
}

.empty-state {
  margin: 12px;
  color: var(--muted);
  padding: 22px;
  text-align: center;
}

.map-panel > .empty-state {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(290px, calc(100% - 34px));
  margin: 0;
  transform: translate(-50%, -50%);
}

.report-tabs {
  margin: 12px 0;
}

.report-panel {
  display: none;
  padding: 14px;
}

.report-panel.is-active {
  display: block;
}

.stacked-form {
  display: grid;
  gap: 12px;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.check-grid {
  display: grid;
  gap: 8px;
}

.check-grid label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
  font-weight: 750;
}

.check-grid input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--basics);
}

.form-message {
  color: #0f5e61;
  font-weight: 850;
}

.details-page {
  display: grid;
  gap: 16px;
}

.details-hero {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 16px;
}

.details-hero > div:first-child {
  display: grid;
  gap: 10px;
}

.details-mini-map {
  min-height: 240px;
}

.mini-map-surface {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 24%, rgba(31, 42, 46, 0.08) 25%, transparent 26%),
    linear-gradient(0deg, transparent 24%, rgba(31, 42, 46, 0.08) 25%, transparent 26%),
    #fbfbf7;
  background-size: 42px 42px;
}

.mini-map-surface::before {
  position: absolute;
  inset: 48% -10% auto -10%;
  height: 28px;
  border-radius: 999px;
  background: rgba(143, 199, 207, 0.55);
  content: "";
  transform: rotate(-8deg);
}

.mini-map-pin {
  position: absolute;
  display: grid;
  min-width: 46px;
  height: 36px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--marker-color);
  color: #fff;
  padding: 0 10px;
  font-size: 0.72rem;
  font-weight: 950;
  box-shadow: 0 12px 28px rgba(31, 42, 46, 0.26);
  transform: translate(-50%, -50%);
}

.details-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-grid {
  display: grid;
  gap: 14px;
}

.admin-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.queue-card,
.admin-record {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-record {
  align-items: start;
}

.admin-badges {
  margin-top: 8px;
}

.bottom-nav {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 40;
  justify-content: space-between;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(18, 63, 81, 0.96);
  box-shadow: 0 16px 40px rgba(31, 42, 46, 0.18);
  padding: 6px;
}

.bottom-button {
  display: grid;
  min-width: 0;
  min-height: 42px;
  flex: 1 1 0;
  place-items: center;
  gap: 2px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  padding: 5px;
  font-size: 0.72rem;
  font-weight: 850;
}

.bottom-button span {
  font-size: 0.92rem;
  line-height: 1;
}

.bottom-button.is-active {
  background: var(--yellow);
  color: var(--ink);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 82px;
  z-index: 60;
  width: min(340px, calc(100% - 28px));
  border-radius: 8px;
  background: var(--blue-dark);
  color: #fff;
  padding: 12px 14px;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, 8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.is-hidden {
  display: none !important;
}

@media (min-width: 640px) {
  .view {
    padding: 22px 22px 34px;
  }

  .home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-need-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
  }

  .search-field {
    grid-column: 1 / -1;
  }

  .filter-chips,
  .event-filters {
    grid-column: 1 / -1;
  }

  .workspace-toolbar {
    align-items: center;
    flex-direction: row;
  }

  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .details-hero {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.55fr);
  }

  .form-grid,
  .check-grid.compact-checks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .helper-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .screen-heading {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
}

@media (min-width: 920px) {
  .app-shell {
    padding-bottom: 28px;
  }

  .topbar {
    padding: 14px 24px;
  }

  .desktop-nav {
    display: flex;
  }

  .view {
    padding-inline: 24px;
  }

  .home-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .filters-panel {
    grid-template-columns: minmax(260px, 1.4fr) repeat(3, minmax(150px, 0.72fr));
  }

  .search-field {
    grid-column: auto;
  }

  .quick-need-panel {
    grid-template-columns: minmax(210px, 0.42fr) minmax(0, 1fr);
    align-items: center;
  }

  .quick-need-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .bright-bridge > div:last-child {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 18px;
    align-items: center;
  }

  .bright-bridge .eyebrow,
  .bright-bridge h2,
  .bright-bridge p {
    grid-column: 1;
  }

  .bright-bridge .bridge-actions {
    grid-column: 2;
    grid-row: 1 / span 4;
    align-self: center;
    flex-direction: column;
    margin-top: 0;
    min-width: 220px;
  }

  .bright-bridge .bridge-actions > * {
    justify-content: center;
    width: 100%;
  }

  .home-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .home-card {
    min-height: 104px;
  }

  .workspace-grid {
    grid-template-columns: minmax(480px, 1.15fr) minmax(360px, 0.85fr);
    min-height: 560px;
  }

  .workspace-grid:has(.selection-panel:not(.is-hidden)) {
    grid-template-columns: minmax(480px, 1.15fr) minmax(360px, 0.85fr);
  }

  .map-workspace[data-mode="split"] .selection-panel {
    display: none !important;
  }

  .map-workspace[data-mode="map"] .workspace-grid,
  .map-workspace[data-mode="list"] .workspace-grid {
    grid-template-columns: 1fr;
  }

  .map-workspace[data-mode="map"] .workspace-grid:has(.selection-panel:not(.is-hidden)),
  .map-workspace[data-mode="list"] .workspace-grid:has(.selection-panel:not(.is-hidden)) {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.42fr);
  }

  .map-panel {
    align-self: start;
    height: 560px;
    min-height: 560px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .item-list {
    max-height: 560px;
    overflow: auto;
  }

  .selection-panel {
    position: static;
    align-self: stretch;
    max-height: 560px;
    overflow: auto;
    border-radius: 0;
    border-top: 0;
    border-right: 0;
    border-bottom: 0;
    box-shadow: none;
    padding: 14px;
  }

  .admin-grid {
    grid-template-columns: minmax(320px, 0.95fr) minmax(320px, 0.9fr) minmax(300px, 0.85fr);
  }

  .admin-panel.wide {
    grid-column: 1 / -1;
  }

  .admin-record {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .bottom-nav {
    display: none;
  }
}

@media (max-width: 420px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions {
    justify-content: space-between;
  }

  .top-actions > * {
    flex: 1 1 0;
  }

  .card-actions > *,
  .row-actions > * {
    flex: 1 1 auto;
    justify-content: center;
    text-align: center;
  }

  .home-card {
    padding-right: 18px;
    padding-bottom: 58px;
  }

  .map-marker::after {
    display: none;
  }
}
