/*
  Wagin Cemetery Information - Version 15.0 Stable
  File: style.css

  Stylesheet comments added for maintenance only.
  No styling rules have been intentionally changed.
*/

:root {
  --colour-occupied: #9be59b;
  --colour-reserved: #ff8a8a;
  --colour-empty: #fff176;
  --colour-vacant: #fff176;
  --colour-unknown: #9fd3ff;
  --colour-closed: #bdbdbd;
}

body {
  font-family: Arial, sans-serif;
  margin: 20px;
  background: #f4f1ea;
  color: #222;
}

h1 { margin-bottom: 5px; }

button {
  padding: 8px 12px;
  margin: 3px;
  cursor: pointer;
  font-size: 14px;
}

input, textarea, select {
  width: 100%;
  box-sizing: border-box;
  padding: 7px;
  margin: 4px 0 10px 0;
  font-size: 14px;
}

textarea { height: 70px; }
label { font-weight: bold; font-size: 13px; }

.small {
  font-size: 12px;
  color: #555;
}

.example {
  font-size: 12px;
  color: #666;
  margin-top: -7px;
  margin-bottom: 8px;
}

.top-buttons { margin: 10px 0 18px 0; }
.search { width: 360px; margin-bottom: 15px; }

.page {
  display: flex;
  gap: 25px;
  align-items: flex-start;
}

.map-area {
  background: white;
  border: 2px solid #222;
  padding: 15px;
  border-radius: 8px;
  overflow: auto;
  max-width: 75vw;
}

.section-title {
  text-align: center;
  font-weight: bold;
  margin-bottom: 10px;
  font-size: 20px;
}

.grave-grid {
  display: grid;
  gap: 5px;
}

.grave {
  border: 1px solid #555;
  background: #f7f7f7;
  text-align: center;
  font-size: 10px;
  padding: 3px;
  cursor: pointer;
  overflow: hidden;
  line-height: 1.15;
  width: 66px;
  height: 48px;
  box-sizing: border-box;
}

/* Version 19.0.9.5: brighter grave tracking while moving around a section.
   The outline sits outside the grave so its occupied/reserved/vacant colour remains visible. */
.grave {
  transition: outline-color 0.12s ease, box-shadow 0.12s ease;
}

.grave:hover {
  position: relative;
  z-index: 10;
  outline: 4px solid #ff2020;
  outline-offset: 1px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95), 0 0 10px 4px rgba(255, 32, 32, 0.85);
}

/* Keep the grave that has been opened easy to find after the mouse moves away. */
.grave.selected {
  position: relative;
  z-index: 9;
  outline: 4px solid #ff2020;
  outline-offset: 1px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95);
}

.grave.status-occupied { background: var(--colour-occupied) !important; }
.grave.status-empty { background: var(--colour-empty) !important; }
.grave.status-vacant { background: var(--colour-vacant) !important; }
.grave.status-reserved { background: var(--colour-reserved) !important; }
.grave.status-unknown { background: var(--colour-unknown) !important; }
.grave.status-closed {
  background: var(--colour-closed) !important;
  color: #111 !important;
}

.grave.multi-burial { box-shadow: inset 0 0 0 3px #8e24aa; }

.grave-count {
  float: right;
  min-width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #333;
  font-size: 10px;
  line-height: 14px;
  text-align: center;
  font-weight: bold;
  color: #111;
}

.blank {
  background: transparent;
  border: none;
  cursor: default;
}

.selected { outline: 4px solid #000; }
.matched { outline: 4px solid #1976d2; }

.details {
  width: 430px;
  background: white;
  border: 2px solid #222;
  padding: 15px;
  border-radius: 8px;
  min-height: 530px;
}

.details h2 { margin-top: 0; }

.site-actions {
  border-top: 1px solid #ccc;
  margin-top: 12px;
  padding-top: 10px;
}

.good { background: #e5ffe5; }
.danger { background: #ffe5e5; }

.readonly input,
.readonly textarea,
.readonly select {
  background: #eee;
}

.preview {
  background: #f7f7f7;
  border: 1px solid #aaa;
  padding: 10px;
  margin: 10px 0;
  border-radius: 6px;
  line-height: 1.4;
}

.match-card,
.person-card {
  border: 1px solid #aaa;
  background: #fff;
  padding: 8px;
  margin: 6px 0;
  border-radius: 5px;
}

.warning {
  color: #a00000;
  font-weight: bold;
}

.overview-wrap {
  background: white;
  border: 2px solid #222;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 15px;
  max-width: 1180px;
}

.overview-map {
  position: relative;
  width: 100%;
  max-width: 1150px;
  aspect-ratio: 2047 / 1449;
  background: #fff;
  border: 1px solid #999;
  overflow: hidden;
}

.overview-map img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  opacity: 0.97;
}

.section-hotspot {
  position: absolute;
  border: 3px solid transparent;
  background: transparent;
  cursor: pointer;
  border-radius: 4px;
  color: transparent;
}

.section-hotspot:hover {
  background: rgba(255, 235, 59, 0.28);
  border-color: #c49a00;
}

.section-hotspot.active {
  border-color: #1b8f2e;
  background: rgba(76, 175, 80, 0.18);
}

.grave-photo-wrap {
  margin-top: 12px;
  border-top: 1px solid #ccc;
  padding-top: 10px;
}

.grave-photo {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border: 1px solid #aaa;
  background: #f7f7f7;
}

.search-result-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.search-thumb {
  width: 82px;
  height: 70px;
  object-fit: cover;
  border: 1px solid #aaa;
  background: #f7f7f7;
  flex-shrink: 0;
}

.search-result-main { flex: 1; }

.photo-placeholder {
  border: 1px dashed #aaa;
  background: #fafafa;
  border-radius: 8px;
  color: #555;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.photo-placeholder-icon {
  font-size: 42px;
  line-height: 1;
  opacity: 0.72;
  margin-bottom: 8px;
}

.photo-placeholder-text {
  font-weight: bold;
  font-size: 15px;
}

.grave-photo-placeholder {
  width: 100%;
  min-height: 220px;
  padding: 24px;
}

.search-photo-placeholder {
  width: 82px;
  height: 70px;
  padding: 6px;
  flex-shrink: 0;
}

.search-photo-placeholder .photo-placeholder-icon {
  font-size: 24px;
  margin-bottom: 3px;
}

.search-photo-placeholder .photo-placeholder-text {
  font-size: 10px;
  line-height: 1.1;
}

.import-panel {
  max-width: 900px;
  background: white;
  border: 2px solid #222;
  padding: 15px;
  border-radius: 8px;
}

.log {
  white-space: pre-wrap;
  background: #111;
  color: #e6e6e6;
  padding: 12px;
  min-height: 150px;
  border-radius: 6px;
}


.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.photo-card {
  border: 1px solid #aaa;
  background: #fff;
  border-radius: 6px;
  padding: 6px;
  text-align: center;
}

.photo-card img {
  width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: contain;
  cursor: pointer;
  border: 1px solid #ccc;
  background: #f7f7f7;
}

.photo-card-title {
  font-size: 12px;
  margin-top: 5px;
  color: #333;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.photo-lightbox img {
  max-width: 95vw;
  max-height: 90vh;
  background: white;
  border: 2px solid white;
}

.photo-lightbox-close {
  position: fixed;
  top: 12px;
  right: 18px;
  color: white;
  font-size: 34px;
  cursor: pointer;
}


.photo-lightbox {
  overflow: auto;
}

.photo-lightbox img {
  object-fit: contain;
  width: auto;
  height: auto;
}

.open-original-link {
  position: fixed;
  bottom: 14px;
  right: 18px;
  color: white;
  background: rgba(0, 0, 0, 0.55);
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
}


.photo-indicator {
  position: absolute;
  left: 2px;
  bottom: 1px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.82);
  border-radius: 3px;
  padding: 0 2px;
}

.grave {
  position: relative;
}

.progress-bar-wrap {
  width: 100%;
  height: 24px;
  border: 1px solid #555;
  background: #eee;
  border-radius: 6px;
  overflow: hidden;
  margin: 8px 0 14px 0;
}

.progress-bar {
  height: 100%;
  background: #9be59b;
  text-align: center;
  line-height: 24px;
  font-weight: bold;
  white-space: nowrap;
}

.progress-list {
  max-height: 340px;
  overflow: auto;
  border: 1px solid #ccc;
  padding: 8px;
  background: #fafafa;
}

.site-chip {
  display: inline-block;
  border: 1px solid #777;
  border-radius: 4px;
  background: white;
  padding: 4px 7px;
  margin: 3px;
  cursor: pointer;
}

.site-chip:hover {
  background: #fff176;
}


.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin: 10px 0;
}

.stat-card {
  border: 1px solid #aaa;
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
}

.stat-number {
  font-size: 26px;
  font-weight: bold;
}

.stat-label {
  font-size: 12px;
  color: #555;
}

.tool-panel {
  border: 1px solid #aaa;
  background: #fafafa;
  border-radius: 8px;
  padding: 10px;
  margin: 8px 0;
}

.print-report {
  background: white;
}

@media print {
  body {
    background: white;
    margin: 0;
  }

  .overview-wrap,
  .top-buttons,
  .map-area,
  .site-actions,
  #appVersionLine {
    display: none !important;
  }

  .page {
    display: block;
  }

  .details {
    width: auto;
    border: none;
  }

  .photo-card img,
  .grave-photo {
    max-height: none !important;
  }
}

.health-ok {
  color: #0a7a0a;
  font-weight: bold;
}

.health-warn {
  color: #b36b00;
  font-weight: bold;
}

.health-bad {
  color: #b00020;
  font-weight: bold;
}


.photo-upload-box {
  border: 2px dashed #777;
  background: #fafafa;
  border-radius: 8px;
  padding: 12px;
  margin: 10px 0;
  text-align: center;
}

.photo-upload-box.drag-over {
  background: #fff7bf;
  border-color: #c49a00;
}

.photo-upload-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-top: 8px;
}

.photo-upload-preview {
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
  border: 1px solid #aaa;
  background: white;
  margin-top: 8px;
}

.photo-type-buttons button {
  font-size: 12px;
  padding: 6px 8px;
}


.photo-manager {
  border-top: 1px solid #ccc;
  margin-top: 14px;
  padding-top: 10px;
}

.photo-manager h3 {
  margin-bottom: 6px;
}

.photo-slots {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.photo-slot {
  border: 2px dashed #999;
  border-radius: 8px;
  background: #fafafa;
  padding: 10px;
}

.photo-slot.drag-over {
  background: #fff7bf;
  border-color: #c49a00;
}

.photo-slot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.photo-slot-title {
  font-weight: bold;
}

.photo-slot img {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border: 1px solid #aaa;
  background: white;
  cursor: pointer;
}

.photo-slot-empty {
  color: #666;
  text-align: center;
  padding: 18px 6px;
  border: 1px dashed #bbb;
  background: white;
  border-radius: 6px;
}

.photo-slot-actions {
  margin-top: 6px;
}

.photo-slot-actions button {
  font-size: 12px;
  padding: 5px 7px;
}

.additional-photo {
  border: 1px solid #aaa;
  border-radius: 8px;
  background: white;
  padding: 8px;
  margin: 8px 0;
}

.additional-photo img {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border: 1px solid #aaa;
  cursor: pointer;
}

.photo-manager-help {
  font-size: 12px;
  color: #555;
  background: #f6f6f6;
  border: 1px solid #ddd;
  padding: 7px;
  border-radius: 6px;
  margin-bottom: 8px;
}


.site-person-search {
  border-top: 1px solid #ccc;
  margin-top: 12px;
  padding-top: 10px;
}

.site-person-search-results {
  max-height: 260px;
  overflow: auto;
  border: 1px solid #ddd;
  background: #fafafa;
  padding: 6px;
  margin-top: 6px;
  border-radius: 6px;
}


.site-dashboard {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dashboard-section {
  border: 1px solid #bbb;
  background: #fafafa;
  border-radius: 8px;
  padding: 10px;
}

.dashboard-section h3 {
  margin-top: 0;
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.person-row {
  border: 1px solid #aaa;
  background: #fff;
  border-radius: 7px;
  padding: 8px;
  margin: 7px 0;
}

.person-row-title {
  font-weight: bold;
  font-size: 15px;
}

.site-person-search-results {
  max-height: 300px;
  overflow: auto;
  border: 1px solid #ddd;
  background: #fff;
  padding: 6px;
  margin-top: 8px;
  border-radius: 6px;
}

.form-header-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}


.form-name-search {
  border: 1px solid #ddd;
  background: #fafafa;
  border-radius: 6px;
  padding: 8px;
  margin: 4px 0 10px 0;
}

.form-name-search-results {
  max-height: 260px;
  overflow: auto;
  border: 1px solid #ddd;
  background: white;
  padding: 6px;
  margin-top: 6px;
  border-radius: 6px;
}


.photo-summary-button {
  width: 100%;
  text-align: left;
  background: #f4f4f4;
  border: 1px solid #aaa;
  border-radius: 6px;
  padding: 10px;
  font-weight: bold;
  margin-bottom: 8px;
}

.photo-summary-button:hover {
  background: #fff7bf;
}

.photo-manager-collapsed-note {
  font-size: 12px;
  color: #555;
  padding: 6px 0;
}

.site-summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 6px;
  margin: 8px 0;
}

.site-summary-item {
  border: 1px solid #ccc;
  background: white;
  border-radius: 6px;
  padding: 6px;
  text-align: center;
}

.site-summary-item strong {
  display: block;
  font-size: 17px;
}


.photo-viewer {
  margin-top: 8px;
}

.photo-viewer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.photo-view-card {
  border: 1px solid #aaa;
  background: white;
  border-radius: 8px;
  padding: 8px;
}

.photo-view-card h4 {
  margin: 0 0 6px 0;
}

.photo-view-card img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border: 1px solid #aaa;
  background: #f7f7f7;
  cursor: pointer;
}

.photo-edit-tools {
  border-top: 1px solid #ccc;
  margin-top: 12px;
  padding-top: 10px;
}

.photo-edit-button {
  width: 100%;
  text-align: left;
  background: #f4f4f4;
  border: 1px solid #aaa;
  border-radius: 6px;
  padding: 10px;
  font-weight: bold;
}

.photo-edit-button:hover {
  background: #fff7bf;
}

.photo-empty-card {
  border: 1px dashed #aaa;
  background: #fafafa;
  border-radius: 8px;
  padding: 14px;
  text-align: center;
  color: #555;
}

.photo-mini-summary {
  font-size: 12px;
  color: #555;
  margin-bottom: 8px;
}


.map-export-panel { border: 1px solid #aaa; background: #fafafa; border-radius: 8px; padding: 10px; margin: 8px 0; }
.map-export-row { display: grid; grid-template-columns: 145px 1fr; gap: 8px; align-items: center; margin: 8px 0; }
.map-export-row select, .map-export-row input { margin: 0; }
.map-preview-wrap { border: 1px solid #aaa; background: white; padding: 12px; border-radius: 8px; margin-top: 10px; overflow: auto; max-height: 760px; }
.map-preview-wrap img { width: 100%; max-width: 100%; border: 1px solid #777; background: white; }
.map-export-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.map-export-note { background: #eef7ee; border: 1px solid #8dbb8d; padding: 8px; border-radius: 6px; font-size: 12px; margin: 8px 0; }
.map-export-warning { background: #fff7df; border: 1px solid #d0a535; padding: 8px; border-radius: 6px; font-size: 12px; margin: 8px 0; }


.update-map-output {
  border: 1px solid #aaa;
  background: #fafafa;
  border-radius: 8px;
  padding: 10px;
  margin-top: 10px;
}

.update-map-output a {
  display: block;
  margin: 4px 0;
}

.export-progress {
  background: #eef7ee;
  border: 1px solid #8dbb8d;
  border-radius: 6px;
  padding: 8px;
  margin: 8px 0;
  font-size: 12px;
}


.public-body {
  background: #f5f1e8;
  color: #111;
}

.public-header {
  background: #073d25;
  color: white;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.public-header h1 {
  margin: 0;
  color: white;
}

.public-header p {
  margin: 3px 0 0 0;
}

.public-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.public-nav button {
  background: white;
  color: #073d25;
  border: 1px solid #ccc;
}

.public-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 16px;
  padding: 16px;
}

.public-card,
.public-card-inner {
  background: white;
  border: 1px solid #aaa;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
}

.public-search-grid {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 8px;
}

.public-result {
  border: 1px solid #ccc;
  background: #fafafa;
  padding: 10px;
  border-radius: 8px;
  margin: 8px 0;
}

.public-grave-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.public-grave-summary div {
  background: #f7f7f7;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 8px;
  text-align: center;
}

.public-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.public-photo-card {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 8px;
  background: #fafafa;
}

.public-photo-card img {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  cursor: pointer;
  background: white;
  border: 1px solid #ccc;
}

.public-map-image {
  width: 100%;
  border: 1px solid #777;
  background: white;
}

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

.legend-line {
  margin: 7px 0;
}

.legend-box {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 1px solid #777;
  vertical-align: middle;
  margin-right: 8px;
}

.legend-box.occupied { background: #dff0d6; }
.legend-box.reserved { background: #e73535; }
.legend-box.vacant { background: #ffe46b; }
.legend-box.multiple { background: #d6b3df; }
.legend-box.unavailable { background: #c9c9c9; }

@media (max-width: 850px) {
  .public-page {
    grid-template-columns: 1fr;
  }

  .public-search-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  .public-header,
  .public-side,
  .public-actions,
  button {
    display: none !important;
  }

  .public-page {
    display: block;
    padding: 0;
  }

  .public-card {
    border: none;
  }
}


.admin-login-bar {
  background: #073d25;
  color: white;
  padding: 8px 14px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.admin-login-bar button {
  padding: 5px 9px;
  margin: 0;
}

.login-body {
  background: #f5f1e8;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  width: 360px;
  max-width: 92vw;
  background: white;
  border: 2px solid #173d2a;
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}

.login-card h1 {
  margin-top: 0;
}

.login-help {
  background: #f7f7f7;
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 8px;
  margin-top: 14px;
  font-size: 12px;
}


.public-readonly .top-buttons button.admin-only,
.public-readonly .site-actions,
.public-readonly .photo-edit-tools,
.public-readonly .photo-upload-box,
.public-readonly .photo-slot-actions {
  display: none !important;
}

.public-readonly .details input,
.public-readonly .details select,
.public-readonly .details textarea {
  pointer-events: none;
  background: #f6f6f6;
}

.public-site-dashboard .person-row {
  background: #fff;
}


.public-status-bar {
  justify-content: space-between;
}

.public-readonly .top-buttons {
  border-top: 0;
}

.public-readonly .details input,
.public-readonly .details select,
.public-readonly .details textarea {
  pointer-events: none;
  background: #f6f6f6;
}


.public-readonly .match-card button[style*="display: none"] {
  margin: 0;
}

.public-readonly .match-card {
  position: relative;
}


button.danger {
  background: #d93025;
  color: white;
  border-color: #9f1b12;
}

button.danger:hover {
  background: #b3261e;
}


/* Version 6.0: public map export controls must remain usable */
.public-readonly .details .map-export-panel select,
.public-readonly .details .map-export-panel input,
.public-readonly .details .map-export-panel button,
.public-readonly .details .map-export-panel label,
.public-readonly .details .map-export-actions button {
  pointer-events: auto !important;
}

.public-readonly .details .map-export-panel select,
.public-readonly .details .map-export-panel input[type="checkbox"] {
  background: white !important;
}

.public-readonly .details .map-preview-wrap button {
  pointer-events: auto !important;
}

.public-readonly .details .map-export-panel button {
  cursor: pointer;
}


.user-admin-panel {
  border: 1px solid #aaa;
  background: #fafafa;
  border-radius: 8px;
  padding: 12px;
  margin: 10px 0;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.users-table th,
.users-table td {
  border: 1px solid #ccc;
  padding: 6px;
  text-align: left;
  vertical-align: top;
}

.users-table th {
  background: #f0f0f0;
}

.form-grid {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 8px;
  align-items: center;
  max-width: 520px;
}
.map-instructions {
    font-size: 1.3em;
    font-weight: bold;
    text-align: center;
}
/* Version 10 backup/restore manager */
.backup-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.backup-table th,
.backup-table td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

.backup-table th {
  background: #f5f5f5;
}

.backup-table td:last-child {
  white-space: nowrap;
}

/* Version 10.1 database administration pages */
.database-admin-body {
  margin: 0;
  background: #a9b7b8;
  color: #0b302d;
  font-family: Arial, sans-serif;
}
.db-admin-topbar {
  background: #06433e;
  color: white;
  padding: 10px 18px;
  text-align: center;
  font-size: 16px;
}
.db-admin-topbar a { color: white; font-weight: bold; text-decoration: none; }
.db-admin-shell { max-width: 1260px; margin: 22px auto; }
.db-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: stretch;
  background: linear-gradient(135deg, rgba(105,61,52,.85), rgba(92,45,38,.9));
  color: white;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 4px 10px rgba(0,0,0,.35);
}
.db-hero h1 { margin: 0; font-size: 34px; color: white; }
.db-important {
  min-width: 330px;
  background: rgba(0,0,0,.18);
  border-radius: 14px;
  padding: 14px 18px;
}
.db-important ul { margin: 8px 0 0 18px; padding: 0; }
.db-tile-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 16px;
}
.db-tile {
  border: none;
  text-decoration: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 16px;
  background: #06433e;
  color: white;
  border-radius: 18px;
  padding: 16px 20px;
  box-shadow: 0 4px 9px rgba(0,0,0,.35);
  font-size: 18px;
  text-align: left;
}
.db-tile:hover { filter: brightness(1.08); }
.db-tile small { display: block; color: #e9f4f0; margin-top: 5px; font-size: 13px; }
.db-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255,255,255,.18);
  font-size: 24px;
}
.db-panel {
  margin-top: 24px;
  background: #eef5f5;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,.22);
}
.db-panel-actions { margin-bottom: 14px; }
.db-admin-table, .people-table { width: 100%; border-collapse: collapse; background: white; }
.db-admin-table th, .db-admin-table td, .people-table th, .people-table td {
  border: 1px solid #aebbbb;
  padding: 8px;
  vertical-align: top;
}
.db-admin-table th, .people-table th { background: #06433e; color: white; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stats-grid div { background: white; border-radius: 8px; padding: 18px; text-align: center; }
.stats-grid strong { display: block; font-size: 30px; }
.health-pre { background: white; padding: 12px; overflow: auto; }
.people-layout { display: flex; min-height: calc(100vh - 80px); }
.people-side-nav {
  width: 175px;
  background: #06433e;
  padding: 18px 14px;
  box-sizing: border-box;
}
.people-side-nav a {
  display: block;
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 7px 0;
}
.people-side-nav a.active { color: #ffe680; }
.people-main {
  flex: 1;
  background: #d8e7e8;
  margin: 14px;
  border-radius: 12px;
  padding: 20px;
  overflow: auto;
}
.people-main h1 { margin-top: 0; color: #06433e; }
.people-tabs { border-bottom: 24px solid #06433e; margin-bottom: 12px; }
.people-tabs button.active { background: #06433e; color: #ffe680; font-weight: bold; }
.people-search-box { background: #eef5f5; padding: 14px; border-radius: 8px; margin-bottom: 14px; }
.people-search-box input { width: 340px; max-width: 80%; }
.people-actions { white-space: nowrap; }
.person-form-card { background: white; border-radius: 10px; padding: 18px; max-width: 960px; }
.person-form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.person-form-card label { display: block; font-weight: bold; margin-top: 10px; }
.person-form-card input, .person-form-card select, .person-form-card textarea {
  width: 100%; box-sizing: border-box; margin-top: 4px;
}
.person-form-card textarea { min-height: 100px; }
.form-buttons { margin-top: 16px; display: flex; gap: 10px; }
.success { color: #087000; font-weight: bold; }
@media (max-width: 900px) {
  .db-hero, .people-layout { flex-direction: column; }
  .db-tile-grid, .person-form-grid, .stats-grid { grid-template-columns: 1fr; }
  .people-side-nav { width: auto; }
}


/* Version 10.1 left navigation polish */
.database-layout .people-main,
.admin-map-layout .admin-map-content {
  margin: 14px;
}
.db-admin-content {
  max-width: none;
}
.database-layout .db-hero {
  margin-bottom: 20px;
}
.database-layout .db-tile-grid {
  grid-template-columns: repeat(3, minmax(240px, 1fr));
}
.admin-map-body {
  margin: 0;
}
.admin-map-layout {
  min-height: calc(100vh - 36px);
}
.admin-map-content {
  flex: 1;
  overflow: auto;
  padding: 10px;
  box-sizing: border-box;
}
.admin-map-content > h1 {
  margin-top: 8px;
}
.people-side-nav a[href="index.html"] {
  border-top: 1px solid rgba(255,255,255,.35);
  margin-top: 10px;
  padding-top: 12px;
}
@media (max-width: 900px) {
  .database-layout .db-tile-grid { grid-template-columns: 1fr; }
  .admin-map-content { padding: 8px; }
}


/* Version 10.1 public left menu layout */
.public-admin-layout {
  margin: 0;
}

.admin-shell {
  display: flex;
  min-height: 100vh;
}

.admin-side-menu {
  width: 150px;
  min-width: 150px;
  background: #06483f;
  color: #fff;
  padding: 70px 10px 20px 10px;
  box-sizing: border-box;
}

.admin-side-menu .side-title {
  font-weight: bold;
  margin-bottom: 16px;
  color: #fff;
}

.admin-side-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: #fff;
  font-weight: bold;
  padding: 8px 4px;
  cursor: pointer;
}

.admin-side-menu button:hover {
  color: #ffff66;
}

.admin-main {
  flex: 1;
  padding: 10px;
  box-sizing: border-box;
}

.public-main h1 {
  margin-top: 0;
}


/* Version 10.2 admin menu cleanup */
.admin-login-bar {
  text-align: right;
  padding: 6px 10px;
  background: #06483f;
  color: #fff;
  font-weight: bold;
}

.admin-side-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: #fff;
  font-weight: bold;
  padding: 8px 4px;
  cursor: pointer;
}

.admin-side-menu button:hover {
  color: #ffff66;
}

.admin-side-menu .side-title {
  font-weight: bold;
  margin-bottom: 16px;
  color: #fff;
}


/* Version 10.2.3 import page admin layout */
.admin-mode-body {
  margin: 0;
}

.admin-main > h1 {
  margin-top: 0;
}

.admin-main form,
.admin-main .card,
.admin-main .import-card {
  max-width: 1100px;
}


/* Version 10.2.4 public global search results */
.public-global-search-results {
  margin: 10px 0 16px 0;
  padding: 10px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 6px;
}

.public-result-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.public-result-item {
  text-align: left;
  padding: 8px 10px;
  border: 1px solid #bbb;
  border-radius: 4px;
  background: #f8f8f8;
  cursor: pointer;
}

.public-result-item:hover {
  background: #eef7ee;
}

.public-result-item span {
  display: block;
  font-size: 0.9em;
  opacity: 0.85;
  margin-top: 2px;
}


/* Version 10.2.8 unallocate person button */
.person-row .dashboard-actions .danger {
  margin-left: 6px;
}


/* Version 10.2.9 People page tools */
.people-tabs button {
  margin-right: 6px;
}


/* Version 10.2.10 fine tuning */
.people-side-nav {
  width: 165px;
  min-width: 165px;
}

.people-main,
.db-admin-content {
  margin-left: 0;
}

@media print {
  .people-side-nav {
    display: none;
  }
}


/* Version 10.2.11 Users dashboard fix */
.user-admin-panel {
  background: #fff;
  border: 1px solid #bbb;
  border-radius: 6px;
  padding: 12px;
  margin: 12px 0;
}


/* Version 10.2.13 - wider left navigation on all pages */
:root {
  --wagin-left-nav-width: 170px;
}

.people-side-nav,
.admin-side-menu,
.public-side-menu {
  width: var(--wagin-left-nav-width) !important;
  min-width: var(--wagin-left-nav-width) !important;
  box-sizing: border-box;
}

.people-layout,
.database-layout,
.admin-shell {
  align-items: stretch;
}

.people-side-nav a,
.people-side-nav button,
.admin-side-menu button,
.public-side-menu button {
  white-space: normal;
  overflow-wrap: break-word;
  line-height: 1.2;
}

.admin-main,
.people-main,
.db-admin-content,
.public-main {
  box-sizing: border-box;
}


/* Version 10.2.14 admin search unallocated filter */
.top-buttons label {
  white-space: nowrap;
}


/* Version 10.2.15 - admin search layout tidy */
.admin-search-toolbar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.admin-search-row,
.admin-search-options,
.admin-action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-search-options {
  padding: 4px 0;
}

.admin-search-options label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.admin-search-row .search {
  min-width: 320px;
}


/* Version 10.2.17 - inline Assign to Site panel */
.assign-inline-panel {
  margin-top: 8px;
  padding: 8px;
  border: 1px solid #bbb;
  border-radius: 6px;
  background: #f7fff7;
}

.assign-inline-panel input {
  max-width: 120px;
  margin: 4px 6px 4px 0;
}


/* Version 11.2 - map export print and larger map text */
.map-preview-wrap .map-export-actions {
  margin-top: 12px;
}
.people-search-box input[type="radio"] {
  width: auto !important;
  margin: 0 5px 0 0 !important;
  padding: 0 !important;
}

.people-search-mode-row {
  display: flex;
  align-items: center;
  gap: 25px;
  margin-top: 10px;
  margin-left: 85px;
  width: fit-content;
}

.people-search-mode-row label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: auto;
  white-space: nowrap;
}
/* Version 14.0 - People Data Manager */
.people-side-nav a.active,
.people-side-nav a:hover {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 8px;
}

.people-manager-body {
  background: linear-gradient(135deg, #eef8f1 0%, #f7f3e8 55%, #e5f0ff 100%);
}

.people-manager-main {
  padding: 22px;
}

.people-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: stretch;
  padding: 22px;
  border-radius: 18px;
  background: linear-gradient(135deg, #194d34, #2e7550);
  color: #fff;
  box-shadow: 0 12px 28px rgba(0,0,0,0.18);
  margin-bottom: 18px;
}

.people-hero h1 {
  margin: 3px 0 8px 0;
  font-size: 34px;
  color: #fff;
}

.people-hero p {
  margin: 0;
  color: #eef8f1;
}

.people-kicker {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.9;
}

.people-hero-card {
  min-width: 230px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.25);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.people-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  padding: 14px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  margin-bottom: 12px;
}

.people-toolbar input {
  min-width: 320px;
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #bdd3c4;
  border-radius: 10px;
  font-size: 15px;
}

.people-content-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.05fr) minmax(360px, 0.95fr);
  gap: 16px;
  align-items: start;
}

.people-list-panel,
.people-edit-panel {
  background: rgba(255,255,255,0.96);
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.10);
  overflow: hidden;
  border: 1px solid #d8e7dd;
}

.people-panel-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  background: #f1f8f3;
  border-bottom: 1px solid #d8e7dd;
}

.people-panel-title h2 {
  margin: 0;
  color: #194d34;
}

.people-panel-title span {
  color: #4d6958;
  font-weight: 700;
}

.people-table-wrap {
  overflow: auto;
  max-height: 68vh;
}

.people-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.people-data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #2e7550;
  color: #fff;
  text-align: left;
  padding: 9px;
  white-space: nowrap;
}

.people-data-table td {
  padding: 8px 9px;
  border-bottom: 1px solid #edf2ef;
  vertical-align: top;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.people-data-table tr:nth-child(even) td {
  background: #fbfdfb;
}

.people-data-table tr.selected td {
  background: #fff5cb;
}

.people-row-actions {
  min-width: 150px;
  white-space: nowrap;
}

.people-row-actions button {
  margin: 2px;
  padding: 6px 8px;
  font-size: 12px;
}

.people-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-top: 1px solid #d8e7dd;
}

.people-form-area,
.people-empty-form {
  padding: 16px;
}

.people-empty-form {
  color: #587060;
  min-height: 220px;
}

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

.people-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.people-field span {
  font-weight: 700;
  color: #234b35;
}

.people-field input,
.people-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #bfd1c5;
  border-radius: 10px;
  padding: 9px 10px;
  font: inherit;
  background: #fff;
}

.people-field textarea {
  min-height: 86px;
  resize: vertical;
}

.people-field.readonly input,
.people-field.readonly textarea {
  background: #f0f0f0;
  color: #666;
}

.people-field small {
  color: #708174;
}

.people-form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e3eee7;
}

.people-message {
  min-height: 24px;
  margin: 6px 0 10px;
  font-weight: 700;
}

.good-message {
  color: #1e6f36;
}

.warn-message {
  color: #a0411f;
}

button.good {
  background: #1f8a4c;
  color: white;
}

button.danger {
  background: #b93434;
  color: white;
}

@media (max-width: 1050px) {
  .people-content-grid {
    grid-template-columns: 1fr;
  }
  .people-hero {
    flex-direction: column;
  }
}

@media (max-width: 700px) {
  .people-toolbar input {
    min-width: 100%;
  }
  .people-form-grid {
    grid-template-columns: 1fr;
  }
}


/* Version 14.0 tidy-up: one panel at a time for the People Data Manager */
.people-view-switch {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 0 12px 0;
}

.people-content-grid.show-records,
.people-content-grid.show-details {
  display: block;
}

.people-content-grid.show-records .people-edit-panel {
  display: none;
}

.people-content-grid.show-details .people-list-panel {
  display: none;
}

.people-content-grid.show-records .people-list-panel,
.people-content-grid.show-details .people-edit-panel {
  width: 100%;
}

.people-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.people-data-table {
  min-width: 900px;
}

.people-form-grid {
  grid-template-columns: repeat(3, minmax(190px, 1fr));
}

@media (max-width: 1100px) {
  .people-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .people-form-grid {
    grid-template-columns: 1fr;
  }
}

/* Version 14.1.11 People Data Manager polish */
.people-record-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fbf4, #eef7ff);
  border: 1px solid #d6e7db;
}

.people-record-header strong {
  display: block;
  color: #194d34;
  font-size: 18px;
}

.people-record-header span {
  display: block;
  color: #597366;
  margin-top: 4px;
}

.people-record-id-badge {
  white-space: nowrap;
  padding: 10px 14px;
  border-radius: 999px;
  background: #194d34;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 5px 14px rgba(0,0,0,0.16);
}

.people-card {
  margin: 14px 0;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid #d8e7dd;
  box-shadow: 0 6px 14px rgba(0,0,0,0.06);
}

.people-card h3 {
  margin: 0 0 12px 0;
  color: #17482f;
  font-size: 20px;
}

.people-card-personal { background: #f0f9f2; }
.people-card-burial { background: #eef7ff; }
.people-card-grave { background: #fff9df; }
.people-card-notes { background: #f7f1ff; }

.people-date-control {
  display: grid;
  grid-template-columns: 80px minmax(135px, 1fr) 100px;
  gap: 8px;
}

.people-date-control input,
.people-date-control select,
.people-select-other select,
.people-select-other input,
.people-field input,
.people-field textarea {
  border: 1px solid #aac7b5;
  border-radius: 10px;
  padding: 9px 10px;
  font: inherit;
  background: #fff;
  box-sizing: border-box;
}

.people-select-other {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.people-select-other select,
.people-select-other input {
  width: 100%;
}

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

.wide-field {
  grid-column: span 2;
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  background: rgba(255,255,255,0.96);
  padding: 14px;
  border-radius: 14px;
  box-shadow: 0 -5px 16px rgba(0,0,0,0.08);
}

@media (max-width: 820px) {
  .people-date-control {
    grid-template-columns: 1fr;
  }
  .wide-field {
    grid-column: auto;
  }
  .people-record-header {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* Version 14.1.11.1 readability polish */
.people-manager-main {
  padding: 18px;
}

.people-hero {
  padding: 18px 20px;
  margin-bottom: 14px;
}

.people-hero h1 {
  font-size: 32px;
}

.people-toolbar {
  padding: 12px;
}

.people-card {
  margin: 10px 0;
  padding: 12px 14px;
}

.people-card h3 {
  margin: -12px -14px 10px -14px;
  padding: 9px 14px;
  background: #194d34;
  color: #fff;
  border-radius: 15px 15px 0 0;
  font-size: 19px;
  font-weight: 800;
}

.people-form-grid {
  gap: 9px 12px;
}

.people-field {
  gap: 3px;
}

.people-field span {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.15;
  color: #143d2a;
}

.people-field input,
.people-field textarea,
.people-field select,
.people-date-control input,
.people-date-control select,
.people-select-other select,
.people-select-other input {
  font-size: 14px;
  font-weight: 600;
  padding: 7px 9px;
  min-height: 34px;
}

.people-field small {
  font-size: 11px;
  line-height: 1.1;
}

.people-field textarea {
  min-height: 74px;
}

.people-record-header {
  padding: 10px 14px;
  margin-bottom: 10px;
}

.people-record-header strong {
  font-size: 18px;
}

.people-record-id-badge {
  font-size: 15px;
  padding: 8px 12px;
}

.people-form-actions {
  margin-top: 10px;
  padding-top: 10px;
}

.sticky-actions {
  padding: 10px 12px;
}

.people-form-actions button,
.people-toolbar button,
.people-view-switch button {
  font-size: 13px;
  font-weight: 800;
}

/* Version 14.1.2 Records list readability and selected-row polish */
.people-data-table {
  font-size: 15px;
}

.people-data-table th {
  font-size: 15px;
  font-weight: 800;
  padding: 10px 11px;
}

.people-data-table td {
  font-size: 15px;
  padding: 8px 11px;
}

.people-data-table tr.selected td,
.people-data-table tbody tr:hover td {
  background: #e3f5e8 !important;
}

.people-row-actions button {
  font-size: 13px;
  font-weight: 700;
  padding: 7px 9px;
}

.people-search-mode {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid #c9dbcf;
  border-radius: 10px;
  background: #f6fbf7;
  color: #17462f;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.people-search-mode label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  cursor: pointer;
}

.people-search-mode input {
  width: auto;
  margin: 0;
}

@media (max-width: 900px) {
  .people-search-mode {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* Version 14.2.5 - People page date dropdowns */
.people-date-label {
  grid-column: span 2;
}
.people-date-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.people-date-range > div {
  display: grid;
  grid-template-columns: 70px 1fr 70px;
  gap: 6px;
  align-items: center;
}
.people-date-range span {
  grid-column: 1 / -1;
  font-size: 11px;
  font-weight: 700;
  color: #06433e;
}
.people-date-range input,
.people-date-range select {
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 900px) {
  .people-date-range { grid-template-columns: 1fr; }
}


/* Version 14.2.6 admin map date controls */
.admin-date-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 4px 0 10px 0;
}
.admin-date-range > div {
  border: 1px solid #c9d6d4;
  background: #f7fbfa;
  padding: 6px;
  border-radius: 4px;
}
.admin-date-range span {
  display: block;
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 4px;
  color: #06433e;
}
.admin-date-range input,
.admin-date-range select {
  width: 42%;
  margin-right: 2%;
  box-sizing: border-box;
}


.people-date-range-control {
  display: grid;
  gap: 8px;
}
.people-date-range-row {
  display: grid;
  grid-template-columns: 95px 1fr;
  gap: 8px;
  align-items: center;
}
.people-date-range-row strong {
  font-size: 12px;
  color: #06433e;
}
.people-date-control-small {
  display: grid;
  grid-template-columns: 70px 1fr 90px;
  gap: 6px;
}


/* Version 14.2.9.1 - People manager usability tweaks */
.people-search-mode {
  flex: 0 0 auto !important;
  width: auto !important;
  justify-content: flex-start !important;
  gap: 8px !important;
}

.people-search-mode label {
  width: auto !important;
  margin: 0 !important;
  gap: 4px !important;
}

.people-search-mode input[type="radio"] {
  width: auto !important;
  min-width: 0 !important;
  margin: 0 3px 0 0 !important;
  padding: 0 !important;
}

.people-actions-heading,
.people-row-actions {
  position: sticky;
  left: 0;
  z-index: 2;
  background: inherit;
}

.people-actions-heading {
  z-index: 3;
  min-width: 150px;
}

.people-row-actions {
  min-width: 150px;
  white-space: nowrap;
  background: #fff;
}

.people-data-table tr:nth-child(even) .people-row-actions {
  background: #fbfdfb;
}

.people-data-table tr.selected .people-row-actions,
.people-data-table tbody tr:hover .people-row-actions {
  background: #e3f5e8 !important;
}

/* Version 14.2.9.2 - People manager easier editing tweaks */
.people-search-mode {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.people-search-mode label {
  display: inline-flex !important;
  align-items: center !important;
  width: auto !important;
  min-width: 0 !important;
  gap: 4px !important;
}

.people-search-mode input[type="radio"] {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  margin: 0 3px 0 0 !important;
  padding: 0 !important;
}

.people-age-control {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.people-age-control input {
  min-width: 0;
}

.people-age-control button {
  margin: 0;
  white-space: nowrap;
}

/* Graves Site No searchable autocomplete */
.people-site-autocomplete {
  position: relative;
  width: 100%;
}

.people-site-autocomplete input {
  width: 100%;
  box-sizing: border-box;
}

.people-site-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 5000;
  max-height: 320px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #9ca3af;
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  padding: 4px;
}

.people-site-suggestions[hidden] {
  display: none;
}

.people-site-suggestion {
  display: grid;
  grid-template-columns: minmax(74px, auto) minmax(92px, auto) 1fr;
  gap: 8px;
  align-items: center;
  width: 100%;
  border: 0;
  border-left: 7px solid #eab308;
  border-radius: 4px;
  margin: 2px 0;
  padding: 8px 10px;
  background: #fffbea;
  color: #111827;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.people-site-suggestion:hover,
.people-site-suggestion:focus {
  outline: 2px solid #2563eb;
  outline-offset: -2px;
  background: #eff6ff;
}

.people-site-suggestion.allocated {
  border-left-color: #16a34a;
  background: #ecfdf3;
}

.people-site-suggestion.reserved {
  border-left-color: #dc2626;
  background: #fef2f2;
}

.people-site-suggestion.vacant {
  border-left-color: #eab308;
  background: #fffbea;
}

.people-site-suggestion strong {
  white-space: nowrap;
}

.people-site-suggestion span {
  white-space: nowrap;
  font-weight: 600;
}

.people-site-suggestion em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
}

.people-site-no-results {
  padding: 10px;
  color: #6b7280;
}

@media (max-width: 700px) {
  .people-site-suggestion {
    grid-template-columns: auto 1fr;
  }
  .people-site-suggestion em {
    grid-column: 1 / -1;
  }
}

/* Version 15.0 - graves list status filters and print list */
.people-list-filter-row {
  flex: 1 0 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  padding-top: 11px;
  margin-top: 2px;
  border-top: 1px solid #d7e3da;
}

.people-list-filter-row button {
  min-width: 125px;
}

.people-filter-button.active {
  background: #1f6b49;
  color: #fff;
  border-color: #164d36;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.24);
}

.people-print-list-button {
  background: #284f77;
  color: #fff;
  border-color: #173752;
}

.people-active-list-label {
  margin-left: auto;
  padding: 7px 10px;
  border-radius: 7px;
  background: #edf6f0;
  color: #164d36;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .people-active-list-label {
    flex: 1 0 100%;
    margin-left: 0;
  }
}


/* Version 18.0 - interactive grave layout editor */
.layout-editor-toolbar { display:flex; flex-wrap:wrap; gap:7px; align-items:center; margin:0 0 10px; padding:8px; background:#f1f5f1; border:1px solid #9aaa9a; border-radius:6px; }
.layout-editor-toolbar span { font-size:12px; color:#334; }
.grave-grid.layout-canvas { display:block; position:relative; gap:0; min-width:100px; min-height:100px; background-image:linear-gradient(to right,rgba(0,0,0,.045) 1px,transparent 1px),linear-gradient(to bottom,rgba(0,0,0,.045) 1px,transparent 1px); background-size:20px 20px; }
.grave-grid.layout-canvas .grave { position:absolute; margin:0; user-select:none; touch-action:none; }
.grave-grid.layout-canvas .grave.blank { pointer-events:none; border-color:transparent; }
.grave-grid.layout-editing .grave:not(.blank) { cursor:move; outline:1px dashed #155724; z-index:2; }
.grave-grid.layout-editing .grave.layout-selected { outline:3px solid #0047ab; z-index:5; }
.layout-resize-handle { display:none; position:absolute; right:-4px; bottom:-4px; width:12px; height:12px; background:#0047ab; border:1px solid white; cursor:nwse-resize; z-index:9; }
.grave-grid.layout-editing .grave.layout-selected .layout-resize-handle { display:block; }
.layout-modified::after { content:'*'; position:absolute; left:2px; top:0; font-size:14px; font-weight:bold; color:#0047ab; }
@media (max-width:800px) { .layout-editor-toolbar { align-items:stretch; } .layout-editor-toolbar button { min-height:38px; } }

/* Version 19.0.9 - search highlighting and keyboard navigation */
.search-result-count {
  font-weight: 700;
  margin-bottom: 4px;
}
.search-keyboard-help {
  color: #5d665f;
  font-size: 0.9rem;
  margin-top: 0;
}
.search-match {
  background: #fff2a8;
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}
.search-result-card {
  cursor: pointer;
  transition: box-shadow .12s ease, border-color .12s ease, background .12s ease;
}
.search-result-card.keyboard-selected {
  border-color: #1f6b49;
  background: #f0f8f3;
  box-shadow: 0 0 0 3px rgba(31,107,73,.18);
}
.search-result-card.keyboard-selected::before {
  content: "▶";
  color: #1f6b49;
  font-weight: 700;
  margin-right: 7px;
  align-self: center;
}

/* Version 19.0.9 - full-resolution photograph actions */
.photo-full-actions { display:flex; gap:10px; justify-content:center; flex-wrap:wrap; margin-top:10px; }
.photo-full-actions .open-original-link { display:inline-block; padding:8px 12px; background:#fff; color:#7a1111; border-radius:5px; text-decoration:none; font-weight:700; }


/* Version 19.0.9.2 - full-resolution photograph loading indicator */
.photo-lightbox-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 94vw;
  max-height: 94vh;
}
.photo-loading-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 92vw;
  max-height: 82vh;
  min-width: 220px;
  min-height: 160px;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(0,0,0,.22);
}
.photo-loading-frame .photo-lightbox-image {
  display: block;
  max-width: 92vw;
  max-height: 82vh;
  object-fit: contain;
  transition: filter .2s ease, opacity .2s ease;
}
.photo-loading-frame .photo-preview-image {
  filter: blur(.3px);
  opacity: .94;
}
.photo-loading-overlay {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 28px);
  padding: 10px 14px;
  color: #fff;
  background: rgba(0,0,0,.76);
  border-radius: 7px;
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
  font-weight: 700;
  white-space: nowrap;
  transition: opacity .18s ease;
}
.photo-loading-overlay[hidden] { display: none; }
.photo-loading-overlay.photo-loading-complete { opacity: 0; }
.photo-loading-spinner {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  border: 3px solid rgba(255,255,255,.38);
  border-top-color: #fff;
  border-radius: 50%;
  animation: photo-loading-spin .8s linear infinite;
}
.photo-load-error {
  margin-top: 10px;
  padding: 9px 12px;
  max-width: 680px;
  color: #fff;
  background: #8d2525;
  border-radius: 5px;
  text-align: center;
  font-weight: 700;
}
.photo-load-error[hidden] { display: none; }
@keyframes photo-loading-spin { to { transform: rotate(360deg); } }
@media (max-width: 600px) {
  .photo-loading-overlay { white-space: normal; text-align: left; }
  .photo-loading-text { line-height: 1.25; }
}
