@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;700&display=swap');

:root {
  --bg: #f3efe5;
  --bg-accent: #dbeafe;
  --panel: rgba(255, 250, 243, 0.9);
  --panel-strong: rgba(255, 248, 238, 0.96);
  --panel-border: rgba(15, 23, 42, 0.08);
  --text: #0f172a;
  --muted: #475569;
  --primary: #0f766e;
  --primary-strong: #115e59;
  --secondary: #1d4ed8;
  --secondary-soft: rgba(37, 99, 235, 0.12);
  --danger: #b91c1c;
  --warning: #b45309;
  --success: #166534;
  --shadow: 0 28px 70px rgba(15, 23, 42, 0.14);
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

/* Composer overrides */
.btn {
  border-radius: 0;
  transition: none;
  box-shadow: none;
}

.btn:hover:not(:disabled) {
  transform: none;
}

.btn-primary {
  background: var(--primary);
  box-shadow: none;
}

.btn-secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid rgba(15, 23, 42, 0.14);
  box-shadow: none;
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(15, 23, 42, 0.14);
  box-shadow: none;
}

.map-toolbar {
  grid-template-columns: 1fr;
}

.map-fab {
  position: absolute;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 760;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.map-fab__btn {
  width: min(360px, 100%);
  min-height: 52px;
  pointer-events: auto;
}

.map-fab__btn.is-panel-open {
  opacity: 0;
  pointer-events: none;
}

.control-panel {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: auto;
  max-height: none;
  padding: 20px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.32);
  border: 0;
  box-shadow: none;
  backdrop-filter: blur(4px);
  transform: none;
  opacity: 0;
  pointer-events: none;
}

.control-panel.is-open {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}

.location-sheet,
.details-dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: min(84vh, 760px);
  overflow-y: auto;
  padding: 20px;
  border-radius: 0;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #fffdf8;
  box-shadow: none;
}

.location-sheet {
  transform: translateY(18px);
  opacity: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.control-panel.is-open .location-sheet {
  transform: translateY(0);
  opacity: 1;
}

.location-sheet::before,
.details-dialog::before {
  display: none;
}

.location-sheet__head,
.details-dialog__head {
  display: grid;
  gap: 6px;
  margin-bottom: 6px;
}

.composer-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.details-modal {
  position: fixed;
  inset: 0;
  z-index: 920;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(4px);
}

.details-modal[hidden] {
  display: none;
}

.details-modal__backdrop {
  position: absolute;
  inset: 0;
}

.details-dialog {
  z-index: 1;
}

.details-form {
  gap: 14px;
}

.field-static .static-field {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 13px 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  color: var(--text);
}

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

.photo-preview-card {
  display: grid;
  gap: 6px;
  margin: 0;
}

.photo-preview-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
}

.photo-preview-card figcaption,
.photo-preview-empty {
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

input[type="file"] {
  padding: 12px;
  border-radius: 0;
  background: #fff;
}

.panel-card,
.location-summary,
.report-card,
.map-search,
input,
select,
textarea,
.popup-photo img {
  border-radius: 0;
}

.map-search,
.map-toolbar__status,
.report-card {
  box-shadow: none;
}

@media (max-width: 720px) {
  .map-fab {
    right: 14px;
    bottom: 14px;
    left: 14px;
  }

  .control-panel,
  .details-modal {
    padding: 14px;
  }

  .location-sheet,
  .details-dialog {
    width: 100%;
    max-height: min(88vh, 760px);
    padding: 16px;
  }

  .composer-actions,
  .photo-preview-grid {
    grid-template-columns: 1fr;
  }

  .map-toolbar__status {
    top: 132px;
    right: 14px;
    left: 14px;
    width: auto;
  }
}

.btn {
  border-radius: 0;
  transition: none;
  box-shadow: none;
}

.btn:hover:not(:disabled) {
  transform: none;
}

.btn-primary {
  background: var(--primary);
  box-shadow: none;
}

.btn-secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid rgba(15, 23, 42, 0.14);
  box-shadow: none;
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(15, 23, 42, 0.14);
  box-shadow: none;
}

.map-toolbar {
  grid-template-columns: 1fr;
}

.map-fab {
  position: absolute;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 760;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.map-fab__btn {
  width: min(360px, 100%);
  min-height: 52px;
  pointer-events: auto;
}

.map-fab__btn.is-panel-open {
  opacity: 0;
  pointer-events: none;
}

.control-panel {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: auto;
  max-height: none;
  padding: 20px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.32);
  border: 0;
  box-shadow: none;
  backdrop-filter: blur(4px);
  transform: none;
  opacity: 0;
  pointer-events: none;
}

.control-panel.is-open {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}

.location-sheet,
.details-dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: min(84vh, 760px);
  overflow-y: auto;
  padding: 20px;
  border-radius: 0;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #fffdf8;
  box-shadow: none;
}

.location-sheet {
  transform: translateY(18px);
  opacity: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.control-panel.is-open .location-sheet {
  transform: translateY(0);
  opacity: 1;
}

.location-sheet::before,
.details-dialog::before {
  display: none;
}

.location-sheet__head,
.details-dialog__head {
  display: grid;
  gap: 6px;
  margin-bottom: 6px;
}

.composer-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.details-modal {
  position: fixed;
  inset: 0;
  z-index: 920;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(4px);
}

.details-modal[hidden] {
  display: none;
}

.details-modal__backdrop {
  position: absolute;
  inset: 0;
}

.details-dialog {
  z-index: 1;
}

.details-form {
  gap: 14px;
}

.field-static .static-field {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 13px 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  color: var(--text);
}

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

.photo-preview-card {
  display: grid;
  gap: 6px;
  margin: 0;
}

.photo-preview-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
}

.photo-preview-card figcaption,
.photo-preview-empty {
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

input[type="file"] {
  padding: 12px;
  border-radius: 0;
  background: #fff;
}

.panel-card,
.location-summary,
.report-card,
.map-search,
input,
select,
textarea,
.popup-photo img {
  border-radius: 0;
}

.map-search,
.map-toolbar__status,
.report-card {
  box-shadow: none;
}

@media (max-width: 720px) {
  .map-fab {
    right: 14px;
    bottom: 14px;
    left: 14px;
  }

  .control-panel,
  .details-modal {
    padding: 14px;
  }

  .location-sheet,
  .details-dialog {
    width: 100%;
    max-height: min(88vh, 760px);
    padding: 16px;
  }

  .composer-actions,
  .photo-preview-grid {
    grid-template-columns: 1fr;
  }

  .map-toolbar__status {
    top: 132px;
    right: 14px;
    left: 14px;
    width: auto;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.18), transparent 30%),
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.2), transparent 26%),
    linear-gradient(180deg, #f8f4ec 0%, #efe8dd 100%);
  color: var(--text);
  font-family: 'Manrope', 'Segoe UI', sans-serif;
}

body {
  min-height: 100vh;
}

.page-shell {
  position: relative;
  min-height: 100vh;
}

.control-panel {
  position: fixed;
  top: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: min(430px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 250, 243, 0.96) 0%, rgba(252, 245, 235, 0.88) 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0;
  backdrop-filter: blur(16px);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.2);
  transform: translateX(calc(100% + 28px));
  opacity: 0;
  pointer-events: none;
  transition: transform 0.22s ease, opacity 0.22s ease;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 23, 42, 0.28) transparent;
  touch-action: pan-y;
  container-type: inline-size;
}

.control-panel.is-open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.control-panel::-webkit-scrollbar {
  width: 12px;
}

.control-panel::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.28);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: padding-box;
}

.control-panel::-webkit-scrollbar-track {
  background: transparent;
}

.panel-card {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border: 1px solid var(--panel-border);
  border-radius: 22px;
  background: linear-gradient(180deg, var(--panel-strong) 0%, rgba(255, 251, 245, 0.88) 100%);
  box-shadow: var(--shadow);
}

.panel-card::before {
  content: '';
  position: absolute;
  inset: auto -40px 0 auto;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.14), transparent 68%);
  pointer-events: none;
}

.hero-card {
  background:
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.18), transparent 35%),
    linear-gradient(180deg, rgba(255, 250, 243, 0.98) 0%, rgba(255, 245, 232, 0.92) 100%);
}

.eyebrow,
.section-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--secondary);
}

.hero-card h1,
.control-panel__head h2,
.section-head h2 {
  margin: 0;
  font-family: 'Space Grotesk', 'Manrope', sans-serif;
  letter-spacing: -0.03em;
}

.control-panel__head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 4px 8px;
  margin-bottom: 2px;
  background: linear-gradient(180deg, rgba(255, 250, 243, 0.98) 0%, rgba(252, 245, 235, 0.92) 100%);
}

.control-panel__head h2 {
  font-size: clamp(18px, 2.4vw, 24px);
  line-height: 1.05;
}

.control-panel__close {
  min-height: 44px;
  white-space: nowrap;
}

.hero-card h1 {
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.05;
}

.hero-copy,
.section-head p,
.status-line,
.empty-state {
  color: var(--muted);
}

.hero-copy {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.6;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.stat-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.stat-card span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.stat-card strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
  line-height: 1;
}

.section-head {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.section-head p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}

.section-head h2 {
  font-size: clamp(18px, 2.4vw, 24px);
  line-height: 1.12;
}

.wizard-intro {
  display: grid;
  gap: 6px;
}

.wizard-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 6px;
}

.wizard-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  text-align: left;
}

.wizard-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  font-size: 11px;
  font-weight: 800;
  color: var(--text);
}

.wizard-step strong {
  font-size: 13px;
  line-height: 1.2;
  color: var(--text);
}

.wizard-step small {
  display: none;
}

.wizard-step.is-active {
  border-color: rgba(37, 99, 235, 0.24);
  background: rgba(219, 234, 254, 0.58);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.1);
}

.wizard-step.is-active span,
.wizard-step.is-complete span {
  background: var(--secondary);
  color: #fff;
}

.wizard-step.is-complete {
  border-color: rgba(15, 118, 110, 0.2);
  background: rgba(236, 253, 245, 0.82);
}

.wizard-step:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.wizard-form {
  margin-top: 8px;
}

.wizard-pane {
  display: grid;
  gap: 12px;
}

.wizard-pane[hidden] {
  display: none;
}

.wizard-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.wizard-actions--split,
.wizard-actions--submit {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.review-grid {
  display: grid;
  gap: 10px;
}

.review-copy {
  display: grid;
  gap: 6px;
}

.review-copy strong {
  font-size: 15px;
  line-height: 1.35;
}

.review-copy span {
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

.reports-card {
  padding: 0;
}

.reports-card[open] {
  padding: 0;
}

.reports-card__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.reports-card__summary::-webkit-details-marker {
  display: none;
}

.reports-card__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.reports-card[open] .reports-card__toggle {
  background: rgba(37, 99, 235, 0.12);
  color: var(--secondary);
}

.reports-card__body {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
  max-height: min(34vh, 300px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 23, 42, 0.22) transparent;
}

.reports-card__body::-webkit-scrollbar {
  width: 10px;
}

.reports-card__body::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.22);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.location-summary {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
}

.location-summary__label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary);
}

.location-summary strong {
  font-size: 15px;
  line-height: 1.3;
}

.location-summary span {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.search-row,
.button-row,
.field-row,
.coord-grid {
  display: grid;
  gap: 10px;
}

.search-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.button-row {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-top: 12px;
}

.location-actions {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

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

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

.field span {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.field-hint {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.field-hint small {
  margin: 0;
}

.field-hint--split {
  justify-content: space-between;
}

.field-hint strong {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.field-hint strong[data-tone="success"] {
  color: var(--success);
}

input,
select,
textarea,
.btn,
.report-card {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  padding: 13px 14px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

textarea {
  resize: vertical;
  min-height: 130px;
  line-height: 1.55;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 14px;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  color: #f8fafc;
  box-shadow: 0 14px 30px rgba(15, 118, 110, 0.22);
}

.btn-secondary {
  background: var(--secondary-soft);
  color: var(--secondary);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  border: 1px solid rgba(15, 23, 42, 0.1);
}

.status-line {
  min-height: 22px;
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.5;
}

.status-line[data-tone="success"] {
  color: var(--success);
}

.status-line[data-tone="error"] {
  color: var(--danger);
}

.status-line[data-tone="info"] {
  color: var(--secondary);
}

.report-form {
  display: grid;
  gap: 14px;
  scroll-margin-top: 18px;
}

.advanced-fields {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.6);
}

.advanced-fields summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 800;
  color: var(--secondary);
}

.advanced-fields summary::-webkit-details-marker {
  display: none;
}

.advanced-fields summary::after {
  content: '+';
  float: right;
  color: var(--text);
}

.advanced-fields[open] summary::after {
  content: '-';
}

.advanced-fields__body {
  display: grid;
  gap: 14px;
  padding: 0 16px 16px;
}

.meta-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.meta-card,
.history-panel {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.68);
}

.meta-card span,
.history-panel__head span,
.history-item strong {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.meta-card strong {
  display: block;
  margin-top: 6px;
  font-family: 'Space Grotesk', 'Manrope', sans-serif;
  font-size: 20px;
  line-height: 1.15;
}

.history-panel {
  display: grid;
  gap: 12px;
}

.history-panel__head strong {
  font-size: 13px;
  color: var(--text);
}

.history-list {
  display: grid;
  gap: 10px;
}

.history-item {
  padding-left: 14px;
  border-left: 3px solid rgba(37, 99, 235, 0.2);
}

.history-item span,
.history-empty {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

.list-card {
  flex: 1;
  min-height: 280px;
}

.report-list {
  display: grid;
  gap: 10px;
}

.report-card {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.report-card:hover,
.report-card.is-active {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
}

.report-card strong {
  font-size: 15px;
  line-height: 1.35;
}

.report-card span {
  font-size: 12px;
  color: var(--muted);
}

.report-card__priority {
  display: inline-flex;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.report-card[data-priority="ridicata"] .report-card__priority {
  background: rgba(239, 68, 68, 0.14);
  color: #b91c1c;
}

.report-card[data-priority="medie"] .report-card__priority {
  background: rgba(245, 158, 11, 0.18);
  color: #92400e;
}

.report-card[data-priority="scazuta"] .report-card__priority {
  background: rgba(34, 197, 94, 0.14);
  color: #166534;
}

.empty-state {
  padding: 22px;
  border: 1px dashed rgba(15, 23, 42, 0.15);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.5);
  text-align: center;
}

.map-stage {
  position: relative;
  min-height: 100vh;
  height: 100vh;
}

#map {
  width: 100%;
  height: 100vh;
}

.map-toolbar {
  position: absolute;
  z-index: 750;
  top: 22px;
  left: 22px;
  right: 22px;
  display: grid;
  grid-template-columns: minmax(320px, 460px) auto;
  align-items: start;
  gap: 10px;
}

.map-search {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  min-width: 0;
  width: 100%;
  max-width: 460px;
  padding: 10px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 250, 243, 0.88);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.16);
}

.map-search input {
  min-height: 52px;
  background: rgba(255, 255, 255, 0.92);
}

.map-search__btn {
  min-width: 140px;
}

.map-toolbar__btn {
  justify-self: end;
  min-width: 210px;
  padding: 0 20px;
  box-shadow: 0 18px 36px rgba(15, 118, 110, 0.28);
}

.map-toolbar__btn.is-panel-open {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
}

.map-toolbar__status {
  position: absolute;
  top: 96px;
  left: 22px;
  z-index: 740;
  width: min(460px, calc(100vw - 44px));
  min-height: 22px;
  margin: 0;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.66);
  color: rgba(248, 250, 252, 0.9);
  backdrop-filter: blur(12px);
  font-size: 13px;
  line-height: 1.45;
}

.map-toolbar__status:empty {
  display: none;
}

.map-toolbar__status[data-tone="success"] {
  color: #bbf7d0;
}

.map-toolbar__status[data-tone="error"] {
  color: #fecaca;
}

.map-toolbar__status[data-tone="info"] {
  color: #bfdbfe;
}

.form-actions {
  position: static;
  padding-top: 4px;
  background: none;
}

@container (max-width: 430px) {
  .control-panel__head {
    gap: 10px;
    padding: 0;
  }

  .control-panel__head h2 {
    font-size: 16px;
  }

  .control-panel__close {
    min-height: 40px;
    padding-inline: 12px;
  }

  .hero-card {
    padding: 14px;
  }

  .hero-card h1 {
    font-size: 18px;
    line-height: 1.1;
  }

  .hero-copy,
  .section-head p,
  .status-line {
    font-size: 12px;
  }

  .section-head {
    gap: 6px;
    margin-bottom: 12px;
  }

  .section-head h2 {
    font-size: 16px;
  }

  .stats-grid,
  .search-row,
  .button-row,
  .location-actions,
  .meta-preview,
  .field-row,
  .coord-grid {
    grid-template-columns: 1fr;
  }

  .stat-card strong,
  .meta-card strong {
    font-size: 18px;
  }

  .btn {
    min-height: 42px;
    font-size: 14px;
  }

  .panel-card {
    padding: 14px;
    border-radius: 20px;
  }

  .report-form {
    gap: 12px;
  }

  .wizard-step {
    padding: 10px 12px;
  }

  .wizard-actions--split,
  .wizard-actions--submit {
    grid-template-columns: 1fr;
  }

  .history-panel,
  .meta-card,
  .advanced-fields {
    border-radius: 16px;
  }
}

.leaflet-container {
  background: linear-gradient(180deg, rgba(186, 230, 253, 0.72) 0%, rgba(253, 240, 215, 0.82) 100%);
}

.leaflet-container.placing-pin {
  cursor: crosshair;
}

.leaflet-control-zoom a {
  border-radius: 12px;
  border: 0;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.16);
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: rgba(255, 250, 243, 0.96);
  color: var(--text);
}

.popup-content {
  display: grid;
  gap: 10px;
  line-height: 1.55;
}

.popup-content--report {
  min-width: 280px;
}

.popup-field {
  display: grid;
  gap: 4px;
}

.popup-field__label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary);
}

.popup-field__value {
  font-size: 13px;
  color: var(--text);
}

.popup-field__value strong {
  display: block;
  font-size: 15px;
  line-height: 1.35;
}

.popup-empty {
  font-size: 12px;
  color: var(--muted);
}

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

.popup-photo {
  display: grid;
  gap: 6px;
  text-decoration: none;
  color: inherit;
}

.popup-photo img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(15, 23, 42, 0.04);
}

.popup-photo span {
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}

.pin-icon-wrapper {
  background: transparent;
  border: 0;
}

.map-pin {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 50% 50% 50% 0;
  background: var(--pin-color);
  border: 3px solid #fff;
  transform: rotate(-45deg);
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.22);
}

.map-pin::before {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
}

.map-pin.is-draft {
  width: 28px;
  height: 28px;
  box-shadow: 0 0 0 10px rgba(15, 118, 110, 0.12), 0 18px 30px rgba(15, 23, 42, 0.24);
}

.map-pin.is-report {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  transform: none;
  box-shadow: none;
}

.map-pin.is-report::before {
  display: none;
}

.report-marker {
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 124px;
}

.report-marker .map-pin.is-report {
  flex: 0 0 auto;
}

.report-marker__label {
  display: block;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: center;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 700;
  color: #102033;
  padding: 2px 4px 0;
}

.report-cluster-wrapper {
  background: transparent;
  border: 0;
}

.report-cluster-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--cluster-size);
  height: var(--cluster-size);
  border-radius: 999px;
  background: var(--cluster-color);
  border: 3px solid #fff;
  box-shadow: none;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

@media (max-width: 1100px) {
  .control-panel {
    width: min(400px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    top: 16px;
    right: 16px;
    bottom: 16px;
  }
}

@media (max-width: 720px) {
  .control-panel {
    top: auto;
    right: 14px;
    bottom: 14px;
    left: 14px;
    width: auto;
    max-height: min(88vh, 780px);
    padding: 16px;
    gap: 14px;
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    transform: translateY(calc(100% + 20px));
  }

  .control-panel.is-open {
    transform: translateY(0);
  }

  .control-panel__head {
    padding-bottom: 4px;
    z-index: 3;
  }

  .panel-card {
    padding: 16px;
    border-radius: 20px;
  }

  .report-form {
    gap: 16px;
  }

  .reports-card__body {
    max-height: min(30vh, 240px);
  }

  textarea {
    min-height: 160px;
    font-size: 16px;
  }

  .map-toolbar {
    top: 14px;
    left: 14px;
    right: 14px;
    grid-template-columns: 1fr;
  }

  .map-search {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .map-search__btn,
  .map-toolbar__btn {
    width: 100%;
    min-width: 0;
  }

  .map-toolbar__status {
    top: 196px;
    right: 14px;
    left: 14px;
    width: auto;
  }

  .map-toolbar__btn {
    justify-self: stretch;
  }

  .search-row,
  .button-row,
  .meta-preview,
  .field-row,
  .coord-grid {
    grid-template-columns: 1fr;
  }

  .form-actions {
    margin: 0;
    padding: 0;
  }

}

/* Final report composer overrides */
.map-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 760;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.map-fab__btn {
  width: min(420px, 100%);
  min-height: 52px;
  pointer-events: auto;
}

.map-fab__btn.is-panel-open {
  opacity: 0;
  pointer-events: none;
}

.map-center-pin {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 640;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 34px;
  height: 46px;
  pointer-events: none;
  transform: translate(-50%, -100%);
  opacity: 1;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.map-center-pin.is-moving {
  transform: translate(-50%, calc(-100% - 10px));
}

.map-center-pin .map-pin {
  width: 30px;
  height: 30px;
  background: var(--primary);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.24);
}

.map-center-pin__shadow {
  position: absolute;
  bottom: -8px;
  left: 50%;
  width: 18px;
  height: 8px;
  background: rgba(15, 23, 42, 0.24);
  border-radius: 999px;
  transform: translateX(-50%);
  filter: blur(4px);
}

.map-stage.is-center-picker-active .map-center-pin .map-pin {
  box-shadow: 0 0 0 10px rgba(15, 118, 110, 0.1), 0 12px 24px rgba(15, 23, 42, 0.24);
}

.control-panel,
.details-modal {
  position: fixed;
  inset: 0;
  width: auto;
  max-height: none;
  padding: 16px;
  background: rgba(15, 23, 42, 0.28);
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.control-panel {
  z-index: 900;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  transform: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.control-panel.is-open {
  transform: none;
  opacity: 1;
  pointer-events: none;
}

.details-modal {
  z-index: 920;
  display: grid;
  place-items: center;
}

.details-modal__backdrop {
  position: absolute;
  inset: 0;
}

.location-sheet,
.details-dialog {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  max-height: min(84vh, 760px);
  overflow-y: auto;
  padding: 20px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 0;
  background: #fffdf8;
  box-shadow: none;
  pointer-events: auto;
}

.location-sheet {
  transform: translateY(18px);
  opacity: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.control-panel.is-open .location-sheet {
  transform: translateY(0);
  opacity: 1;
}

.details-form {
  gap: 14px;
}

.location-sheet__head,
.details-dialog__head {
  display: grid;
  gap: 6px;
  margin-bottom: 6px;
}

.panel-card,
.panel-card::before,
.location-sheet::before,
.details-dialog::before {
  box-shadow: none;
}

.panel-card {
  border-radius: 0;
  background: #fffdf8;
}

.panel-card::before,
.location-sheet::before,
.details-dialog::before {
  display: none;
}

.location-summary,
.map-search,
.map-toolbar__status,
.report-card,
.reports-card,
.reports-card__toggle,
.field-static .static-field,
input,
select,
textarea,
input[type="file"],
.photo-preview-card img,
.popup-photo img,
.btn {
  border-radius: 0;
  box-shadow: none;
}

input,
select,
textarea,
input[type="file"],
.field-static .static-field {
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #fff;
  transform: none;
  transition: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(15, 23, 42, 0.38);
  box-shadow: none;
  transform: none;
}

.btn {
  min-height: 48px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  transition: none;
  filter: none;
}

.btn:hover:not(:disabled),
.btn:focus-visible,
.btn:active {
  transform: none;
  box-shadow: none;
  filter: none;
  outline: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-secondary,
.btn-ghost {
  background: #fff;
  color: var(--text);
  border-color: rgba(15, 23, 42, 0.14);
}

.composer-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

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

.photo-preview-card {
  display: grid;
  gap: 6px;
  margin: 0;
}

.photo-preview-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #fff;
}

@media (max-width: 720px) {
  .map-fab,
  .control-panel,
  .details-modal {
    padding: 14px;
  }

  .location-sheet,
  .details-dialog {
    width: 100%;
    max-height: min(88vh, 760px);
    padding: 16px;
  }

  .composer-actions,
  .photo-preview-grid {
    grid-template-columns: 1fr;
  }

  .map-toolbar__status {
    top: 132px;
    right: 14px;
    left: 14px;
    width: auto;
  }
}

/* Compact location sheet overrides */
.map-center-pin {
  opacity: 0;
  transform: translate(-50%, -100%) scale(0.92);
}

.map-center-pin[hidden] {
  display: none;
}

.map-center-pin.is-active {
  opacity: 1;
  transform: translate(-50%, -100%) scale(1);
}

.map-center-pin.is-active.is-moving {
  transform: translate(-50%, calc(-100% - 10px)) scale(1.03);
}

.control-panel {
  flex-direction: row;
  gap: 0;
  width: 100%;
  align-items: flex-end;
  justify-content: center;
  padding-top: 0;
  padding-bottom: 24px;
  background: transparent;
}

.location-sheet--compact {
  width: min(640px, calc(100vw - 24px));
  max-height: none;
  padding: 18px;
  border-radius: 0;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.98);
  margin: 0 auto;
}

.location-picker {
  display: grid;
  gap: 14px;
}

.location-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  text-align: left;
}

.location-option__indicator {
  position: relative;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border: 2px solid rgba(15, 23, 42, 0.36);
  border-radius: 999px;
  background: #fff;
}

.location-option.is-selected .location-option__indicator {
  border-color: #2563eb;
}

.location-option.is-selected .location-option__indicator::after {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 999px;
  background: #2563eb;
}

.location-option__fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 12px;
  flex: 1;
}

#streetQuery,
#streetNumberInput {
  min-height: 52px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 16px;
}

#streetNumberInput {
  text-align: center;
}

.location-option--empty {
  justify-content: flex-start;
}

.location-option__label {
  font-size: 16px;
  line-height: 1.3;
}

.location-picker__meta,
.location-picker__status,
.location-picker__helpers {
  padding-left: 44px;
}

.location-picker__meta[hidden],
.location-picker__status[hidden] {
  display: none;
}

.location-picker__meta {
  display: grid;
  gap: 4px;
}

.location-picker__meta span {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.location-picker__status {
  display: grid;
  gap: 4px;
}

.location-picker__status .status-line {
  min-height: 18px;
  margin: 0;
  font-size: 12px;
}

.location-picker__helpers {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.location-helper-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--secondary);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.composer-actions--location {
  grid-template-columns: repeat(2, minmax(140px, auto));
  justify-content: end;
  margin-top: 2px;
}

@media (max-width: 720px) {
  .control-panel {
    flex-direction: row;
    gap: 0;
    padding-top: 0;
    padding-bottom: 14px;
  }

  .location-sheet--compact {
    width: min(100%, calc(100vw - 20px));
    padding: 16px;
    border-radius: 0;
  }

  .location-option__fields {
    grid-template-columns: minmax(0, 1fr) 54px;
    gap: 10px;
  }

  .location-picker__meta,
  .location-picker__status,
  .location-picker__helpers {
    padding-left: 0;
  }

  .composer-actions--location {
    grid-template-columns: 1fr 1fr;
  }
}

/* Smaller popup sizing */
.location-sheet--compact {
  width: min(560px, calc(100vw - 24px));
  padding: 14px;
}

.location-picker {
  gap: 10px;
}

.location-option__fields {
  grid-template-columns: minmax(0, 1fr) 50px;
  gap: 10px;
}

#streetQuery,
#streetNumberInput {
  min-height: 46px;
  padding: 0 12px;
  font-size: 15px;
}

.details-dialog {
  width: min(520px, calc(100vw - 24px));
  max-height: min(82vh, 640px);
  padding: 14px;
}

.details-form {
  gap: 10px;
}

.details-dialog__head {
  margin-bottom: 2px;
}

.field {
  gap: 6px;
}

.field span {
  font-size: 11px;
}

.field-static .static-field,
input,
select,
textarea,
input[type="file"] {
  padding: 10px 12px;
}

textarea {
  min-height: 96px;
}

.field-hint {
  gap: 8px;
  font-size: 11px;
}

.btn {
  min-height: 42px;
}

.composer-actions,
.composer-actions--location {
  gap: 10px;
}

.photo-preview-grid {
  gap: 8px;
}

.photo-preview-card img {
  aspect-ratio: 4 / 3;
  max-height: 96px;
}

.photo-preview-empty {
  font-size: 11px;
}

@media (max-width: 720px) {
  .location-sheet--compact,
  .details-dialog {
    width: min(100%, calc(100vw - 20px));
    padding: 12px;
  }

  .location-option__fields {
    grid-template-columns: minmax(0, 1fr) 48px;
    gap: 8px;
  }

  #streetQuery,
  #streetNumberInput {
    min-height: 42px;
    font-size: 14px;
  }

  .details-form {
    gap: 8px;
  }

  textarea {
    min-height: 88px;
  }

  .photo-preview-card img {
    max-height: 84px;
  }
}

/* Bottom-center location panel */
.map-fab {
  left: 0;
  right: 0;
  bottom: 24px;
  padding: 0 16px;
  justify-content: center;
  z-index: 910;
}

.map-fab__btn {
  width: min(560px, calc(100vw - 32px));
}

.control-panel {
  position: fixed;
  top: auto;
  right: 0;
  bottom: 24px;
  left: 0;
  width: 100%;
  padding: 0 16px;
  display: none !important;
  flex-direction: row;
  align-items: flex-end;
  justify-content: center;
  background: transparent;
  opacity: 1;
  pointer-events: none;
  overflow: visible;
  z-index: 900;
}

.control-panel.is-open {
  display: flex !important;
  pointer-events: none;
}

.location-sheet--compact {
  width: min(560px, calc(100vw - 32px));
  margin: 0 auto;
  pointer-events: auto;
}

@media (max-width: 720px) {
  .map-fab {
    bottom: 14px;
    padding: 0 10px;
  }

  .map-fab__btn,
  .location-sheet--compact {
    width: min(100%, calc(100vw - 20px));
  }

  .control-panel {
    bottom: 14px;
    padding: 0 10px;
  }
}

/* Report view modal */
.report-view-modal {
  position: fixed;
  inset: 0;
  z-index: 940;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.42);
}

.report-view-modal[hidden] {
  display: none;
}

.report-view-modal__backdrop {
  position: absolute;
  inset: 0;
}

.report-view-dialog {
  position: relative;
  z-index: 1;
  width: min(1080px, calc(100vw - 48px));
  max-height: min(86vh, 820px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid rgba(15, 23, 42, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 248, 238, 0.96) 0, rgba(255, 255, 255, 0.98) 160px),
    #fff;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

.report-view-dialog::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--primary) 0%, #8ab8b4 55%, rgba(255, 255, 255, 0) 100%);
}

.report-view-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 78px;
  padding: 18px 24px 16px;
  background: transparent;
  color: var(--text);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.report-view-dialog__header strong {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  background: var(--primary);
  color: #fff;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.report-view-dialog__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.16);
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
  font: inherit;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  border-radius: 0;
  box-shadow: none;
}

.report-view-dialog__close:hover,
.report-view-dialog__close:focus-visible,
.report-view-dialog__close:active {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  outline: none;
  box-shadow: none;
  transform: none;
}

.report-view-dialog__body {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  padding: 28px 24px 24px;
  overflow: auto;
}

.report-view-dialog__main,
.report-view-sidebar {
  min-width: 0;
}

.report-view-dialog__main {
  display: grid;
  align-content: start;
  gap: 28px;
}

.report-view-sidebar {
  display: grid;
  align-content: start;
  gap: 18px;
}

.report-view-section {
  display: grid;
  gap: 14px;
}

.report-view-dialog__main .report-view-section:first-child {
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.report-view-section h3,
.report-view-card h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}

.report-view-dialog__title {
  margin: 0;
  max-width: 820px;
  font-size: 31px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #102033;
}

.report-view-dialog__description {
  max-width: 760px;
  font-size: 16px;
  line-height: 1.8;
  color: #314155;
}

.report-view-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.report-view-photo {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.72);
}

.report-view-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #fff;
  border-radius: 0;
  box-shadow: none;
}

.report-view-photo figcaption {
  font-size: 12px;
  line-height: 1.45;
  color: #5f6f80;
}

.report-view-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: rgba(247, 241, 232, 0.88);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-left: 4px solid var(--primary);
  border-radius: 0;
  box-shadow: none;
}

.report-view-card__actions {
  display: grid;
  gap: 10px;
  padding-top: 6px;
}

.report-view-meta {
  display: grid;
  gap: 12px;
  margin: 0;
}

.report-view-meta div {
  display: grid;
  gap: 5px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.report-view-meta div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.report-view-meta dt {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6a7a8c;
}

.report-view-meta dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: #1d2a3a;
}

.report-view-status {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  background: rgba(15, 118, 110, 0.12);
  color: var(--primary);
  font-weight: 800;
  border-radius: 0;
}

.report-view-status[data-status="noua"] {
  border-color: rgba(15, 118, 110, 0.22);
  background: rgba(15, 118, 110, 0.12);
  color: var(--primary);
}

.report-view-status[data-status="in lucru"] {
  border-color: rgba(180, 83, 9, 0.22);
  background: rgba(245, 158, 11, 0.14);
  color: #9a4d07;
}

.report-view-status[data-status="rezolvata"] {
  border-color: rgba(22, 101, 52, 0.2);
  background: rgba(34, 197, 94, 0.12);
  color: #166534;
}

.report-view-earth-btn {
  width: 100%;
  min-height: 44px;
  justify-content: center;
  border-color: rgba(15, 118, 110, 0.26);
  background: rgba(15, 118, 110, 0.08);
  color: var(--primary);
  text-decoration: none;
}

.report-view-earth-btn:hover,
.report-view-earth-btn:focus-visible,
.report-view-earth-btn:active {
  border-color: rgba(15, 118, 110, 0.26);
  background: rgba(15, 118, 110, 0.08);
  color: var(--primary);
  text-decoration: none;
}

.report-view-history {
  display: grid;
  gap: 12px;
}

.report-view-history__item {
  position: relative;
  display: grid;
  gap: 5px;
  padding: 0 0 0 18px;
}

.report-view-history__item::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 0;
  width: 9px;
  height: 9px;
  background: var(--primary);
}

.report-view-history__item strong {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.report-view-history__item span {
  font-size: 14px;
  line-height: 1.55;
  color: #1d2a3a;
}

.report-view-empty {
  font-size: 14px;
  line-height: 1.5;
  color: #64748b;
}

@media (max-width: 900px) {
  .report-view-dialog {
    width: min(100%, calc(100vw - 24px));
  }

  .report-view-dialog__body {
    grid-template-columns: 1fr;
  }

  .report-view-gallery {
    grid-template-columns: 1fr;
  }

  .report-view-dialog__title {
    font-size: 25px;
  }
}

@media (max-width: 640px) {
  .report-view-modal {
    padding: 12px;
  }

  .report-view-dialog {
    width: min(100%, calc(100vw - 24px));
    max-height: min(90vh, 860px);
  }

  .report-view-dialog__header {
    min-height: 62px;
    padding: 14px 16px;
  }

  .report-view-dialog__header strong {
    min-height: 38px;
    padding: 0 12px;
    font-size: 15px;
  }

  .report-view-dialog__body {
    gap: 18px;
    padding: 16px;
  }

  .report-view-dialog__title {
    font-size: 21px;
    line-height: 1.2;
  }

  .report-view-dialog__description,
  .report-view-meta dd,
  .report-view-history__item span,
  .report-view-empty {
    font-size: 14px;
  }
}

/* Ensure all modals are truly hidden when [hidden] attribute is set.
   Author-defined display values override the UA stylesheet, so [hidden] alone
   is not enough without an explicit rule in the author stylesheet. */
.details-modal[hidden],
.report-view-modal[hidden],
.rfid-modal[hidden] {
  display: none !important;
  pointer-events: none !important;
}

/* RFID Modal Styles */
.rfid-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease-out;
}

.rfid-modal.is-open {
  pointer-events: none;
  opacity: 1;
}

.rfid-modal__backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  pointer-events: none;
}

.rfid-dialog {
  position: relative;
  z-index: 10001;
  pointer-events: auto;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--panel-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.rfid-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 32px 24px;
  border-bottom: 1px solid var(--panel-border);
}

.rfid-dialog__head > div {
  flex: 1;
}

.rfid-dialog__head .section-kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 4px;
}

.rfid-dialog__head h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  margin: 0;
}

.rfid-dialog__content {
  padding: 24px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (max-width: 640px) {
  .rfid-modal {
    padding: 12px;
  }

  .rfid-dialog {
    width: min(100%, calc(100vw - 24px));
    max-height: min(90vh, 860px);
  }

  .rfid-dialog__head {
    min-height: 62px;
    padding: 14px 16px;
  }

  .rfid-dialog__head h2 {
    font-size: 20px;
  }

  .rfid-dialog__content {
    padding: 16px;
    gap: 16px;
  }
}
