:root {
  --bg: #f5efe6;
  --panel: rgba(255, 252, 247, 0.96);
  --line: #ddd0c1;
  --text: #20262c;
  --muted: #64717a;
  --brand: #7b1e1e;
  --brand-strong: #541010;
  --accent: #c43b2f;
  --shadow: 0 18px 50px rgba(84, 16, 16, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(196, 59, 47, 0.15), transparent 26%),
    linear-gradient(180deg, #fffbf7 0%, var(--bg) 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 9999;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.55), rgba(196, 59, 47, 0.18) 42%, rgba(123, 30, 30, 0.42) 100%);
  transition: opacity 0.12s ease;
}

body.alert-flash::after {
  animation: alertFlashPulse 0.9s ease-in-out 1;
}

@keyframes alertFlashPulse {
  0% { opacity: 0; }
  12% { opacity: 0.92; }
  28% { opacity: 0.15; }
  42% { opacity: 0.88; }
  58% { opacity: 0.18; }
  72% { opacity: 0.78; }
  100% { opacity: 0; }
}

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

.hidden,
[hidden] {
  display: none !important;
}

body.app-locked #loginPanel {
  display: block;
}

body.app-locked #contentPanel {
  display: none;
}

body:not(.app-locked) #loginPanel {
  display: none;
}

body:not(.app-locked) #contentPanel {
  display: grid;
}

.app-shell {
  width: min(1040px, calc(100% - 24px));
  margin: 0 auto;
  padding: 24px 0 40px;
  overflow-x: clip;
}

.content-panel {
  gap: 18px;
  min-width: 0;
}

.panel {
  padding: 22px;
  border: 1px solid rgba(221, 208, 193, 0.86);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
  min-width: 0;
  overflow-x: clip;
}

.login-panel {
  width: min(540px, 100%);
  margin: 4vh auto 0;
}

.eyebrow {
  margin: 0;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-title,
.section-title {
  margin: 10px 0 0;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 2.7rem);
}

.hero-copy {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.hero-note {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(123, 30, 30, 0.07);
  color: var(--brand-strong);
}

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

.quake-ticker {
  margin-top: 14px;
  overflow: hidden;
  border-top: 1px solid rgba(123, 30, 30, 0.12);
  border-bottom: 1px solid rgba(123, 30, 30, 0.12);
  background: rgba(123, 30, 30, 0.05);
  border-radius: 14px;
}

.quake-ticker-track {
  display: inline-block;
  min-width: 100%;
  padding: 10px 0;
  white-space: nowrap;
  color: var(--brand-strong);
  font-weight: 700;
  font-size: 0.95rem;
  animation: quakeTickerMarquee 72s linear infinite;
}

@keyframes quakeTickerMarquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

.connection-banner {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(123, 30, 30, 0.12);
  background: rgba(123, 30, 30, 0.06);
  color: var(--brand-strong);
  font-weight: 700;
}

.connection-banner.online {
  border-color: rgba(22, 101, 52, 0.16);
  background: rgba(22, 101, 52, 0.08);
  color: #166534;
}

.connection-banner.warning {
  border-color: rgba(194, 65, 12, 0.22);
  background: #fff1e7;
  color: #9a3412;
}

.connection-banner.offline {
  border-color: rgba(196, 59, 47, 0.24);
  background: #fef2f2;
  color: #991b1b;
}

.map-panel {
  overflow: hidden;
}

.map-panel .section-head {
  align-items: center;
}

.operation-map {
  width: 100%;
  height: 360px;
  border-radius: 20px;
  border: 1px solid rgba(123, 30, 30, 0.12);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(221, 235, 249, 0.8), rgba(238, 244, 251, 0.95));
}

.map-quick-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  min-width: 0;
}

.tracker-summary {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  min-width: 0;
}

.tracker-summary-head {
  margin: 0;
  color: var(--brand-strong);
  font-weight: 700;
}

.tracker-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.tracker-card {
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(29, 78, 216, 0.14);
  background: rgba(29, 78, 216, 0.05);
}

.tracker-card-fire {
  border-color: rgba(194, 65, 12, 0.18);
  background: #ffedd5;
}

.tracker-card-quake {
  border-color: rgba(124, 58, 237, 0.18);
  background: #ede9fe;
}

.tracker-card-traffic {
  border-color: rgba(29, 78, 216, 0.18);
  background: #dbeafe;
}

.tracker-card-forest {
  border-color: rgba(22, 101, 52, 0.18);
  background: #dcfce7;
}

.tracker-card-flood {
  border-color: rgba(3, 105, 161, 0.18);
  background: #e0f2fe;
}

.tracker-card-missing {
  border-color: rgba(161, 98, 7, 0.18);
  background: #fef3c7;
}

.tracker-card-default {
  border-color: rgba(123, 30, 30, 0.16);
  background: #f5e7df;
}

.tracker-card-title {
  margin: 0 0 8px;
  font-weight: 700;
  color: #1d4ed8;
  font-size: 1.08rem;
  line-height: 1.35;
}

.tracker-card-member {
  margin: 0 0 6px;
  color: var(--brand-strong);
  font-weight: 700;
  font-size: 0.95rem;
}

.tracker-card-text {
  margin: 0 0 4px;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.92rem;
}

.tracker-card-text strong {
  color: var(--brand-strong);
}

.tracker-marker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

.tracker-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 999px;
  background: #1d4ed8;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  border: 2px solid #fff;
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.25);
}

.tracker-label {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(15, 23, 42, 0.12);
  color: #1f2937;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tracker-pin-fire,
.operation-pin-fire {
  background: #c2410c;
}

.tracker-pin-quake,
.operation-pin-quake {
  background: #7c3aed;
}

.tracker-pin-traffic,
.operation-pin-traffic {
  background: #1d4ed8;
}

.tracker-pin-forest,
.operation-pin-forest {
  background: #166534;
}

.tracker-pin-flood,
.operation-pin-flood {
  background: #0369a1;
}

.tracker-pin-missing,
.operation-pin-missing {
  background: #a16207;
}

.tracker-pin-default,
.operation-pin-default {
  background: #7b1e1e;
}

.operation-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  border: 2px solid #fff;
  box-shadow: 0 4px 14px rgba(84, 16, 16, 0.25);
}

.map-quick-actions-head {
  margin: 0;
  color: var(--brand-strong);
  font-weight: 700;
}

.map-quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.map-quick-action-card {
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(123, 30, 30, 0.1);
  background: rgba(123, 30, 30, 0.04);
}

.map-quick-action-card-fire {
  border-color: rgba(194, 65, 12, 0.26);
  background: #fff1e7;
}

.map-quick-action-card-quake {
  border-color: rgba(124, 58, 237, 0.24);
  background: #f3efff;
}

.map-quick-action-card-traffic {
  border-color: rgba(29, 78, 216, 0.24);
  background: #edf4ff;
}

.map-quick-action-card-forest {
  border-color: rgba(22, 101, 52, 0.24);
  background: #ecfbef;
}

.map-quick-action-card-flood {
  border-color: rgba(3, 105, 161, 0.24);
  background: #edf9ff;
}

.map-quick-action-card-missing {
  border-color: rgba(161, 98, 7, 0.24);
  background: #fff8e2;
}

.map-quick-action-title {
  margin: 0 0 6px;
  font-weight: 700;
  color: var(--brand-strong);
}

.map-quick-action-text {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.map-quick-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.map-mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 0;
  text-decoration: none;
  cursor: pointer;
  background: rgba(123, 30, 30, 0.08);
  color: var(--brand-strong);
  font-weight: 700;
}

.compact-report-meta .field span {
  font-size: 0.9rem;
}

.compact-report-meta .input {
  min-height: 42px;
  padding: 10px 13px;
}

.compact-meta-field {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px 12px;
}

.compact-meta-field span {
  margin: 0;
  white-space: nowrap;
}

.auth-stack,
.guest-panel,
.form-grid {
  display: grid;
  gap: 12px;
}

.auth-stack {
  margin-top: 20px;
}

.guest-toggle-row {
  margin-top: 14px;
}

.guest-panel {
  margin-top: 12px;
}

.input {
  width: 100%;
  min-height: 48px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--text);
}

.textarea {
  resize: vertical;
  min-height: 92px;
}

.voice-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.voice-button {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 12px;
}

.input:focus {
  outline: 2px solid rgba(196, 59, 47, 0.18);
  border-color: rgba(196, 59, 47, 0.4);
}

.primary-button,
.ghost-button,
.danger-button,
.map-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 16px;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  text-decoration: none;
}

.primary-button {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.ghost-button {
  background: rgba(123, 30, 30, 0.08);
  color: var(--brand-strong);
  font-weight: 700;
}

.danger-button {
  background: #b91c1c;
  color: #fff;
  font-weight: 700;
}

.map-button {
  background: var(--brand);
  color: #fff;
  font-weight: 700;
}

.helper-text {
  margin: 12px 0 0;
  color: var(--muted);
}

#apiBaseHelp {
  margin-top: 10px;
  line-height: 1.5;
}

.hero-row,
.section-head,
.admin-row,
.admin-left,
.operation-head,
.operation-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.operation-head-right {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-row,
.section-head,
.admin-row {
  flex-wrap: wrap;
}

.session-card {
  min-width: 140px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(123, 30, 30, 0.06), rgba(123, 30, 30, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
}

.mode-badge,
.soft-badge,
.call-badge,
.status-badge,
.meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  font-weight: 700;
}

.mode-badge,
.soft-badge,
.meta-chip {
  background: rgba(123, 30, 30, 0.08);
  color: var(--brand-strong);
}

.live-track-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  font-weight: 800;
  background: #dbeafe;
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px rgba(29, 78, 216, 0.18);
}

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

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

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

.field-full,
.form-actions {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  gap: 12px;
}

.status-summary,
.photo-preview-grid,
.quake-list,
.operation-list {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.status-summary {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-bottom: 18px;
}

.summary-card,
.quake-card,
.operation-card {
  border-radius: 20px;
  border: 1px solid rgba(123, 30, 30, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 246, 241, 0.98));
}

.summary-card {
  padding: 14px 16px;
}

.summary-card span {
  display: block;
  color: var(--muted);
  margin-bottom: 6px;
}

.summary-card strong {
  color: var(--brand-strong);
  font-size: 1.3rem;
}

.quake-card {
  padding: 16px;
}

.quake-magnitude {
  display: inline-flex;
  margin-bottom: 10px;
  background: var(--brand);
  color: #fff;
}

.quake-card p {
  margin: 7px 0 0;
}

.quake-card a {
  display: inline-flex;
  margin-top: 10px;
  color: var(--brand-strong);
  font-weight: 700;
}

.operation-card {
  padding: 18px;
  border-left-width: 6px;
  min-width: 0;
}

.operation-card-fire {
  border-color: rgba(194, 65, 12, 0.34);
  box-shadow: 0 12px 28px rgba(194, 65, 12, 0.08);
}

.operation-card-quake {
  border-color: rgba(124, 58, 237, 0.34);
  box-shadow: 0 12px 28px rgba(124, 58, 237, 0.08);
}

.operation-card-traffic {
  border-color: rgba(29, 78, 216, 0.34);
  box-shadow: 0 12px 28px rgba(29, 78, 216, 0.08);
}

.operation-card-forest {
  border-color: rgba(22, 101, 52, 0.34);
  box-shadow: 0 12px 28px rgba(22, 101, 52, 0.08);
}

.operation-card-flood {
  border-color: rgba(3, 105, 161, 0.34);
  box-shadow: 0 12px 28px rgba(3, 105, 161, 0.08);
}

.operation-card-missing {
  border-color: rgba(161, 98, 7, 0.34);
  box-shadow: 0 12px 28px rgba(161, 98, 7, 0.08);
}

.operation-card-default {
  border-color: rgba(123, 30, 30, 0.34);
}

.operation-card-alert {
  border-color: rgba(196, 59, 47, 0.55);
  box-shadow:
    0 0 0 2px rgba(196, 59, 47, 0.14),
    0 18px 38px rgba(196, 59, 47, 0.18);
  animation: operationCardAlert 1.15s ease-in-out 4;
}

@keyframes operationCardAlert {
  0%,
  100% {
    transform: translateY(0);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 246, 241, 0.98));
  }
  50% {
    transform: translateY(-2px);
    background: linear-gradient(180deg, rgba(255, 244, 242, 0.99), rgba(255, 236, 232, 0.99));
  }
}

.call-badge {
  background: var(--brand);
  color: #fff;
}

.operation-title {
  margin: 12px 0 6px;
  font-size: 1.25rem;
}

.operation-no,
.operation-time {
  margin: 0;
  color: var(--muted);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
}

.operation-details {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.operation-details div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(123, 30, 30, 0.04);
}

.operation-details dt {
  font-weight: 700;
  color: var(--muted);
}

.operation-details dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.photo-preview-grid,
.operation-photo-grid {
  grid-template-columns: repeat(auto-fit, minmax(72px, 96px));
  align-items: start;
  justify-items: start;
}

.photo-preview-item {
  position: relative;
  width: 80px;
  max-width: 80px;
}

.photo-preview,
.operation-photo-button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  width: auto;
  max-width: 96px;
}

.photo-remove-button {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: #b91c1c;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.photo-preview img,
.operation-photo-button img {
  width: 96px;
  max-width: 100%;
  height: 96px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid rgba(123, 30, 30, 0.14);
  display: block;
}

.operation-photo-grid .operation-photo-button {
  width: auto;
  max-width: 96px;
}

.status-focus {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 0.98rem;
}

.status-focus-pending {
  background: #fef3c7;
  color: #92400e;
}

.status-focus-enroute {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-focus-onsite {
  background: #ffedd5;
  color: #c2410c;
}

.status-focus-returning {
  background: #ede9fe;
  color: #7c3aed;
}

.status-focus-complete {
  background: #dcfce7;
  color: #166534;
}

.top-meta-row {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.member-focus-block {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(123, 30, 30, 0.1);
  background: rgba(123, 30, 30, 0.04);
}

.member-focus-label {
  display: inline-block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.member-focus-text {
  margin: 0;
  color: #1f2937;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.top-priority-chip {
  align-self: flex-start;
  flex: 0 0 auto;
}

.address-focus-block {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(123, 30, 30, 0.12);
  background: linear-gradient(180deg, rgba(123, 30, 30, 0.05), rgba(123, 30, 30, 0.02));
}

.address-focus-label {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.address-focus-text {
  margin: 0;
  color: #1f2937;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.quick-info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.quick-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 800;
}

.quick-chip-track {
  background: #dcfce7;
  color: #166534;
}

.quick-chip-team {
  background: #dbeafe;
  color: #1d4ed8;
}

.operation-actions {
  margin-top: 16px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid rgba(123, 30, 30, 0.1);
}

.report-owners {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.report-owners strong {
  color: var(--brand-strong);
}

.tracking-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(25, 118, 210, 0.08);
  color: #1d4ed8;
}

.connection-inline-note {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff1e7;
  color: #9a3412;
  border: 1px solid rgba(194, 65, 12, 0.18);
  font-weight: 700;
}

.tracking-members {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.timeline-block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(123, 30, 30, 0.12);
}

.timeline-title {
  margin: 0 0 10px;
  color: var(--brand-strong);
  font-size: 1rem;
}

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

.timeline-item {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(123, 30, 30, 0.05);
  border: 1px solid rgba(123, 30, 30, 0.08);
}

.timeline-time {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.timeline-text {
  margin: 0;
  line-height: 1.5;
}

.status-pending {
  background: #fef3c7;
  color: #92400e;
}

.status-enroute {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-onsite {
  background: #dcfce7;
  color: #166534;
}

.status-returning {
  background: #ede9fe;
  color: #6d28d9;
}

.status-complete {
  background: #e5e7eb;
  color: #374151;
}

.priority-low {
  background: #eef2ff;
  color: #4338ca;
}

.priority-medium {
  background: #fef3c7;
  color: #92400e;
}

.priority-high {
  background: #fee2e2;
  color: #b91c1c;
}

.priority-critical {
  background: #7f1d1d;
  color: #fff;
}

.empty-state {
  padding: 28px 18px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 20px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.86);
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  min-height: 40px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  cursor: pointer;
}

.lightbox-image {
  display: block;
  max-width: min(92vw, 1200px);
  max-height: 88vh;
  border-radius: 18px;
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 16px, 1040px);
    padding-top: 16px;
  }

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

  .form-grid {
    grid-template-columns: 1fr;
  }

  .report-meta-grid,
  .operation-details {
    grid-template-columns: 1fr;
  }

  .compact-meta-field {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .top-meta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .operation-map {
    height: 300px;
    border-radius: 16px;
  }

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

  .tracker-summary-grid {
    grid-template-columns: 1fr;
  }

  .hero-row,
  .section-head,
  .admin-row,
  .admin-left,
  .operation-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .map-quick-action-buttons,
  .tracking-members {
    flex-direction: column;
    align-items: stretch;
  }

  .form-actions,
  .primary-button,
  .ghost-button,
  .danger-button,
  .map-button,
  .map-mini-button {
    width: 100%;
  }

  .session-card {
    width: 100%;
  }

  .photo-preview-grid,
  .operation-photo-grid {
    grid-template-columns: repeat(auto-fit, minmax(64px, 80px));
    gap: 8px;
  }

  .photo-preview,
  .photo-preview-item,
  .operation-photo-button,
  .operation-photo-grid .operation-photo-button {
    width: 80px !important;
    max-width: 80px !important;
  }

  .photo-preview img,
  .operation-photo-button img {
    width: 80px !important;
    max-width: 80px !important;
    height: 80px !important;
    border-radius: 12px;
  }
}
