[hidden] {
  display: none !important;
}

.complete-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 14px 120px;
}
.complete-title {
  font-size: 22px;
  font-weight: 900;
  margin: 6px 0 14px;
}
.complete-sub {
  color: #6b7280;
  font-size: 13px;
  margin-bottom: 14px;
}

.inspection-email-preview {
  border: 1px solid #dbe2ea;
  border-radius: 10px;
  background: #f8fafc;
}

.inspection-email-preview > summary {
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 800;
}

.inspection-email-preview[open] > summary {
  border-bottom: 1px solid #dbe2ea;
}

.inspection-email-preview-meta {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 12px 14px 0;
}

.inspection-email-preview-meta div {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 8px;
}

.inspection-email-preview-meta dt {
  color: #64748b;
  font-weight: 800;
}

.inspection-email-preview-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.inspection-email-preview pre {
  max-height: 420px;
  margin: 12px 14px 14px;
  padding: 14px;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #1e293b;
  font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.card {
  background: #fff;
  border: 1px solid #eef0f3;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}
.card h2 {
  font-size: 14px;
  margin: 0 0 10px;
  font-weight: 900;
}

.list {
  margin: 0;
  padding-left: 18px;
}
.list li {
  margin: 6px 0;
}

.pill {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
}
.pill-green {
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #065f46;
}
.pill-orange {
  background: rgba(249, 115, 22, 0.18);
  border: 1px solid rgba(249, 115, 22, 0.35);
  color: #7c2d12;
}
.btn-mini {
  display: inline-block;
  padding: 8px 10px;
  border-radius: 10px;
  font-weight: 900;
  font-size: 12px;
  border: 1px solid #e5e7eb;
  background: #111827;
  color: #fff;
  cursor: pointer;
}
.btn-mini:active {
  transform: translateY(1px);
}
.pill-grey {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #374151;
}

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

.table th,
.table td {
  word-wrap: break-word;
}

.table th,
.table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #eef0f3;
  vertical-align: middle;
}
.table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
}

.muted {
  color: #6b7280;
  font-size: 13px;
}

.bottom-action {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 14px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-top: 1px solid #eef0f3;
  z-index: 1000;
}

.bottom-action a {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  background: rgba(34, 197, 94, 0.95);
  color: #064e3b;
  border: 1px solid rgba(34, 197, 94, 0.55);
  border-radius: 14px;
  padding: 14px 14px;
  font-weight: 900;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 18px rgba(34, 197, 94, 0.22);
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  font-family:
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    sans-serif;
}

.development-database-banner {
  width: 100%;
  padding: 8px 14px;
  border-bottom: 1px solid #92400e;
  background: #f59e0b;
  color: #451a03;
  text-align: center;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.page {
  min-height: 100vh;
  background: #f6f7f9;
}

/* --- Work Zone Topbar --- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 2000;
  background: linear-gradient(180deg, var(--primary) 0%, #08162b 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar > h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.3px;
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.topbar-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
}

.inspection-home-button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.inspection-home-button:hover,
.inspection-home-button:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.app-version-footer {
  width: 100%;
  padding: 22px 16px;
  color: #64748b;
  text-align: center;
  font-size: 12px;
}

.app-version-footer a {
  color: inherit;
  text-decoration: none;
}

.app-version-footer a:hover,
.app-version-footer a:focus-visible {
  color: #2563eb;
  text-decoration: underline;
}

.version-history-page {
  width: min(860px, calc(100% - 32px));
  margin: 32px auto;
}

.version-history-heading,
.version-release-heading,
.version-release-heading > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.version-history-heading {
  margin-bottom: 22px;
}

.version-history-heading h1,
.version-history-heading p,
.version-release-heading h2 {
  margin: 0;
}

.version-history-heading p,
.version-release time {
  color: #64748b;
}

.version-release {
  margin-bottom: 16px;
  border-left: 4px solid #cbd5e1;
}

.version-release.is-current {
  border-left-color: #2563eb;
}

.version-release ul {
  margin: 16px 0 0;
  padding-left: 22px;
}

.version-release li + li {
  margin-top: 8px;
}

@media (max-width: 640px) {
  .version-history-heading,
  .version-release-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

.topbar-logout-form {
  display: flex;
  margin: 0;
}

@media (max-width: 640px) {
  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-actions {
    width: 100%;
  }

  .topbar-actions .btn {
    flex: 1;
  }

  .topbar-logout-form {
    flex: 1;
  }

  .topbar-logout-form .btn {
    width: 100%;
  }
}

.accordion {
  max-width: 900px;
  margin: 0 auto;
  padding: 12px;
}

.acc-item {
  margin-bottom: 10px;
}

.acc-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 16px 14px;
  border: 0;
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;

  font-size: 18px;
  font-weight: 700;
  text-align: left;

  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.acc-header:active {
  transform: scale(0.995);
}

.acc-icon {
  font-size: 18px;
  transition: transform 180ms ease;
}

.acc-item.is-open .acc-icon {
  transform: rotate(180deg);
}

.acc-panel {
  margin-top: 8px;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.acc-panel-inner {
  padding: 14px;
  font-size: 15px;
  line-height: 1.4;
  color: #111827;
}

/* Slightly roomier on larger screens */
@media (min-width: 768px) {
  .topbar h1 {
    font-size: 18px;
  }
  .acc-header {
    font-size: 20px;
    padding: 18px 16px;
  }
  .acc-panel-inner {
    padding: 16px;
    font-size: 16px;
  }
}

/* ---------------- Step 1 form styles ---------------- */
.form-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 12px;
}

.inspection-remaining-wrap {
  padding-bottom: 0;
}

.inspection-remaining-card h2 {
  margin: 3px 0 0;
}

.inspection-remaining-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.inspection-remaining-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid #dbe2ea;
  border-radius: 9px;
  background: #f8fafc;
}

.inspection-remaining-list span {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.inspection-remaining-complete {
  margin: 0;
  color: #166534;
  font-weight: 700;
}

.aor-schedule-message {
  min-height: 20px;
  margin-top: 2px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.aor-schedule-message.is-error {
  color: #b91c1c;
}

.aor-schedule-message.is-valid {
  color: #166534;
}

#inspection-continue:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  padding: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

label {
  font-weight: 600;
  font-size: 14px;
}

input,
select {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  font-size: 16px;
  outline: none;
  background: #fff;
}

input:focus,
select:focus {
  border-color: #9ca3af;
}

.row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 700px) {
  .row {
    grid-template-columns: 1fr 1fr;
  }
}

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

.btn {
  border: 0;
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
}

.btn-primary {
  background: #111827;
  color: #fff;
}
.btn-ghost {
  background: #f3f4f6;
  color: #111827;
}
.zone-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.zone-boundary-editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid #dbe2ea;
}

.zone-boundary-editor-toolbar strong,
.zone-boundary-editor-toolbar span {
  display: block;
}

.zone-boundary-editor-toolbar span {
  margin-top: 3px;
  color: #64748b;
  font-size: 13px;
}

@media (max-width: 600px) {
  .zone-boundary-editor-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .zone-boundary-editor-toolbar .btn {
    width: 100%;
  }
}

.zone-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.zone-action-btn {
  text-align: left;
  cursor: pointer;
  border: 1px solid transparent;
}

.zone-action-btn:active {
  transform: translateY(1px);
}

/* Full-width status bars inside the section */
.zone-status {
  width: 100%;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 900;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.zone-status-complete {
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #065f46;
}

.zone-status-blocked {
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.32);
  color: #7f1d1d;
}

/* Simple modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 16px;
  padding-top: max(16px, env(safe-area-inset-top));
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 9999;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.defect-upload-overlay {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(2px);
}

.defect-upload-overlay[hidden] {
  display: none;
}

.defect-upload-card {
  width: min(330px, 100%);
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 26px 22px;
  border-radius: 16px;
  background: #fff;
  color: #111827;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.defect-upload-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid #dbeafe;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: defect-upload-spin 0.8s linear infinite;
}

.defect-upload-message {
  font-size: 1.05rem;
}

.defect-upload-hint {
  color: #64748b;
  font-size: 0.9rem;
}

body.defect-upload-busy {
  overflow: hidden;
}

@keyframes defect-upload-spin {
  to {
    transform: rotate(360deg);
  }
}

.modal {
  background: #fff;
  width: min(520px, 100%);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  margin: 0 auto;
  max-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
  overscroll-behavior: contain;
  touch-action: manipulation;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #eef0f3;
}

.modal-title {
  font-weight: 800;
}

.modal-body {
  padding: 14px;
  min-height: 120px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.modal-close {
  border: 0;
  background: #f3f4f6;
  color: #111827;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 700;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row label {
  font-size: 12px;
  font-weight: 700;
  color: #111827;
}

.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  font-size: 14px;
  outline: none;
}

.form-row textarea {
  min-height: 90px;
  resize: vertical;
}

#pin-form.is-readonly #pin-title,
#pin-form.is-readonly #pin-details,
#pin-form.is-readonly #pin-category,
#pin-form.is-readonly #pin-timestamp,
#pin-form.is-readonly #pin-added-by {
  cursor: default;
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #334155;
  opacity: 1;
}

.form-help {
  color: #64748b;
  font-size: 12px;
}

.defect-image-wrap {
  margin-top: 6px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.defect-image-wrap img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
}

.defect-update-thumbnail {
  display: block;
  width: 72px;
  height: 54px;
  border-radius: 7px;
  object-fit: cover;
}

.current-defect-update-image {
  display: block;
  width: min(100%, 320px);
  max-height: 220px;
  margin-top: 10px;
  border-radius: 9px;
  object-fit: contain;
  background: #f8fafc;
}

.report-defect-detail {
  display: grid;
  gap: 14px;
}

.report-zone-defect-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
}

.report-zone-defect-list li {
  min-height: 22px;
  padding-left: 2px;
}

.report-zone-defect-list li::marker {
  color: #2563eb;
}

.report-zone-defect-list a {
  font-weight: 700;
}

.report-zone-maximo-list li::marker {
  color: #94a3b8;
}

.report-defect-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.report-defect-heading h2,
.report-defect-detail h3,
.report-defect-description,
.report-defect-history-item p {
  margin: 0;
}

.report-defect-heading h2 {
  font-size: 20px;
}

.report-defect-detail h3 {
  font-size: 15px;
}

.report-defect-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.report-defect-meta > div {
  min-width: 0;
  padding: 9px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.report-defect-meta strong,
.report-defect-meta span {
  display: block;
}

.report-defect-meta strong,
.report-defect-history-item small {
  color: #64748b;
  font-size: 11px;
}

.report-defect-photo-link {
  display: block;
  width: fit-content;
  max-width: 100%;
}

.report-defect-photo {
  display: block;
  width: min(100%, 360px);
  max-height: 280px;
  border-radius: 10px;
  object-fit: contain;
}

.report-defect-history {
  display: grid;
  gap: 9px;
}

.report-defect-history-item {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #f8fafc;
}

@media (max-width: 600px) {
  .report-defect-meta {
    grid-template-columns: 1fr;
  }
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

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

.btn-secondary {
  background: #111827;
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 800;
  cursor: pointer;
}

.btn-light {
  background: #f3f4f6;
  color: #111827;
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 800;
  cursor: pointer;
}

.table .btn-light,
.table .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  white-space: nowrap;
}

.muted {
  color: #6b7280;
  font-size: 12px;
}

/* Readonly/grey fields when viewing an existing pin */
.readonly-field {
  background: #f3f4f6 !important;
  color: #6b7280 !important;
  border-color: #e5e7eb !important;
}

.history-wrap {
  margin-top: 12px;
  border-top: 1px solid #eef0f3;
  padding-top: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.history-title {
  font-weight: 800;
  margin-bottom: 8px;
}

.history-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 13px;
}

.history-table th,
.history-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #eef0f3;
  vertical-align: top;
}

.history-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
}

@media (max-width: 640px) {
  .history-table th,
  .history-table td {
    white-space: nowrap;
  }
}

.photo-preview {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #eef0f3;
  display: none;
  background: #f9fafb;
}

.btn-warning {
  background: #0b5;
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 800;
  cursor: pointer;
}

body.modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* Section status colours: green = done, orange/red = to do (override asset CSS) */
.acc-item.is-done > .acc-header {
  background: rgba(34, 197, 94, 0.18) !important;
  border: 1px solid rgba(34, 197, 94, 0.35) !important;
}

.acc-item.is-todo > .acc-header {
  background: rgba(249, 115, 22, 0.18) !important;
  border: 1px solid rgba(249, 115, 22, 0.35) !important;
}

/* Make headers feel like full-width pills */
.acc-header {
  width: 100%;
  border-radius: 12px;
  padding: 14px 14px;
  margin-bottom: 10px;
}

.acc-item + .acc-item {
  margin-top: 8px;
}

/* Bottom action bar */
.bottom-action {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 14px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-top: 1px solid #eef0f3;
  z-index: 1000;
}

.bottom-action-btn {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  background: rgba(34, 197, 94, 0.95);
  color: #064e3b;
  border: 1px solid rgba(34, 197, 94, 0.55);
  border-radius: 14px;
  padding: 14px 14px;
  font-weight: 900;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 18px rgba(34, 197, 94, 0.22);
}

.bottom-action-btn:active {
  transform: translateY(1px);
}

.bottom-action-btn:hover {
  filter: brightness(1.03);
}

/* Leave space so fixed bar doesn't cover content */
body {
  padding-bottom: 88px;
}

/* Fallback: ensure the map has a real height even inside the accordion */
#map-313 {
  display: block;
  width: 100%;
  height: 52vh;
  min-height: 320px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

@media (min-width: 768px) {
  #map-313 {
    height: 56vh;
    min-height: 420px;
  }
}

/* =========================================================
   Corporate (Aviation Ops) Theme Overrides
   - calmer palette, tighter radius, reduced shadows
   - consistent buttons, tables, and modal sizing
   ========================================================= */
:root {
  --bg: #eef2f6;
  --surface: #ffffff;
  --surface-2: #f3f6fa;
  --text: #0f172a;
  --muted: #64748b;
  --border: #dbe3ee;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05);

  --primary: #0b1f3b; /* navy */
  --primary-2: #0e2a52;
  --primary-text: #ffffff;

  --success: #0f766e; /* teal-green */
  --success-bg: rgba(15, 118, 110, 0.12);
  --success-br: rgba(15, 118, 110, 0.28);

  --warning: #b45309; /* amber */
  --warning-bg: rgba(180, 83, 9, 0.12);
  --warning-br: rgba(180, 83, 9, 0.28);

  --danger: #b91c1c;
  --danger-bg: rgba(185, 28, 28, 0.1);
  --danger-br: rgba(185, 28, 28, 0.25);

  --radius: 10px;
  --radius-sm: 8px;
}

html,
body {
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    sans-serif;
  color: var(--text);
  background: var(--bg);
}

.page {
  background: var(--bg);
}

/* Subtle contrast blocks so sections don't blend together */
.acc-panel {
  background: var(--surface-2);
}

.acc-panel-inner {
  background: var(--surface);
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid var(--border);
}

/* Modals: tint the body so it isn't a big white sheet */
.modal-body {
  background: var(--surface-2);
}

.modal-form,
.history-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}

.history-wrap {
  padding: 12px;
}

.topbar {
  background: linear-gradient(180deg, var(--primary) 0%, #08162b 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

.topbar h1 {
  font-weight: 700;
  letter-spacing: 0.2px;
}

/* Cards / panels */
.card,
.acc-panel {
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  background: var(--surface);
}

.acc-panel-inner {
  color: var(--text);
}

/* Accordion headers */
.acc-header {
  background: linear-gradient(180deg, #ffffff 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 16px;
  padding: 14px 14px;
  margin-bottom: 10px;
}

@media (min-width: 768px) {
  .acc-header {
    font-size: 17px;
  }
}

.acc-icon {
  opacity: 0.75;
}

/* Status colours (done vs todo) – calmer */
.acc-item.is-done > .acc-header {
  background: var(--success-bg) !important;
  border-color: var(--success-br) !important;
}

.acc-item.is-todo > .acc-header {
  background: var(--warning-bg) !important;
  border-color: var(--warning-br) !important;
}

/* Buttons */
.btn,
.btn-secondary,
.btn-light,
.bottom-action-btn,
.bottom-action a,
.btn-mini {
  border-radius: var(--radius-sm);
  box-shadow: none;
}


.btn-primary,
.btn-secondary {
  background: var(--primary);
  color: var(--primary-text);
}

.btn-primary:hover,
.btn-secondary:hover {
  background: var(--primary-2);
}

.btn-ghost,
.btn-light {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
}

/* Topbar button override (dark navbar only) */
.admin-lock {
  margin-left: 0.2rem;
  font-size: 0.72em;
  line-height: 1;
  vertical-align: 0.06em;
}

.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;
}

.topbar .btn-ghost,
.topbar .btn-light {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: #ffffff;
}

.topbar .btn-light:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.4);
}

.topbar .btn-light:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.4);
}

.topbar .btn-primary,
.topbar .btn-secondary {
  background: #ffffff;
  color: var(--primary);
  border: 1px solid rgba(255,255,255,0.4);
}

.btn-ghost:hover,
.btn-light:hover {
  background: var(--surface-2);
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid #991b1b;
  border-radius: var(--radius-sm);
  background: #b91c1c;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.btn-danger:hover {
  background: #991b1b;
}

.btn-danger:disabled {
  cursor: wait;
  opacity: 0.65;
}

.dashboard-inspection-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.dashboard-resume-form {
  display: flex;
  margin: 0;
}

@media (max-width: 640px) {
  .dashboard-active-inspections {
    max-width: 100%;
    padding: 14px !important;
    overflow: hidden;
  }

  .dashboard-active-inspections-table,
  .dashboard-active-inspections-table tbody,
  .dashboard-active-inspections-table tr,
  .dashboard-active-inspections-table td {
    display: block;
    width: 100%;
    max-width: 100%;
  }

  .dashboard-active-inspections-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .dashboard-active-inspections-table tbody {
    display: grid;
    gap: 12px;
  }

  .dashboard-active-inspections-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    padding: 12px;
    border: 1px solid #dbe2ea;
    border-radius: 11px;
    background: #f8fafc;
  }

  .dashboard-active-inspections-table td {
    min-width: 0;
    padding: 0;
    border: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .dashboard-active-inspections-table td::before {
    display: block;
    margin-bottom: 3px;
    color: #64748b;
    content: attr(data-label);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

  .dashboard-active-inspections-table .dashboard-inspection-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 2px;
  }

  .dashboard-active-inspections-table .dashboard-inspection-actions::before {
    grid-column: 1 / -1;
  }

  .dashboard-active-inspections-table .dashboard-inspection-actions > * {
    width: 100%;
    max-width: 100%;
    margin: 0;
  }

  .dashboard-resume-form .btn-secondary {
    width: 100%;
  }
}

/* ---------------------------------------------------------
   Standardise top control buttons (Add Defect / Toggle)
   --------------------------------------------------------- */
.zone-controls .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 16px;
  font-size: 14px;
  line-height: 1;
}

/* Outline button style (matches height + weight of primary) */
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 700;
}

.btn-outline:hover {
  background: var(--surface-2);
}

.btn-warning {
  background: var(--primary);
  color: var(--primary-text);
}

/* Zone action bars become button-like, but restrained */
.zone-status {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.zone-status-complete {
  background: var(--success-bg);
  border-color: var(--success-br);
  color: #064e3b;
}

.zone-status-blocked {
  background: var(--danger-bg);
  border-color: var(--danger-br);
  color: #7f1d1d;
}

/* Inputs */
input,
select,
textarea {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 16px; /* Prevents iOS zoom + improves readability */
}

select option {
  color: #000;
  background: #fff;
  font-size: 16px;
}

/* Fix faint text on mobile browsers */
select {
  -webkit-text-fill-color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(11, 31, 59, 0.45);
  box-shadow: 0 0 0 3px rgba(11, 31, 59, 0.1);
}

label {
  color: var(--text);
}

.muted {
  color: var(--muted) !important;
}

/* Pills */
.pill {
  border-radius: 999px;
}
.pill-green {
  background: var(--success-bg);
  border-color: var(--success-br);
  color: #064e3b;
}
.pill-orange {
  background: var(--warning-bg);
  border-color: var(--warning-br);
  color: #7c2d12;
}
.pill-grey {
  background: var(--surface-2);
  border-color: var(--border);
  color: #334155;
}

/* Tables */
.table,
.history-table {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.table th,
.history-table th {
  background: var(--surface-2);
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 12px;
}

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

/* Modals */
.modal {
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.modal-header {
  background: var(--surface);
}

.modal-close {
  border: 1px solid var(--border);
  background: var(--surface-2);
}

/* Bottom action bar */
.bottom-action {
  background: rgba(244, 246, 249, 0.92);
  border-top: 1px solid var(--border);
}

.bottom-action-btn,
.bottom-action a {
  background: var(--success);
  color: #ecfeff;
  border: 1px solid rgba(236, 254, 255, 0.35);
  box-shadow: none;
}

.bottom-action-btn:hover,
.bottom-action a:hover {
  filter: brightness(1.03);
}

/* Readonly fields */
.readonly-field {
  background: var(--surface-2) !important;
  color: var(--muted) !important;
  border-color: var(--border) !important;
}

/* Ensure Leaflet maps are visible */
.zone-map {
  height: 52vh;
  min-height: 320px;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

/* Leaflet inside modals/accordions can need explicit background */
.zone-map {
  background: #e9eef5;
}
/* =========================================================
   Open Checks – Dashboard Styling
   ========================================================= */

.open-check-card {
  padding: 16px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.badge {
  background: var(--primary);
  color: var(--primary-text);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
}

.open-check-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.open-check-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition:
    background 120ms ease,
    transform 60ms ease;
}

.open-check-item:hover {
  background: var(--surface-2);
}

.open-check-item:active {
  transform: translateY(1px);
}

.open-check-main {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.open-check-zone {
  font-weight: 700;
  font-size: 15px;
}

.open-check-time {
  font-size: 13px;
  color: var(--muted);
}

.open-check-meta {
  display: flex;
  gap: 14px;
  font-size: 13px;
  color: var(--muted);
}

.open-check-action {
  margin-top: 6px;
  display: flex;
  justify-content: flex-end;
}

.btn-sm {
  padding: 8px 12px;
  font-size: 13px;
}

@media (min-width: 768px) {
  .open-check-item {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .open-check-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .open-check-meta {
    min-width: 220px;
  }
}

.zone-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  background: #d32f2f; /* red */
  color: #fff;
  border-radius: 999px;
  vertical-align: middle;
}

/* =========================================================
   Inspection Group Headers (In Progress / Completed)
   ========================================================= */

.accordion-group-title {
  margin: 18px 0 10px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  display: flex;
  align-items: center;
}

.accordion-group-title.group-todo {
  background: var(--warning-bg);
  border-color: var(--warning-br);
  color: #7c2d12;
}

.accordion-group-title.group-done {
  background: var(--success-bg);
  border-color: var(--success-br);
  color: #064e3b;
}

/* subtle divider line */
.accordion-group-title::after {
  content: "";
  flex: 1;
  height: 1px;
  margin-left: 12px;
  background: var(--border);
  opacity: 0.6;
}

/* =========================================================
   Inspection Progress Bar (Top of AOR Page)
   ========================================================= */

.inspection-progress {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin: 4px 0 18px;
  box-shadow: var(--shadow);
}

.inspection-progress-text {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.inspection-progress-bar {
  width: 100%;
  height: 10px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.inspection-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--success) 0%, #16a34a 100%);
  transition: width 250ms ease;
}

/* When 100% complete */
.inspection-progress-fill[style*="width: 100%"] {
  background: var(--success);
}

@media (max-width: 640px) {
  select {
    font-size: 17px;
  }

  select option {
    font-size: 17px;
  }
}



/* =========================================================
   Dashboard Stat Cards (Clean Implementation)
   ========================================================= */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
  align-items: stretch;
}

.stats-grid .card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding: 20px;
  height: 100%;
}
.nowrap-cell {
  white-space: nowrap;
}

@media (max-width: 640px) {
  .btn-block-mobile {
    display: block;
    width: 100%;
    text-align: center;
  }
}


/* =========================================================
   Settings page 
   ========================================================= */



.settings-card {
    display:block;
    padding:24px;
    background:#1e1e1e;
    border-radius:10px;
    text-decoration:none;
    color:#ffffff;
    transition:all 0.2s ease;
    border:1px solid #2c2c2c;
}

.settings-card:hover {
    transform:translateY(-3px);
    border-color:#00c2ff;
    box-shadow:0 6px 20px rgba(0,0,0,0.25);
}

.settings-card-title {
    font-size:18px;
    font-weight:600;
    margin-bottom:10px;
}

.settings-card-desc {
    font-size:14px;
    opacity:0.75;
}


/* =====================================================
   Weekly Inspection Compliance Report (Themed)
   ===================================================== */

.report-header {
    margin-bottom: 20px;
}

.report-header h1 {
    margin: 0 0 16px;
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
}

.week-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.week-label {
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
    text-align: center;
    flex: 1;
}

.week-nav .btn {
    min-width: 110px;
    text-align: center;
}

/* Mobile adjustments */
@media (max-width: 640px) {
    .week-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .week-label {
        order: -1;
        margin-bottom: 6px;
    }

    .week-nav .btn {
        width: 100%;
    }
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    table-layout: fixed;
}

.report-table thead {
    background: var(--surface-2);
}

.report-table th {
    padding: 14px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
}

.report-table td {
    padding: 14px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    vertical-align: middle;
}

.report-table tbody tr:nth-child(even) td {
    background: #fbfcfe;
}

.report-table tbody tr:hover td {
    background: var(--surface-2);
}

.status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px; /* square with slight rounding */
    font-size: 15px;
    font-weight: 800;
}

.status-cell {
    width: 90px;
}

/* Completed */
.status-icon.complete {
    background: var(--success-bg);
    border: 1px solid var(--success-br);
    color: var(--success);
}

/* In Progress */
.status-icon.progress {
    background: var(--warning-bg);
    border: 1px solid var(--warning-br);
    color: var(--warning);
}

/* Missing */
.status-icon.missing {
    background: var(--danger-bg);
    border: 1px solid var(--danger-br);
    color: var(--danger);
}

/* Mobile */
@media (max-width: 768px) {
    .report-table th,
    .report-table td {
        padding: 10px;
        font-size: 12px;
    }

    .status-icon {
        width: 26px;
        height: 26px;
        font-size: 13px;
    }
}
/* =====================================================
   Excel-Style Inspection Report Table
   ===================================================== */

.excel-table {
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  box-shadow: none;
}

.excel-table th,
.excel-table td {
  border: 1px solid #d1d5db;
}

.excel-table thead th {
  background: #e5e7eb;
  font-weight: 700;
  color: #111827;
}

.excel-table tbody tr:nth-child(even) td {
  background: #f9fafb;
}

.excel-table tbody tr:hover td {
  background: #f3f4f6;
}


/* Prevent horizontal overflow on mobile for defect tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-responsive .table {
  min-width: 700px; /* allows horizontal scroll instead of breaking layout */
}

@media (max-width: 640px) {
  .table {
    font-size: 12px;
  }

  .table input[type="text"] {
    min-width: 120px;
  }
}

input[name="maximo_id"] {
  text-transform: uppercase;
}

/* =====================================================
   Daily Check Builder
   ===================================================== */

.daily-check-builder {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.daily-check-heading,
.daily-check-card-head,
.daily-check-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.daily-check-heading {
  margin-bottom: 24px;
}

.daily-check-heading h1,
.daily-check-heading p,
.daily-check-card h2 {
  margin: 0;
}

.daily-check-heading p {
  margin-top: 6px;
  color: #6b7280;
}

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

.daily-check-card {
  display: flex;
  flex-direction: column;
  max-width: 100%;
  min-height: 0;
}

.daily-check-selectors {
  display: grid;
  gap: 18px;
  max-width: 520px;
}

.daily-zone-selection {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid #e5e7eb;
}

.daily-zone-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: 18px 0 12px;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
}

.daily-zone-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.daily-zone-legend i {
  width: 16px;
  height: 16px;
  border: 2px solid;
  border-radius: 4px;
}

.daily-zone-legend .is-selected {
  border-color: #166534;
  background: #22c55e;
}

.daily-zone-legend .is-allocated {
  border-color: #92400e;
  background: #f59e0b;
}

.daily-zone-legend .is-unallocated {
  border-color: #334155;
  background: #94a3b8;
}

#daily-zone-map {
  width: 100%;
  height: 62vh;
  min-height: 480px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  overflow: hidden;
  background: #e2e8f0;
}

.daily-zone-map-label {
  border: 0;
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.86);
  color: #fff;
  box-shadow: none;
  font-size: 11px;
  font-weight: 800;
  pointer-events: none;
}

.daily-zone-map-label::before {
  display: none;
}

.daily-unmapped-message {
  margin: 10px 0 0;
  color: #92400e;
  font-size: 13px;
  font-weight: 700;
}

.daily-zone-order-wrap {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #dbe2ea;
  border-radius: 12px;
  background: #f8fafc;
}

#zone-boundary-help.is-error {
  color: #b91c1c;
  font-weight: 800;
}

#zone-map .marker-snapped {
  border: 3px solid #22c55e !important;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.28);
}

.daily-zone-order-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.daily-zone-order-heading h3 {
  margin: 0;
  font-size: 16px;
}

.daily-zone-order-heading span {
  color: #64748b;
  font-size: 12px;
}

.daily-zone-order {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.daily-zone-order li {
  display: grid;
  grid-template-columns: 26px 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 9px;
  border: 1px solid #dbe2ea;
  border-radius: 9px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.daily-zone-order-drag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 34px;
  color: #64748b;
  cursor: grab;
  font-size: 18px;
  user-select: none;
}

.daily-zone-order-drag:active {
  cursor: grabbing;
}

.daily-zone-order-position-label {
  display: block;
}

.daily-zone-order-position {
  width: 58px;
  min-height: 36px;
  padding: 5px 4px;
  border: 1px solid #bbf7d0;
  border-radius: 7px;
  background: #f0fdf4;
  color: #166534;
  font-weight: 900;
  text-align: center;
}

.daily-zone-order li.is-dragging {
  opacity: 0.42;
}

.daily-zone-order li.is-drop-before {
  border-top-color: #2563eb;
  box-shadow: 0 -3px 0 #2563eb;
}

.daily-zone-order li.is-drop-after {
  border-bottom-color: #2563eb;
  box-shadow: 0 3px 0 #2563eb;
}

.daily-zone-order-actions {
  display: flex;
  gap: 5px;
}

.daily-zone-order-actions .btn {
  min-width: 38px;
  padding: 7px 10px;
  font-size: 16px;
}

.daily-zone-order-actions .btn:disabled {
  cursor: default;
  opacity: 0.35;
}

@media (max-width: 600px) {
  .daily-zone-order-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .daily-zone-order li {
    grid-template-columns: 22px 52px minmax(0, 1fr);
  }

  .daily-zone-order-actions {
    grid-column: 2 / -1;
    justify-content: flex-end;
  }

  .daily-zone-order-position {
    width: 52px;
  }
}

.daily-check-count {
  display: inline-block;
  margin-top: 5px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 700;
}

.daily-check-actions {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #eef0f3;
}

.daily-check-message {
  font-size: 13px;
  font-weight: 700;
  color: #6b7280;
}

.daily-check-message.is-success {
  color: #047857;
}

.daily-check-message.is-error,
.zone-delete-button {
  color: #b91c1c;
}

/* =====================================================
   Map-first inspection screen
   ===================================================== */

.inspection-map-body {
  background: #eef2f7;
  padding-bottom: 88px;
}

.inspection-map-page {
  min-height: 100vh;
}

.inspection-map-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: #0f172a;
  color: #fff;
}

.inspection-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 24px;
  text-decoration: none;
}

.inspection-map-title span,
.inspection-map-progress-summary span,
.inspection-zone-eyebrow {
  display: block;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.inspection-map-title h1 {
  margin: 2px 0 0;
  color: #fff;
  font-size: 20px;
}

.inspection-map-progress-summary {
  text-align: right;
}

.inspection-map-progress-summary strong {
  display: block;
  font-size: 18px;
}

.inspection-map-progress-bar {
  height: 7px;
  background: #cbd5e1;
}

.inspection-map-progress-bar > div {
  height: 100%;
  background: #22c55e;
  transition: width 220ms ease;
}

.inspection-mobile-actions {
  display: none;
}

.inspection-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 14px;
  padding: 14px;
}

.inspection-overview-card,
.inspection-zone-panel {
  border: 1px solid #dbe2ea;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.inspection-map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
}

.inspection-map-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.inspection-status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.inspection-status-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.inspection-status-legend i {
  width: 13px;
  height: 13px;
  border: 2px solid;
  border-radius: 3px;
}

.inspection-status-legend .is-pending {
  border-color: #334155;
  background: #94a3b8;
}

.inspection-status-legend .is-blocked {
  border-color: #92400e;
  background: #f59e0b;
}

.inspection-status-legend .is-complete {
  border-color: #166534;
  background: #22c55e;
}

.inspection-status-legend .has-defect {
  border-color: #991b1b;
  border-radius: 50%;
  background: #ef4444;
}

.inspection-status-legend .checked-defect {
  border-color: #c2410c;
  border-radius: 50%;
  background: #f97316;
}

.inspection-status-legend .resolved-defect {
  border-color: #166534;
  border-radius: 50%;
  background: #22c55e;
}

#inspection-overview-map {
  width: 100%;
  height: calc(100vh - 175px);
  min-height: 540px;
  background: #dbe4ec;
}

.inspection-map-zone-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.88);
  color: #fff;
  box-shadow: none;
  font-size: 11px;
  font-weight: 900;
  pointer-events: none;
}

.inspection-map-zone-label::before {
  display: none;
}

#inspection-overview-map.zone-labels-hidden .inspection-map-zone-label {
  display: none;
}

.inspection-map-defect-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
}

.inspection-zone-panel {
  align-self: start;
  position: sticky;
  top: 14px;
  max-height: calc(100vh - 28px);
  padding: 18px;
  overflow-y: auto;
}

.inspection-zone-task-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.inspection-zone-task-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e2e8f0;
}

.inspection-zone-task-heading strong {
  display: block;
  margin-top: 3px;
  color: #0f172a;
  font-size: 18px;
}

#zone-task-summary {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
}

#zone-task-summary.is-complete {
  background: #dcfce7;
  color: #166534;
}

.inspection-zone-task-list {
  display: grid;
  gap: 7px;
  max-height: 285px;
  margin-top: 12px;
  padding-right: 2px;
  overflow-y: auto;
}

.inspection-zone-task-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
  padding: 5px 2px 2px;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.inspection-zone-task-group-heading:first-child {
  margin-top: 0;
}

.inspection-zone-task-group-heading small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 10px;
}

.inspection-zone-task {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 10px;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  text-align: left;
}

.inspection-zone-task:hover {
  border-color: #93c5fd;
  background: #f8fbff;
}

.inspection-zone-task.is-selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.inspection-zone-task-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

.inspection-zone-task-copy {
  min-width: 0;
}

.inspection-zone-task-copy strong,
.inspection-zone-task-copy small {
  display: block;
}

.inspection-zone-task-copy strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspection-zone-task-copy small {
  margin-top: 3px;
  color: #64748b;
  font-size: 11px;
}

.inspection-zone-task-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #94a3b8;
}

.inspection-zone-task.is-blocked .inspection-zone-task-indicator {
  background: #f59e0b;
}

.inspection-zone-task.is-complete .inspection-zone-task-indicator {
  background: #22c55e;
}

.inspection-zone-task.is-complete .inspection-zone-task-order {
  background: #dcfce7;
  color: #166534;
}

#zone-panel-content {
  scroll-margin-top: 12px;
}

.inspection-zone-placeholder {
  padding: 42px 12px;
  text-align: center;
  color: #64748b;
}

.inspection-zone-placeholder strong {
  display: block;
  margin-bottom: 7px;
  color: #0f172a;
  font-size: 18px;
}

.inspection-zone-panel-head,
.inspection-zone-defects,
.inspection-zone-primary-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.inspection-zone-panel-head h2 {
  margin: 3px 0 0;
  font-size: 25px;
}

.inspection-zone-state {
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.inspection-zone-state.is-pending {
  background: #e2e8f0;
  color: #334155;
}

.inspection-zone-state.is-blocked {
  background: #fef3c7;
  color: #92400e;
}

.inspection-zone-state.is-complete {
  background: #dcfce7;
  color: #166534;
}

.inspection-zone-defects {
  margin: 18px 0;
  padding: 12px 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 800;
}

.inspection-zone-primary-actions {
  align-items: stretch;
  flex-direction: column;
}

.inspection-zone-primary-actions .btn {
  width: 100%;
}

.inspection-zone-message {
  min-height: 20px;
  margin: 12px 0;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.inspection-zone-feedback {
  margin: 12px 0;
}

.inspection-zone-feedback .inspection-zone-message:empty {
  display: none;
}

.inspection-zone-defect-list {
  display: grid;
  gap: 7px;
}

.inspection-zone-defect-list > .muted {
  padding: 10px 0;
  font-size: 13px;
}

.inspection-zone-defect-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid #fecaca;
  border-left: 4px solid #dc2626;
  border-radius: 9px;
  background: #fff7f7;
  color: #0f172a;
  text-align: left;
}

.inspection-zone-defect-detail {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 3px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.inspection-zone-defect-detail span {
  flex: 0 0 auto;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 900;
}

.inspection-zone-defect-item.is-resolved {
  border-color: #bbf7d0;
  border-left-color: #16a34a;
  background: #f0fdf4;
}

.inspection-zone-defect-item.is-resolved .inspection-zone-defect-detail span {
  color: #166534;
}

.inspection-zone-defect-item.is-checked {
  border-color: #fdba74;
  border-left-color: #f97316;
  background: #fff7ed;
}

.inspection-zone-defect-item.is-checked .inspection-zone-defect-detail span {
  color: #c2410c;
}

.inspection-defect-check-button {
  flex: 0 0 auto;
  padding: 8px 9px;
  border: 1px solid #1d4ed8;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
}

.inspection-defect-check-button:disabled {
  border-color: #fdba74;
  background: #ffedd5;
  color: #c2410c;
  cursor: default;
}

.inspection-defect-check-button.is-uncheck,
#pin-mark-checked.is-uncheck {
  border-color: #c2410c;
  background: #fff7ed;
  color: #c2410c;
}

.inspection-zone-message.is-success {
  color: #047857;
}

.inspection-zone-message.is-error {
  color: #b91c1c;
}

.inspection-zone-status-actions {
  display: grid;
  gap: 9px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}

.inspection-zone-status-actions button {
  width: 100%;
  cursor: pointer;
}

.inspection-zone-status-actions button:disabled {
  cursor: default;
  opacity: 0.48;
}

#add-defect-button.is-placing-pin {
  background: #b91c1c;
}

.inspection-finish-action {
  z-index: 1500;
}

.inspection-empty-state {
  max-width: 620px;
  margin: 50px auto;
  text-align: center;
}

@media (max-width: 900px) {
  .inspection-map-body {
    padding-bottom: 96px;
  }

  .inspection-map-layout {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .inspection-mobile-actions {
    position: sticky;
    top: 0;
    z-index: 1450;
    display: block;
    padding: 9px 10px 10px;
    border-bottom: 1px solid #cbd5e1;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
  }

  .inspection-mobile-selected-area {
    margin-bottom: 8px;
  }

  .inspection-mobile-selected-area h2 {
    max-width: 65vw;
    overflow: hidden;
    font-size: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .inspection-mobile-action-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .inspection-mobile-actions button {
    min-width: 0;
    padding: 10px 5px;
    font-size: 12px;
    white-space: nowrap;
  }

  .inspection-mobile-actions button:disabled {
    cursor: default;
    opacity: 0.45;
  }

  #mobile-add-defect.is-placing-pin {
    background: #b91c1c;
  }

  #add-defect-button,
  #next-zone-button,
  #mark-zone-blocked,
  #mark-zone-complete {
    display: none;
  }

  #zone-panel-content > .inspection-zone-panel-head {
    display: none;
  }

  #inspection-overview-map {
    height: 58vh;
    min-height: 430px;
  }

  .inspection-zone-panel {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .inspection-zone-task-list {
    max-height: none;
    overflow: visible;
  }

  .inspection-map-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .inspection-map-actions {
    width: 100%;
  }

  .inspection-map-actions > .btn,
  .inspection-map-actions .current-defects-options {
    flex: 1;
  }

  .inspection-map-actions .current-defects-options > summary {
    text-align: center;
  }
}

@media (max-width: 560px) {
  .inspection-map-header {
    padding: 10px;
  }

  .inspection-map-title h1 {
    font-size: 17px;
  }

  .inspection-map-progress-summary strong {
    font-size: 15px;
  }

  #inspection-overview-map {
    height: 52vh;
    min-height: 360px;
  }
}

/* =====================================================
   Current defects map
   ===================================================== */

.dashboard-stat-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.dashboard-stat-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
}

.dashboard-stat-link-label {
  margin-top: 7px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 800;
}

.current-defects-body {
  background: #eef2f7;
}

.current-defects-page {
  max-width: 1500px;
  margin: 0 auto;
  padding: 24px 18px 50px;
}

.current-defects-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.current-defects-heading h1,
.current-defects-heading p,
.current-defects-list-head h2,
.current-defect-detail h2 {
  margin: 0;
}

.current-defects-heading p {
  margin-top: 5px;
  color: #64748b;
}

.current-defects-eyebrow {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.current-defects-total {
  min-width: 130px;
  padding: 12px 16px;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fff;
  text-align: center;
}

.current-defects-total strong {
  display: block;
  color: #b91c1c;
  font-size: 27px;
}

.current-defects-total span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.current-defects-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 14px;
}

.current-defects-map-card,
.current-defects-sidebar {
  border: 1px solid #dbe2ea;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.current-defects-map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
}

.current-defects-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.current-defects-map-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

#defects-add-new.is-active {
  background: #b91c1c;
  color: #fff;
}

.current-defects-placement-message {
  padding: 9px 12px;
  border-bottom: 1px solid #fcd34d;
  background: #fef3c7;
  color: #92400e;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

#current-defects-map.is-adding-defect,
#current-defects-map.is-adding-defect .leaflet-interactive {
  cursor: crosshair;
}

.current-defects-options {
  position: relative;
}

.current-defects-options > summary {
  list-style: none;
  user-select: none;
}

.current-defects-options > summary::-webkit-details-marker {
  display: none;
}

.current-defects-options[open] > summary {
  background: #e2e8f0;
}

.current-defects-options-panel {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 1001;
  width: max-content;
  min-width: 220px;
  padding: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
}

.current-defects-options-panel label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 8px;
  border-radius: 7px;
  color: #1e293b;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}

.current-defects-options-panel label:hover {
  background: #f1f5f9;
}

.current-defects-options-panel input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--primary);
}

.current-defects-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.current-defects-legend i {
  width: 13px;
  height: 13px;
  border: 2px solid;
  border-radius: 3px;
}

.current-defects-legend .has-none {
  border-color: #475569;
  background: #94a3b8;
}

.current-defects-legend .has-defects {
  border-color: #991b1b;
  background: #ef4444;
}

.current-defects-legend .defect-pin {
  border-color: #fff;
  border-radius: 50%;
  background: #dc2626;
  box-shadow: 0 0 0 1px #991b1b;
}

.current-defects-legend .resolved-pin {
  border-color: #fff;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 1px #166534;
}

#current-defects-map {
  width: 100%;
  height: calc(100vh - 235px);
  min-height: 590px;
  background: #dbe4ec;
}

.current-defects-zone-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.88);
  color: #fff;
  box-shadow: none;
  font-size: 11px;
  font-weight: 900;
  pointer-events: none;
}

.current-defects-zone-label::before {
  display: none;
}

#current-defects-map.zone-labels-hidden .current-defects-zone-label {
  display: none;
}

.current-defects-zone-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
}

.current-defect-status {
  display: inline-flex;
  margin-left: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 11px;
  font-weight: 900;
}

.current-defect-status.is-resolved {
  background: #dcfce7;
  color: #166534;
}

.current-defects-sidebar {
  align-self: start;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
}

.current-defects-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}

.current-defects-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 900;
}

.current-defects-list {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.current-defect-list-item {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.current-defect-list-item:hover {
  border-color: #fca5a5;
  background: #fff7f7;
}

.current-defect-list-item.is-resolved {
  border-left: 4px solid #16a34a;
  background: #f0fdf4;
}

.current-defect-list-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.current-defect-list-top > span {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 11px;
  font-weight: 800;
}

.current-defect-list-meta {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
}

.current-defects-empty {
  padding: 35px 15px;
  color: #64748b;
  text-align: center;
}

.current-defect-detail {
  padding: 16px;
}

.current-defect-modal {
  width: min(720px, 100%);
}

.current-defect-modal .current-defect-detail {
  padding: 2px;
}

.current-defect-location {
  margin-bottom: 16px;
}

#defect-location-map {
  width: 100%;
  height: 250px;
  margin-top: 7px;
  border: 1px solid #dbe2ea;
  border-radius: 12px;
  background: #dbe4ec;
}

.current-defect-detail-back {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  background: none;
  color: #2563eb;
  cursor: pointer;
  font-weight: 800;
}

.current-defect-detail h2 {
  margin-top: 4px;
}

.current-defect-category {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 11px;
  font-weight: 900;
}

.current-defect-detail > p {
  line-height: 1.55;
}

.current-defect-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0;
}

.current-defect-meta div {
  padding: 10px;
  border-radius: 9px;
  background: #f8fafc;
}

.current-defect-meta dt {
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.current-defect-meta dd {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 700;
}

.current-defect-history h3 {
  font-size: 14px;
}

.current-defect-history-item {
  margin-top: 8px;
  padding: 10px;
  border-left: 3px solid #f59e0b;
  border-radius: 0 8px 8px 0;
  background: #fffbeb;
}

.current-defect-history-item p {
  margin: 5px 0;
  font-size: 13px;
}

.current-defect-history-item small {
  color: #64748b;
}

@media (max-width: 950px) {
  .current-defects-layout {
    grid-template-columns: 1fr;
  }

  #current-defects-map {
    height: 60vh;
    min-height: 430px;
  }

  .current-defects-sidebar {
    max-height: none;
  }
}

@media (max-width: 600px) {
  .current-defects-page {
    padding: 15px 10px 35px;
  }

  .current-defects-heading,
  .current-defects-map-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .current-defects-map-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .current-defects-map-actions > .btn,
  .current-defects-options {
    flex: 1 1 145px;
  }

  .current-defects-options > summary {
    text-align: center;
  }

  .current-defects-total {
    width: 100%;
  }

  #current-defects-map {
    height: 52vh;
    min-height: 360px;
  }
}

@media (max-width: 800px) {
  .daily-check-grid {
    grid-template-columns: 1fr;
  }

  .daily-check-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}
