.panel-incident-host {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.incident-panel {
  --incident-bg: #17191d;
  --incident-surface: #1e2126;
  --incident-raised: #252930;
  --incident-line: #4b515b;
  --incident-line-soft: #343941;
  --incident-text: #f1f3f5;
  --incident-muted: #9da4ae;
  --incident-blue: #55a8ff;
  --incident-amber: #f1bd42;
  width: 100%;
  height: 100%;
  min-height: 0;
  container-type: inline-size;
  overflow: auto;
  background: var(--incident-bg);
  color: var(--incident-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
}

.persistence-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  color: #ffd8d3;
  background: #5a1b1b;
  border-bottom: 1px solid #ff7b72;
}

.persistence-conflict .incident-workspace { outline: 2px solid #ff7b72; outline-offset: -2px; }
.persistence-loading .incident-workspace { pointer-events: none; opacity: 0.65; }

.incident-panel *,
.incident-panel *::before,
.incident-panel *::after { box-sizing: border-box; }

.incident-panel button,
.incident-panel input,
.incident-panel select { font: inherit; }

.incident-panel button { color: inherit; }

.incident-commandbar {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 690px;
  min-height: 38px;
  border-bottom: 1px solid var(--incident-line);
  background: rgba(30, 33, 38, 0.96);
  padding: 4px 7px;
  backdrop-filter: blur(12px);
}

.incident-identity,
.incident-actions { display: flex; align-items: center; gap: 5px; }

.incident-identity input {
  width: 92px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--incident-text);
  font-weight: 750;
}

.incident-number {
  border-left: 1px solid var(--incident-line);
  padding-left: 7px;
  color: var(--incident-muted);
  font-size: 10px;
  text-transform: uppercase;
}

.incident-status-control select {
  height: 25px;
  border: 1px solid var(--incident-line);
  border-radius: 4px;
  outline: 0;
  background: #20252b;
  padding: 0 20px 0 6px;
  color: #77dca3;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.incident-status-control select:focus { border-color: var(--incident-blue); }
.incident-status-control select[data-status="avsluttet"],
.incident-status-control select[data-status="kansellert"] { color: #aeb5bf; }
.incident-status-control select[data-status="avventer"] { color: #f1bd42; }

.incident-actions button,
.incident-section-heading button,
.new-note-form button {
  border: 1px solid var(--incident-line);
  border-radius: 4px;
  background: var(--incident-raised);
  padding: 4px 7px;
  font-weight: 650;
  cursor: pointer;
}

.incident-actions button:hover,
.incident-section-heading button:hover,
.new-note-form button:hover { border-color: var(--incident-blue); background: #263649; }

.log-count {
  display: inline-grid;
  min-width: 15px;
  height: 15px;
  margin-left: 3px;
  place-items: center;
  border-radius: 8px;
  background: #39414c;
  color: #cfd4da;
  font-size: 9px;
}

.incident-workspace {
  display: grid;
  grid-template-columns: minmax(135px, 0.72fr) minmax(210px, 1fr) minmax(340px, 1.75fr);
  gap: 7px;
  min-width: 690px;
  min-height: calc(100% - 38px);
  padding: 7px;
}

.incident-column { min-width: 0; }
.incident-location-column,
.incident-notes-column,
.incident-operations-column { display: flex; flex-direction: column; gap: 7px; }

.incident-block {
  min-width: 0;
  border: 1px solid var(--incident-line);
  background: var(--incident-surface);
}

.incident-section-title,
.incident-section-heading {
  display: flex;
  min-height: 25px;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  border-bottom: 1px solid var(--incident-line-soft);
  padding: 4px 6px;
  font-size: 10px;
}

.incident-section-heading > div { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.incident-section-heading .patient-heading-actions { align-items: center; gap: 3px; }
.incident-section-heading strong { font-weight: 750; }
.incident-section-heading span { color: var(--incident-muted); font-size: 9px; white-space: nowrap; }
.incident-section-heading button { padding: 2px 6px; font-size: 9px; }
.incident-section-heading .patient-add-search { display: grid; width: 23px; height: 21px; padding: 3px; place-items: center; }
.patient-add-search svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.timeline-section-heading .timeline-deleted-toggle { display: flex; min-width: 23px; height: 21px; align-items: center; justify-content: center; gap: 3px; padding: 2px 4px; color: #8f98a2; }
.timeline-deleted-toggle svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.3; }
.timeline-deleted-toggle.is-active { border-color: #a8535b; background: #45282d; color: #ff9ba3; }
.timeline-deleted-toggle .deleted-note-count { color: inherit; font-size: 7px; font-weight: 800; }

.incident-search {
  position: relative;
  margin: 5px;
}

.incident-search input {
  width: 100%;
  height: 26px;
  border: 1px solid var(--incident-line);
  border-radius: 4px;
  outline: 0;
  background: #131519;
  padding: 0 23px 0 6px;
  color: var(--incident-text);
}

.incident-search span { position: absolute; top: 5px; right: 7px; color: var(--incident-muted); }
.incident-search input:focus { border-color: var(--incident-blue); }

.location-results { display: grid; gap: 3px; padding: 0 5px 5px; }

.location-result {
  display: block;
  width: 100%;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  padding: 4px;
  text-align: left;
  cursor: pointer;
}

.location-result:hover,
.location-result:focus-visible,
.location-result.is-active { border-color: #4a79a9; background: #222b35; outline: 0; }
.location-result strong,
.location-result small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.location-result strong { font-size: 10px; }
.location-result.address-only strong { font-size: 12px; }
.location-result small { margin-top: 2px; color: var(--incident-muted); font-size: 9px; }

.selected-location {
  border-top: 1px solid var(--incident-line-soft);
  background: #20242a;
  padding: 6px;
}

.selected-location span,
.selected-location strong,
.selected-location small { display: block; }
.selected-location span { color: var(--incident-muted); font-size: 8px; letter-spacing: 0.08em; text-transform: uppercase; }
.selected-location strong { margin-top: 3px; font-size: 11px; }
.selected-location.address-only strong { margin-top: 0; font-size: 13px; }
.selected-location small { margin-top: 2px; overflow-wrap: anywhere; color: #c5cad0; font-size: 9px; line-height: 1.25; }

.contact-block { flex: 1; }
.contact-list { display: grid; gap: 4px; padding: 5px; }

.contact-card,
.patient-card {
  position: relative;
  display: flex;
  gap: 5px;
  min-width: 0;
  border: 1px solid var(--incident-line);
  border-radius: 7px;
  background: #202329;
  padding: 4px 18px 4px 5px;
}

.contact-fields,
.patient-fields { flex: 1; min-width: 0; }

.incident-edit {
  width: 100%;
  min-width: 0;
  height: 18px;
  border: 1px solid transparent;
  border-radius: 3px;
  outline: 0;
  background: transparent;
  padding: 1px 3px;
  color: var(--incident-text);
  line-height: 1;
}

.incident-edit:hover { border-color: var(--incident-line); }
.incident-edit:focus { border-color: var(--incident-blue); background: #12161b; }
.collaboration-users { display: flex; margin: 0 4px 0 1px; }
.collaboration-user { display: grid; width: 19px; height: 19px; margin-left: -3px; place-items: center; border: 1px solid #58616d; border-radius: 50%; background: #29313a; color: #dbe8f3; font-size: 7px; font-weight: 800; }
textarea.collaboration-lock-pending { border-color: #d6a646 !important; }
textarea.collaboration-takeover { border-color: #f0a43a !important; box-shadow: 0 0 0 1px #f0a43a55; }
textarea.collaboration-owned-elsewhere { border-color: #bc7d32 !important; }
textarea.collaboration-displaced { border-color: #ff7b72 !important; box-shadow: 0 0 0 1px #ff7b7255; }
.collaboration-recovery { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid #a75b31; background: #4a2d1e; padding: 5px 8px; color: #ffd8b3; font-size: 9px; }
.incident-edit.person-locked {
  border-color: transparent;
  color: #dbe8f3;
  cursor: default;
}
.incident-edit.person-locked:hover,
.incident-edit.person-locked:focus { border-color: transparent; background: transparent; }
.incident-edit.primary-edit { font-weight: 700; }
.incident-edit.subtle-edit { color: var(--incident-muted); font-size: 9px; }

.remove-button {
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border: 0;
  border-radius: 3px;
  background: transparent;
  padding: 0;
  color: #777f89;
  line-height: 1;
  cursor: pointer;
}

.contact-card > .remove-button,
.patient-card > .remove-button { position: absolute; top: 3px; right: 3px; }
.patient-card > .patient-expand-button {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  padding: 0;
  color: #9da4ae;
  font-size: 9px;
  cursor: pointer;
}
.patient-card > .patient-expand-button:hover { background: #303740; color: #fff; }
.patient-card.has-valid-nin { cursor: pointer; }
.patient-card.has-valid-nin:hover { border-color: #47769d; }
.patient-card.is-deceased { border-left-color: #d15d67; }
.patient-deceased-indicator {
  display: inline-grid;
  flex: 0 0 auto;
  min-width: 25px;
  height: 14px;
  place-items: center;
  border: 1px solid #b95862;
  border-radius: 3px;
  background: #48262b;
  padding: 0 3px;
  color: #ffb8be;
  font-size: 7px;
  font-weight: 850;
  letter-spacing: .06em;
  line-height: 1;
}
.patient-residential-address {
  display: grid;
  gap: 1px;
  margin: 4px 2px 1px;
  border-top: 1px solid var(--incident-line-soft);
  padding-top: 4px;
  color: #c5cbd3;
  font-size: 8px;
  font-style: normal;
  line-height: 1.3;
}
.patient-address-label { color: var(--incident-muted); font-size: 7px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.patient-address-state { color: var(--incident-muted); font-style: italic; }
.patient-hospital-line {
  display: block;
  min-width: 0;
  margin: 3px 2px 1px;
  overflow: hidden;
  color: #9fd1f2;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.patient-fastlege {
  display: grid;
  min-width: 0;
  gap: 1px;
  margin: 3px 2px 1px;
  color: #c5d9e8;
  font-size: 8px;
  line-height: 1.3;
}
.patient-fastlege[hidden] { display: none; }
.patient-fastlege-line { overflow: hidden; color: inherit; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.patient-fastlege-doctor { color: #c9d7e2; font-weight: 700; }
.patient-fastlege-phone { color: #8fc8f3; }
.patient-fastlege-phone:hover { color: #d7edff; text-decoration: underline; }
.patient-clear-button {
  display: inline-grid;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  padding: 2px;
  color: #b5bdc7;
  cursor: pointer;
}
.patient-clear-button svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.35; }
.patient-clear-button:hover { border-color: #ff7b72; background: #4a292f; color: #ffb8be; }
.patient-search-button { display: inline-grid; flex: 0 0 18px; width: 18px; height: 18px; place-items: center; border: 1px solid transparent; border-radius: 3px; background: transparent; padding: 2px; color: #8fc8f3; cursor: pointer; }
.patient-search-button svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.4; }
.patient-search-button:hover { border-color: #58a6ff; background: #263b4e; color: #dff1ff; }
.patient-manual-lookup-button {
  display: inline-grid;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  padding: 0;
  color: #d6aa68;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.patient-manual-lookup-button:hover { border-color: #d6aa68; background: #473923; color: #ffe0a8; }
.card-confirmation {
  position: absolute;
  inset: 2px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid #8d4c52;
  border-radius: 6px;
  background: rgba(45, 29, 33, .98);
  padding: 5px 7px;
  box-shadow: 0 3px 12px #0008;
}
.card-confirmation-copy { display: grid; min-width: 0; gap: 2px; }
.card-confirmation-copy strong { color: #ffd7da; font-size: 9px; }
.card-confirmation-copy small { overflow: hidden; color: #c9a9ad; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.card-confirmation-actions { display: flex; flex: 0 0 auto; gap: 4px; }
.card-confirmation-actions button { border: 1px solid #6b5559; border-radius: 4px; padding: 3px 6px; color: #f1e5e6; font-size: 7px; font-weight: 750; cursor: pointer; }
.card-confirmation-cancel { background: #393034; }
.card-confirmation-confirm { border-color: #a84f57 !important; background: #742f37; }
.card-confirmation-actions button:hover { border-color: #ff8f98; }
.remove-button:hover { background: #52292e; color: #ff8f98; }

.readiness-grid {
  display: grid;
  grid-template-columns: 50px minmax(100px, 1fr);
  grid-template-rows: repeat(2, 27px) 31px;
  border: 1px solid var(--incident-line);
  background: var(--incident-surface);
}

.readiness-label { display: flex; align-items: center; border-right: 1px solid var(--incident-line); padding: 0 6px; font-weight: 700; }
.readiness-second-row { border-top: 1px solid var(--incident-line); }
.choice-group { display: grid; grid-template-columns: repeat(3, 1fr); }
.choice-group button { border: 0; border-right: 1px solid var(--incident-line); background: transparent; cursor: pointer; }
.choice-group button:last-child { border-right: 0; }
.choice-group button:hover { background: #292e35; }
.choice-group button.is-active { background: #34404c; color: #fff; box-shadow: inset 0 -2px var(--incident-blue); }

.criteria-row { position: relative; display: grid; grid-column: 1 / -1; grid-template-columns: 66px minmax(0, 1fr); border-top: 1px solid var(--incident-line); background: #181c21; }
.readiness-grid .criteria-code-input { width: 100%; min-width: 0; border: 0; border-right: 1px solid var(--incident-line); outline: 0; background: transparent; padding: 0 7px; color: #a9d6fa; font: 750 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; }
.criteria-code-input::placeholder { color: #65717d; opacity: 1; }
.criteria-code-input:focus { background: #111820; box-shadow: inset 0 -2px var(--incident-blue); }
.criteria-code-input[aria-invalid="true"] { color: #ff9da4; box-shadow: inset 0 -2px #e35d6a; }
.criteria-text { display: block; min-width: 0; overflow: hidden; padding: 9px 8px 0; color: #d5dbe1; font-size: 9px; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.criteria-text.is-placeholder { color: var(--incident-muted); font-style: italic; }
.criteria-suggestions { position: absolute; z-index: 8; top: 30px; left: 0; display: grid; width: 100%; max-height: 190px; overflow: auto; border: 1px solid #4b5966; border-radius: 0 0 5px 5px; background: #171c22; padding: 3px; box-shadow: 0 8px 20px #000a; }
.criteria-suggestions[hidden] { display: none; }
.criteria-suggestions button { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 7px; border: 0; border-radius: 3px; background: transparent; padding: 6px 7px; color: var(--incident-text); text-align: left; cursor: pointer; }
.criteria-suggestions button:hover,
.criteria-suggestions button.is-active { background: #263847; }
.criteria-suggestions strong { color: #9fcdf5; font: 750 9px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; }
.criteria-suggestions span { overflow: hidden; color: #c7cdd4; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.timeline-block { display: flex; flex: 1; min-height: 160px; flex-direction: column; }
.timeline-list { display: grid; align-content: start; gap: 4px; min-height: 75px; max-height: 38vh; overflow: auto; padding: 5px; }

.timeline-entry {
  position: relative;
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr) 16px;
  align-items: start;
  border: 1px solid var(--incident-line);
  border-radius: 5px;
  background: #202329;
  padding: 4px;
}

.timeline-entry .time-edit { font-weight: 750; }
.new-note-form { display: grid; grid-template-columns: 1fr auto; gap: 4px; margin-top: auto; border-top: 1px solid var(--incident-line-soft); padding: 5px; }
.new-note-form input { min-width: 0; border: 1px solid var(--incident-line); border-radius: 4px; outline: 0; background: #121418; padding: 4px 6px; color: var(--incident-text); }
.new-note-form input:focus { border-color: var(--incident-blue); }
.new-note-form button { padding: 3px 6px; font-size: 9px; }

.upper-operations { display: grid; grid-template-columns: minmax(145px, 0.92fr) minmax(175px, 1.08fr); gap: 7px; min-height: 144px; }
.patients-block,
.proposals-block { min-width: 0; }
.patient-list,
.proposal-list { display: grid; align-content: start; gap: 4px; max-height: 250px; overflow: auto; padding: 5px; }
.patient-card { padding-left: 4px; }
.triage-badge { flex: 0 0 18px; width: 18px; height: 18px; border: 1px solid currentColor; border-radius: 50%; background: transparent; padding: 0; font-size: 9px; font-weight: 800; cursor: pointer; }
.triage-badge.red { color: #ff7078; }
.triage-badge.yellow { color: #f5ca50; }
.triage-badge.green { color: #59d790; }
.triage-badge.gray { color: #a2a9b2; }
.patient-code { color: #cbd0d6; font-size: 9px; }

.proposal-group + .proposal-group { margin-top: 4px; }
.proposal-group h3 { margin: 0 0 2px; color: #c9ced4; font-size: 9px; font-weight: 650; }
.proposal-row { display: grid; grid-template-columns: 39px minmax(0, 1fr) 19px; gap: 2px; align-items: center; border: 1px solid var(--incident-line); border-radius: 4px; background: #202329; padding: 2px; }
.proposal-row .status-select { grid-column: 1 / span 2; color: var(--incident-muted); font-size: 8px; }
.proposal-row > .remove-button { grid-column: 3; grid-row: 1; }
.proposal-empty { margin: 0; padding: 2px 3px; color: #676e78; font-size: 8px; font-style: italic; }

.missions-block { flex: 1; min-height: 130px; }
.mission-list { display: grid; align-content: start; gap: 5px; max-height: 48vh; overflow: auto; padding: 5px; }
.mission-card { position: relative; border: 1px solid var(--incident-line); border-radius: 5px; background: #202329; overflow: hidden; }
.mission-topline { display: grid; grid-template-columns: 34px 42px minmax(64px, 0.8fr) minmax(62px, 0.75fr) minmax(68px, 1fr) minmax(67px, 0.8fr) auto 16px; gap: 2px; align-items: center; padding: 3px; }
.mission-topline select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #8f98a2 50%), linear-gradient(135deg, #8f98a2 50%, transparent 50%); background-position: calc(100% - 7px) 7px, calc(100% - 4px) 7px; background-repeat: no-repeat; background-size: 3px 3px; padding-right: 10px; }
.order-edit { font-weight: 800; }
.mission-status { border-color: #6a5522; background-color: #2c250f; color: #ffe79b; font-size: 9px; }
.mission-status.status-gjennomført { border-color: #276746; background-color: #173426; color: #8fe3b2; }
.mission-status.status-utrykning { border-color: #82464c; background-color: #3c2024; color: #ff9ca4; }
.mission-route { display: grid; grid-template-columns: 25px minmax(0, 1fr) 16px 22px minmax(0, 1fr); align-items: center; border-top: 1px solid var(--incident-line-soft); padding: 2px 4px; }
.route-label { color: var(--incident-muted); font-size: 7px; letter-spacing: 0.08em; }
.route-arrow { color: var(--incident-blue); text-align: center; }

.incident-dialog {
  width: min(440px, calc(100% - 24px));
  max-height: min(560px, calc(100% - 24px));
  border: 1px solid var(--incident-line);
  border-radius: 8px;
  background: #1b1e23;
  padding: 0;
  color: var(--incident-text);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

.incident-dialog::backdrop { background: rgba(3, 5, 8, 0.7); backdrop-filter: blur(2px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--incident-line); padding: 12px 14px; }
.dialog-heading small { color: var(--incident-blue); font-size: 8px; font-weight: 800; letter-spacing: 0.12em; }
.dialog-heading h2 { margin: 2px 0 0; font-size: 16px; }
.dialog-heading button { border: 0; background: transparent; color: var(--incident-muted); font-size: 22px; cursor: pointer; }
.dialog-heading-actions { display: flex; align-items: center; gap: 8px; }
.dialog-heading .kjernejournal-portal-button { border: 1px solid #47708f; border-radius: 5px; background: #20394c; padding: 5px 9px; color: #c7e6fb; font-size: 9px; font-weight: 750; }
.dialog-heading .kjernejournal-portal-button:hover { border-color: #58a6ff; background: #294b65; }
.incident-dialog ol { margin: 0; overflow: auto; padding: 8px 14px 14px; list-style: none; }
.incident-dialog li { display: grid; grid-template-columns: 48px 1fr; gap: 10px; border-bottom: 1px solid var(--incident-line-soft); padding: 8px 0; }
.incident-dialog time { color: var(--incident-muted); font-variant-numeric: tabular-nums; }
.incident-dialog.pjd-dialog { width: min(900px, calc(100% - 24px)); height: min(620px, calc(100% - 24px)); max-height: none; }
.incident-dialog.full-person-dialog { width: min(900px, calc(100% - 24px)); height: min(700px, calc(100% - 24px)); max-height: none; }
.incident-dialog.critical-information-dialog { width: min(820px, calc(100% - 24px)); height: min(680px, calc(100% - 24px)); max-height: none; }
.incident-dialog.portal-access-basis-dialog { width: min(520px, calc(100% - 24px)); }
.incident-dialog.hospital-routing-dialog { width: min(760px, calc(100% - 24px)); height: min(680px, calc(100% - 24px)); max-height: none; }
.hospital-routing-content { height: calc(100% - 61px); overflow: auto; padding: 12px 14px 16px; }
.hospital-routing-summary { display: grid; gap: 3px; margin-bottom: 10px; border: 1px solid #40596c; border-radius: 7px; background: #202d37; padding: 10px 12px; }
.hospital-routing-summary strong { color: #e7f3fb; font-size: 12px; }
.hospital-routing-summary span { color: var(--incident-muted); font-size: 8px; }
.hospital-routing-list { display: grid; gap: 4px; }
.hospital-routing-row { display: grid; grid-template-columns: minmax(210px, 1.4fr) minmax(180px, 1fr); gap: 10px; align-items: center; border: 1px solid #363e47; border-radius: 6px; background: #202329; padding: 8px 9px; }
.hospital-routing-row.is-primary { border-color: #477ba0; background: #20303c; box-shadow: inset 3px 0 #58a6ff; }
.hospital-routing-condition { display: grid; min-width: 0; gap: 3px; }
.hospital-routing-condition strong { color: #e3e9ee; font-size: 9px; line-height: 1.35; }
.hospital-routing-condition small { color: #79b9e8; font-size: 8px; font-weight: 800; }
.hospital-routing-hospitals { display: grid; gap: 4px; }
.hospital-routing-hospital, .hospital-routing-transport { border: 1px solid #48667b; border-radius: 5px; background: #243847; padding: 6px 8px; color: #cce9fc; font-size: 8px; font-weight: 750; text-align: left; cursor: pointer; }
.hospital-routing-hospital:hover:not(:disabled), .hospital-routing-transport:hover { border-color: #58a6ff; background: #2b4b61; }
.hospital-routing-hospital:disabled { cursor: not-allowed; opacity: .48; }
.hospital-routing-transport-chooser { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.hospital-routing-transport-chooser:not(:empty) { position: sticky; top: 0; z-index: 1; margin-bottom: 10px; border: 1px solid #5c7080; border-radius: 7px; background: #19232b; padding: 9px; box-shadow: 0 4px 14px #0007; }
.hospital-routing-transport-chooser > strong { flex: 1 0 100%; font-size: 9px; }
.hospital-routing-state { color: var(--incident-muted); font-size: 9px; }
.hospital-routing-error { color: #ff9da4; font-size: 9px; }
.portal-access-basis-content { padding: 14px; }
.portal-access-basis-content > p { margin: 0 0 12px; color: var(--incident-muted); font-size: 10px; line-height: 1.45; }
.portal-access-basis-options { display: grid; gap: 8px; }
.portal-access-basis-options button { display: grid; gap: 3px; border: 1px solid #425565; border-radius: 7px; background: #202a32; padding: 11px 12px; color: #edf2f6; text-align: left; cursor: pointer; }
.portal-access-basis-options button:hover:not(:disabled) { border-color: #58a6ff; background: #263947; }
.portal-access-basis-options button:disabled { cursor: wait; opacity: .55; }
.portal-access-basis-options strong { font-size: 12px; }
.portal-access-basis-options span { color: var(--incident-muted); font-size: 9px; }
.portal-access-basis-content .portal-access-basis-error { margin: 12px 0 0; border: 1px solid #8b3e45; border-radius: 6px; background: #3b2227; padding: 9px 10px; color: #ffb3b8; }
.portal-access-basis-dialog footer { display: flex; justify-content: flex-end; border-top: 1px solid var(--incident-line); padding: 10px 14px; }
.portal-access-basis-dialog footer button { border: 1px solid #48545e; border-radius: 5px; background: #252c32; padding: 6px 11px; color: #d7dce2; cursor: pointer; }
.incident-dialog.patient-search-dialog { width: min(760px, calc(100% - 24px)); height: min(640px, calc(100% - 24px)); max-height: none; }
.full-person-warning { margin: 0; border-bottom: 1px solid var(--incident-line); background: #2a2418; padding: 9px 14px; color: #e6c77a; font-size: 10px; }
.full-person-content { height: calc(100% - 102px); overflow: auto; padding: 12px 14px; }
.full-person-json { margin: 0; color: #d7e2ec; font: 11px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.full-person-state { margin: 0; color: var(--incident-muted); }
.full-person-error { display: block; margin-bottom: 6px; color: #ff9da4; }
.critical-information-content { height: calc(100% - 61px); overflow: auto; }
.critical-information-results { padding: 14px; }
.critical-information-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; border: 1px solid #3b4b58; border-radius: 8px; background: #202a32; padding: 12px 14px; }
.critical-information-count { color: #ff8e91; font-size: 25px; line-height: 1; }
.critical-information-summary > span { color: #d2dbe3; font-size: 11px; }
.critical-information-types { display: flex; flex: 1 0 100%; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.critical-information-type { border: 1px solid #526574; border-radius: 12px; background: #293843; padding: 3px 7px; color: #cde5f6 !important; font-size: 8px !important; }
.critical-information-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 9px; margin-top: 10px; }
.critical-information-card { min-width: 0; border: 1px solid #3d454f; border-left: 3px solid #e54b50; border-radius: 7px; background: #202329; overflow: hidden; }
.critical-information-card-heading { border-bottom: 1px solid var(--incident-line-soft); padding: 10px 11px; }
.critical-information-card-type { color: #ff9ca0; font-size: 8px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.critical-information-card-heading h3 { margin: 3px 0 0; color: #edf2f6; font-size: 13px; line-height: 1.3; }
.critical-information-details { display: grid; grid-template-columns: minmax(95px, .7fr) minmax(0, 1.3fr); gap: 7px 10px; margin: 0; padding: 11px; }
.critical-information-details dt { color: var(--incident-muted); font-size: 8px; }
.critical-information-details dd { margin: 0; overflow-wrap: anywhere; color: #d7dce2; font-size: 9px; }
.critical-information-state { margin: 0; padding: 20px; color: var(--incident-muted); }
.critical-information-error { display: block; padding: 20px 20px 0; color: #ff9da4; }
.critical-information-error + .critical-information-state { padding-top: 6px; }
.critical-information-empty { margin: 10px 0 0; border: 1px dashed #46515b; border-radius: 7px; padding: 18px; color: var(--incident-muted); text-align: center; }
.patient-search-body { height: calc(100% - 61px); overflow: auto; padding: 14px; }
.patient-search-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 0 0 7px; }
.patient-search-tools > span { margin-right: 2px; color: var(--incident-muted); font-size: 8px; font-weight: 750; text-transform: uppercase; }
.patient-search-tools button { border: 1px solid #48647a; border-radius: 5px; background: #203443; padding: 4px 8px; color: #b9dcf7; font-size: 9px; font-weight: 750; cursor: pointer; }
.patient-search-tools button:hover:not(:disabled) { border-color: #58a6ff; background: #29465c; }
.patient-search-tools button:disabled { cursor: not-allowed; opacity: .45; }
.patient-search-contact-shortcuts { display: contents; }
.patient-search-contact-shortcut { max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.patient-search-combobox { display: flex; min-height: 42px; flex-wrap: wrap; align-items: center; gap: 5px; border: 1px solid #4b5d6b; border-radius: 8px; background: #12161b; padding: 6px 9px; box-shadow: inset 0 1px 2px rgba(0,0,0,.3); }
.patient-search-combobox:focus-within { border-color: #58a6ff; box-shadow: 0 0 0 2px rgba(88,166,255,.16); }
.patient-search-chips { display: contents; }
.patient-search-chip { display: inline-flex; height: 24px; align-items: center; gap: 4px; border: 1px solid #426f91; border-radius: 12px; background: #203a4e; padding: 0 3px 0 8px; color: #d8edfc; font-size: 9px; }
.patient-search-chip-remove { width: 18px; height: 18px; border: 0; border-radius: 50%; background: transparent; padding: 0; color: #9fc5df; cursor: pointer; }
.patient-search-chip-remove:hover { background: #31566f; color: #fff; }
.patient-search-input { min-width: 180px; flex: 1 1 220px; border: 0; outline: 0; background: transparent; padding: 4px 1px; color: #edf3f7; font-size: 12px; }
.patient-search-input::-webkit-search-cancel-button { display: none; }
.patient-search-spinner { display: none; width: 13px; height: 13px; border: 2px solid #44515d; border-top-color: #67b5f5; border-radius: 50%; }
.patient-search-dialog.is-loading .patient-search-spinner { display: block; animation: kj-pulse .8s linear infinite; }
.patient-search-suggestions { position: relative; z-index: 2; display: grid; max-height: 190px; overflow: auto; border: 1px solid #3f4b56; border-top: 0; border-radius: 0 0 7px 7px; background: #181c21; }
.patient-search-suggestions:empty { display: none; }
.patient-search-suggestion { display: grid; grid-template-columns: minmax(90px,.5fr) minmax(0,1fr); gap: 10px; border: 0; border-bottom: 1px solid #2d343c; background: transparent; padding: 8px 10px; color: var(--incident-text); text-align: left; cursor: pointer; }
.patient-search-suggestion:hover, .patient-search-suggestion.is-active { background: #253746; }
.patient-search-suggestion small { color: var(--incident-muted); }
.patient-search-hint { min-height: 18px; margin: 7px 2px; color: var(--incident-muted); font-size: 9px; }
.patient-search-hint.is-error { color: #ff9da4; }
.patient-search-results { display: grid; gap: 7px; }
.patient-search-result-card { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 5px; }
.patient-search-result { position: relative; display: grid; gap: 5px; width: 100%; border: 1px solid #3c4650; border-radius: 7px; background: #20242a; padding: 11px 58px 11px 12px; color: var(--incident-text); text-align: left; cursor: pointer; }
.patient-search-result:hover, .patient-search-result:focus-visible, .patient-search-result.is-active, .patient-relative-select.is-active { border-color: #58a6ff; background: #243443; outline: 0; box-shadow: 0 0 0 2px rgba(88,166,255,.14); }
.patient-search-result-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 10px; }
.patient-search-result-heading strong { font-size: 12px; }
.patient-search-result-heading span { color: #aeb8c1; font-size: 9px; }
.patient-search-result-heading .patient-deceased-indicator { color: #ffb8be; font-size: 7px; }
.patient-search-address, .patient-search-protected { margin: 0; color: #bec7cf; font-size: 9px; }
.patient-search-protected { color: #ffb4b7; font-weight: 700; }
.patient-search-select-label { position: absolute; top: 50%; right: 12px; translate: 0 -50%; color: #78bdf5; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.patient-relations-button { align-self: stretch; border: 1px solid #405463; border-radius: 7px; background: #1d2932; padding: 7px 9px; color: #a9cee8; font-size: 8px; font-weight: 750; cursor: pointer; }
.patient-relations-button:hover:not(:disabled) { border-color: #58a6ff; background: #263b4b; }
.patient-relations-button:disabled { cursor: wait; opacity: .65; }
.patient-relations-list { display: grid; grid-column: 1 / -1; gap: 5px; border-left: 2px solid #426f91; padding: 2px 0 2px 9px; }
.patient-relative { display: grid; gap: 4px; border: 1px solid #374550; border-radius: 6px; background: #1b2228; padding: 9px 10px; }
.patient-relative-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 9px; }
.patient-relative-heading strong { font-size: 11px; }
.patient-relative-heading small { color: #aeb8c1; font-size: 8px; }
.patient-relative-relation { border-radius: 9px; background: #29475d; padding: 2px 6px; color: #c8e7fc; font-size: 8px; font-weight: 800; }
.patient-relative-select { justify-self: start; border: 1px solid #47708d; border-radius: 5px; background: #243b4c; padding: 4px 8px; color: #cce9fc; font-size: 8px; font-weight: 800; cursor: pointer; }
.patient-relative-select:hover, .patient-relative-select:focus-visible { border-color: #58a6ff; background: #2b4a61; outline: 0; }
.patient-relative-unavailable { color: var(--incident-muted); font-size: 8px; }
.patient-relation-state, .patient-relation-error { margin: 0; border-radius: 6px; background: #1b2228; padding: 10px; color: var(--incident-muted); font-size: 9px; }
.patient-relation-error { color: #ff9da4; }
.patient-search-state { margin: 0; border: 1px dashed #414a54; border-radius: 7px; padding: 22px; color: var(--incident-muted); text-align: center; }
.patient-search-error { display: block; border: 1px solid #754149; border-radius: 7px; background: #382328; padding: 14px; color: #ffb7bb; }
.pjd-browser { display: grid; grid-template-columns: minmax(190px, .7fr) minmax(300px, 1.3fr); height: calc(100% - 61px); min-height: 320px; }
.patient-history-sources { display: grid; min-height: 0; grid-template-rows: repeat(3, minmax(92px, 1fr)) auto; overflow: auto; border-right: 1px solid var(--incident-line); background: #171a1f; }
.patient-history-source { display: grid; min-height: 0; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
.patient-history-source + .patient-history-source { border-top: 1px solid var(--incident-line); }
.patient-history-source header { display: flex; align-items: center; justify-content: space-between; padding: 7px 9px 5px; color: #aab5bf; font-size: 8px; letter-spacing: .04em; text-transform: uppercase; }
.patient-history-source header span { display: grid; min-width: 18px; height: 18px; place-items: center; border-radius: 9px; background: #29313a; color: #dce7ef; font-variant-numeric: tabular-nums; }
.pjd-document-list, .local-history-list, .pps-report-list { min-height: 0; overflow: auto; padding: 0 7px 7px; }
.pjd-document-list button, .local-history-list button, .pps-report-list button { display: grid; width: 100%; gap: 4px; border: 1px solid transparent; border-radius: 6px; background: transparent; padding: 9px; color: var(--incident-text); text-align: left; cursor: pointer; }
.pjd-document-list button + button, .local-history-list button + button, .pps-report-list button + button { margin-top: 4px; }
.pjd-document-list button:hover, .local-history-list button:hover, .pps-report-list button:hover { border-color: #46515d; background: #222831; }
.pjd-document-list button.is-selected, .local-history-list button.is-selected, .pps-report-list button.is-selected { border-color: #397db9; background: #20384d; box-shadow: inset 3px 0 #58a6ff; }
.pjd-document-list strong, .local-history-list strong, .pps-report-list strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.pjd-document-list small, .local-history-list small, .pps-report-list small { color: var(--incident-muted); font-size: 8px; }
.patient-history-list-state { margin: 2px 0; border: 1px dashed #39434d; border-radius: 6px; padding: 12px 8px; color: var(--incident-muted); font-size: 8px; line-height: 1.4; text-align: center; }
.patient-history-list-state.is-error { border-color: #704249; color: #ffadb2; }
.medication-source-action { position: sticky; bottom: 0; z-index: 2; border-top: 1px solid #41515e; background: linear-gradient(180deg, #1b252d, #151a1f); padding: 9px; box-shadow: 0 -8px 18px #0b0d1088; }
.medication-source-action button { display: grid; width: 100%; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 9px; border: 1px solid #42677e; border-radius: 8px; background: linear-gradient(135deg, #203846, #1b2b35); padding: 9px 10px; color: #edf7fc; text-align: left; cursor: pointer; box-shadow: inset 0 1px #ffffff0b; }
.medication-source-action button:hover:not(:disabled), .medication-source-action button:focus-visible { border-color: #69bce8; background: linear-gradient(135deg, #28506a, #203c4d); outline: 0; }
.medication-source-action button.is-selected { border-color: #74c9f3; background: linear-gradient(135deg, #255875, #234252); box-shadow: inset 3px 0 #78d2ff, 0 0 0 1px #102b3b; }
.medication-source-action button:disabled { cursor: wait; opacity: .68; }
.medication-source-icon { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid #6bb5d9; border-radius: 50%; background: #132936; color: #8ad8fa; font: 800 11px/1 Georgia, serif; }
.medication-source-copy { display: grid; min-width: 0; gap: 2px; }
.medication-source-copy strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.medication-source-copy small { color: #9db8c7; font-size: 8px; }
.medication-source-count { display: grid; min-width: 34px; height: 22px; place-items: center; border-radius: 11px; background: #102631; padding: 0 7px; color: #a8ddf5; font-size: 8px; font-weight: 800; }
.pjd-document-viewer { min-width: 0; overflow: auto; padding: 20px; }
.pjd-viewer-heading { border-bottom: 1px solid var(--incident-line-soft); padding-bottom: 12px; }
.pjd-viewer-kicker { color: var(--incident-blue); font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.pjd-viewer-heading h3 { margin: 4px 0 0; font-size: 17px; }
.pjd-document-metadata { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 7px 12px; margin: 16px 0; }
.pjd-document-metadata dt { color: var(--incident-muted); font-size: 9px; }
.pjd-document-metadata dd { margin: 0; overflow-wrap: anywhere; color: #d7dce2; font-size: 10px; }
.pjd-document-header { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(300px, 1.4fr); align-items: start; gap: 16px; margin-bottom: 12px; border-bottom: 1px solid var(--incident-line-soft); padding-bottom: 10px; }
.pjd-document-header .pjd-viewer-heading { min-width: 0; border: 0; padding: 0; }
.pjd-document-header .pjd-viewer-heading h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pjd-document-header .pjd-document-metadata { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px 12px; margin: 0; }
.pjd-document-meta-item { display: flex; min-width: 0; gap: 4px; border-left: 1px solid #38414a; padding-left: 9px; }
.pjd-document-meta-item dt::after { content: ":"; }
.pjd-document-header .pjd-document-metadata dt, .pjd-document-header .pjd-document-metadata dd { font-size: 8px; line-height: 1.35; }
.pjd-document-preview { display: grid; min-height: 180px; place-items: center; align-content: center; border: 1px dashed #414a54; border-radius: 8px; background: #15181d; padding: 24px; text-align: center; }
.pjd-preview-icon { color: #75b6ee; font-size: 34px; line-height: 1; }
.pjd-document-preview strong { margin-top: 10px; font-size: 11px; }
.pjd-document-preview p { max-width: 360px; margin: 6px 0 0; color: var(--incident-muted); font-size: 9px; line-height: 1.45; }
.pjd-document-preview:has(.pjd-content-frame),
.pjd-document-preview:has(.pjd-content-image),
.pjd-document-preview:has(.pjd-content-text),
.pjd-document-preview:has(.pjd-kith-document),
.pjd-document-preview:has(.pjd-rtf-document),
.pjd-document-preview:has(.pjd-csv-document),
.pjd-document-preview:has(.pjd-tiff-document) { display: block; overflow: auto; padding: 0; text-align: left; }
.pjd-content-frame { display: block; width: 100%; height: 430px; border: 0; background: #fff; }
.pjd-content-image { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.pjd-content-text { min-height: 180px; margin: 0; overflow: auto; padding: 14px; color: #d8dee5; font: 9px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-word; }
.pjd-content-truncated { padding: 0 14px 14px; color: #d8ae52 !important; }
.pjd-clinical-source { border-top: 1px solid #39434d; background: #111419; }
.pjd-clinical-source summary { cursor: pointer; padding: 10px 14px; color: #9dc9ec; font-size: 9px; font-weight: 700; }
.pjd-clinical-source .pjd-content-text { max-height: 360px; border-top: 1px solid #2c343d; }
.pjd-kith-document { min-height: 430px; background: #fff; padding: 22px 16px 36px; color: #101820; font: 12px/1.45 Arial, Helvetica, sans-serif; }
.pjd-kith-header { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(260px, 1.6fr); gap: 28px; margin: 0 8px 24px; }
.pjd-kith-header-group { display: grid; grid-template-columns: 105px minmax(0, 1fr); gap: 6px 12px; margin: 0; }
.pjd-kith-header dt { font-weight: 700; }
.pjd-kith-header dd { margin: 0; overflow-wrap: anywhere; }
.pjd-kith-header dd.is-prominent { font-size: 15px; font-weight: 700; }
.pjd-kith-document h1, .pjd-kith-document h2 { margin: 0; border: 1px solid #d1d1cc; background: #efefec; color: #101820; }
.pjd-kith-document h1 { padding: 5px 7px; font-size: 23px; line-height: 1.25; }
.pjd-kith-event { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 8px 0; border: 1px solid #d5d5d0; }
.pjd-kith-event dt { grid-row: 1; background: #f6f3e9; padding: 2px 4px; color: #76693a; }
.pjd-kith-event dd { grid-row: 2; margin: 0; padding: 2px 4px 6px; }
.pjd-kith-section { margin-top: 9px; }
.pjd-kith-document h2 { padding: 2px 7px; font-size: 18px; line-height: 1.25; }
.pjd-kith-section-body { border: 1px solid #d5d5d0; border-top: 0; padding: 7px; }
.pjd-kith-section-body p { max-width: none; margin: 0 0 8px; color: #101820; font-size: 12px; line-height: 1.55; white-space: pre-line; }
.pjd-kith-section-body p:last-child { margin-bottom: 0; }
.pjd-kith-section-body .pjd-kith-diagnosis { margin: 0 0 5px; border: 0; padding: 0; font-weight: 700; }
.pjd-kith-message-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pjd-kith-message-fields { display: grid; grid-template-columns: minmax(110px, .35fr) minmax(0, 1fr); margin: 0; border: 1px solid #d5d5d0; border-top: 0; }
.pjd-kith-message-fields dt, .pjd-kith-message-fields dd { margin: 0; border-bottom: 1px solid #e2e2dd; padding: 5px 7px; overflow-wrap: anywhere; }
.pjd-kith-message-fields dt { background: #f6f3e9; color: #665b35; font-weight: 700; }
.pjd-kith-message-fields dt:last-of-type, .pjd-kith-message-fields dd:last-child { border-bottom: 0; }
.pjd-kith-message-fields dd { white-space: pre-wrap; }
.pjd-format-correction { max-width: none !important; margin: 0 !important; border-bottom: 1px solid #735a29; background: #3a2f1c; padding: 8px 12px; color: #ffd58a !important; font-size: 9px !important; }
.pjd-rtf-document { min-height: 430px; background: #fff; padding: 32px 38px; color: #111820; font: 13px/1.55 Arial, Helvetica, sans-serif; }
.pjd-rtf-document p { max-width: none; min-height: 1.55em; margin: 0 0 .65em; color: inherit; font-size: inherit; line-height: inherit; white-space: pre-wrap; }
.pjd-csv-document { overflow: auto; max-height: 520px; background: #fff; color: #111820; }
.pjd-csv-document table { width: 100%; border-collapse: collapse; font: 11px/1.4 Arial, Helvetica, sans-serif; }
.pjd-csv-document th, .pjd-csv-document td { border: 1px solid #d2d7da; padding: 6px 8px; text-align: left; vertical-align: top; white-space: pre-wrap; }
.pjd-csv-document th { position: sticky; top: 0; background: #e9ecee; font-weight: 700; }
.pjd-csv-document tr:nth-child(even) td { background: #f6f7f7; }
.pjd-tiff-document { display: grid; gap: 12px; justify-items: center; background: #343a40; padding: 12px; }
.pjd-tiff-page { display: block; max-width: 100%; height: auto; background: #fff; box-shadow: 0 2px 10px #0008; }
.pjd-render-warning { max-width: none !important; margin: 0 0 10px !important; color: #ffc2a6 !important; }
.pjd-document-download { display: inline-flex; margin-top: 12px; border: 1px solid #397db9; border-radius: 5px; padding: 7px 10px; color: #9dc9ec; font-size: 9px; text-decoration: none; }
.local-history-details { display: grid; gap: 10px; }
.local-history-card { border: 1px solid #39434d; border-radius: 8px; background: #191d22; padding: 12px; }
.local-history-card > small { color: #75b6ee; font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.local-history-card > p { margin: 7px 0 0; color: #d8dee5; font-size: 10px; line-height: 1.55; white-space: pre-line; }
.local-history-problem { border-left: 3px solid #d2913d; }
.local-history-actions { display: grid; gap: 7px; margin-top: 8px; }
.local-history-action { display: grid; gap: 4px; border-top: 1px solid var(--incident-line-soft); padding-top: 7px; }
.local-history-action:first-child { border-top: 0; padding-top: 0; }
.local-history-action strong { color: #e5ebf0; font-size: 10px; }
.local-history-action span { color: var(--incident-muted); font-size: 9px; line-height: 1.4; }
.local-history-action .local-history-destination { color: #bad6e9; }
.pps-conclusion { margin: 0 0 14px; border-left: 3px solid #5aa6d6; border-radius: 6px; background: #18242d; padding: 11px 13px; }
.pps-conclusion small, .pps-results-heading { color: #82c4ef; font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.pps-conclusion p { margin: 6px 0 0; color: #e0e9ef; font-size: 10px; line-height: 1.5; }
.pps-results { display: grid; gap: 8px; }
.pps-results-heading { margin: 2px 0 1px; }
.pps-result-card { overflow: hidden; border: 1px solid #39434d; border-left: 4px solid #60717e; border-radius: 8px; background: #191d22; }
.pps-result-card.is-high, .pps-result-card.is-low, .pps-result-card.is-abnormal { border-left-color: #e2a344; }
.pps-result-card.is-normal { border-left-color: #56a879; }
.pps-result-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(105px, auto); align-items: center; gap: 12px; padding: 12px; }
.pps-result-title, .pps-result-value { display: grid; gap: 3px; }
.pps-result-title strong { font-size: 11px; }
.pps-result-title small { color: var(--incident-muted); font-size: 8px; }
.pps-result-value { justify-items: end; text-align: right; }
.pps-result-value strong { color: #f0f5f8; font-size: 15px; font-variant-numeric: tabular-nums; }
.pps-result-value span { border-radius: 9px; background: #5b4424; padding: 2px 7px; color: #ffd38a; font-size: 8px; font-weight: 800; }
.pps-result-card.is-normal .pps-result-value span { background: #244b35; color: #a6e4bf; }
.pps-reference-range, .pps-result-note { margin: 0; border-top: 1px solid var(--incident-line-soft); padding: 7px 12px; color: #aeb9c2; font-size: 8px; line-height: 1.45; }
.pps-result-note { color: #d8dee5; white-space: pre-line; }
.pps-components { display: grid; border-top: 1px solid var(--incident-line-soft); }
.pps-component { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 7px 12px; color: #bdc7cf; font-size: 9px; }
.pps-component + .pps-component { border-top: 1px solid #2c333a; }
.pps-component strong { color: #e7edf1; font-variant-numeric: tabular-nums; }
.medication-viewer-heading { border-bottom: 0; }
.medication-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 14px; border: 1px solid #3d596a; border-radius: 9px; background: linear-gradient(135deg, #1b303d, #182229); padding: 12px 14px; }
.medication-summary-copy { display: grid; gap: 3px; }
.medication-summary-copy strong { color: #eff8fc; font-size: 13px; }
.medication-summary-copy small { color: #9eb2bf; font-size: 8px; }
.medication-summary-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.medication-summary-badges span { border: 1px solid #41667a; border-radius: 10px; background: #173343; padding: 3px 8px; color: #bce7fa; font-size: 8px; font-weight: 700; }
.medication-summary-badges span.is-warning { border-color: #866834; background: #3b301c; color: #ffd58a; }
.medication-content { display: grid; gap: 15px; }
.medication-indicator { margin: 0; border-left: 3px solid #5aa6d6; border-radius: 6px; background: #182832; padding: 9px 11px; color: #c9e4f4; font-size: 9px; line-height: 1.45; }
.medication-indicator.is-critical { border-left-color: #df555f; background: #332125; color: #ffc2c6; }
.medication-group { display: grid; gap: 7px; }
.medication-group h4 { margin: 0; color: #82c4ef; font-size: 8px; letter-spacing: .09em; }
.medication-cards { display: grid; gap: 9px; }
.medication-card { overflow: hidden; border: 1px solid #3c4852; border-left: 4px solid #71808b; border-radius: 9px; background: #191d22; box-shadow: 0 3px 10px #080a0c55; }
.medication-card.is-active { border-left-color: #55b987; }
.medication-card.is-inactive { border-left-color: #c77a70; opacity: .82; }
.medication-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 13px 9px; }
.medication-card-title { display: grid; min-width: 0; gap: 3px; }
.medication-card-title strong { overflow-wrap: anywhere; color: #f0f4f7; font-size: 11px; line-height: 1.35; }
.medication-card-title small { color: #9facb6; font-size: 8px; }
.medication-status { flex: 0 0 auto; border: 1px solid #51606a; border-radius: 10px; background: #252c32; padding: 3px 7px; color: #c9d1d7; font-size: 8px; font-weight: 800; }
.medication-card.is-active .medication-status { border-color: #3f795d; background: #203d2e; color: #a7e4c0; }
.medication-card.is-inactive .medication-status { border-color: #77484a; background: #3b2629; color: #ffb7ba; }
.medication-dose { display: grid; gap: 3px; border-top: 1px solid #303942; border-bottom: 1px solid #303942; background: #151b20; padding: 9px 13px; }
.medication-dose small, .medication-ingredients > small { color: #79bce3; font-size: 7px; font-weight: 800; letter-spacing: .08em; }
.medication-dose strong { color: #e8f2f7; font-size: 10px; }
.medication-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 0; margin: 0; }
.medication-facts > div { display: grid; gap: 2px; border-right: 1px solid #303942; border-bottom: 1px solid #303942; padding: 8px 12px; }
.medication-facts dt { color: #8f9ba5; font-size: 7px; text-transform: uppercase; }
.medication-facts dd { margin: 0; color: #d7dfe5; font-size: 9px; }
.medication-ingredients { display: grid; gap: 5px; padding: 9px 13px 11px; }
.medication-ingredients > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; border-top: 1px solid #2c343b; padding-top: 5px; color: #bcc8d0; font-size: 8px; }
.medication-ingredients > div strong { color: #e1e8ed; font-weight: 700; }
.medication-loading .pjd-preview-icon { display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid #4d91b6; border-radius: 50%; background: #172c38; font: 800 15px/1 Georgia, serif; }
.patient-history-empty { min-height: 240px; }

.incident-toast { position: fixed; right: 12px; bottom: 12px; z-index: 10; pointer-events: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

@container (max-width: 760px) {
  .incident-panel { font-size: 11px; }
  .incident-workspace { grid-template-columns: minmax(125px, 0.72fr) minmax(195px, 1fr) minmax(330px, 1.72fr); gap: 5px; min-width: 670px; padding: 5px; }
  .incident-commandbar { min-width: 670px; }
  .upper-operations { gap: 5px; }
  .mission-topline { grid-template-columns: 30px 38px minmax(56px, .8fr) minmax(58px, .7fr) minmax(62px, 1fr) minmax(62px, .8fr) auto 16px; }
}

@container (max-width: 620px) {
  .incident-commandbar { min-width: 0; }
  .incident-number { display: none; }
  .incident-workspace { grid-template-columns: minmax(145px, 0.72fr) minmax(240px, 1.28fr); min-width: 390px; }
  .incident-operations-column { grid-column: 1 / -1; }
  .upper-operations { grid-template-columns: minmax(170px, 0.9fr) minmax(210px, 1.1fr); }
  .timeline-list { max-height: 280px; }
  .pjd-document-header { grid-template-columns: 1fr; gap: 8px; }
  .pjd-document-header .pjd-document-metadata { justify-content: flex-start; }
}

@container (max-width: 430px) {
  .incident-panel { overflow-x: hidden; }
  .incident-commandbar { align-items: flex-start; min-width: 0; }
  .incident-identity { padding-top: 4px; }
  .incident-status-control { display: none; }
  .incident-actions { flex-direction: column; align-items: stretch; }
  .incident-actions button { padding: 3px 5px; font-size: 9px; }
  .incident-workspace { display: block; min-width: 0; padding: 6px; }
  .incident-column + .incident-column { margin-top: 6px; }
  .upper-operations { grid-template-columns: 1fr; }
  .mission-topline { grid-template-columns: 36px 42px minmax(64px, 1fr) 16px; }
  .mission-topline .resource-edit { grid-column: 1 / span 2; }
  .mission-topline .mission-status { grid-column: 3; }
}

@media (prefers-reduced-motion: reduce) {
  .incident-panel * { scroll-behavior: auto !important; }
}

/* Incident interaction refinements */
.incident-identity > label { display: flex; }
.incident-identity > label select {
  height: 24px;
  border: 1px solid var(--incident-line);
  border-radius: 4px;
  outline: 0;
  background: #171a1f;
  padding: 0 22px 0 6px;
  color: var(--incident-text);
  font-weight: 750;
}
.incident-identity > label select:focus { border-color: var(--incident-blue); }
.incident-number { border-left: 0; padding-left: 0; color: var(--incident-text); font-weight: 800; }
.incident-emergency { flex: 0 0 28px; }
.incident-emergency-trigger { width: 28px; height: 25px; }

.talkgroup-select { position: relative; }
.talkgroup-select summary {
  display: flex;
  min-height: 24px;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--incident-line);
  border-radius: 4px;
  background: #171a1f;
  padding: 2px 5px;
  cursor: pointer;
  list-style: none;
}
.talkgroup-select summary::-webkit-details-marker { display: none; }
.talkgroup-badges { display: flex; flex-wrap: wrap; gap: 3px; }
.talkgroup-badge { border-radius: 8px; background: #234d70; padding: 2px 5px; color: #b9dcff; font-size: 8px; font-weight: 800; }
.talkgroup-placeholder { color: var(--incident-muted); font-size: 9px; }
.talkgroup-caret { color: var(--incident-muted); font-size: 8px; }
.talkgroup-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  z-index: 20;
  width: 210px;
  border: 1px solid var(--incident-line);
  border-radius: 6px;
  background: #1d2127;
  padding: 7px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .55);
}
.talkgroup-menu > strong { display: block; margin-bottom: 6px; font-size: 9px; text-transform: uppercase; }
.talkgroup-options { display: flex; flex-wrap: wrap; gap: 4px; }
.talkgroup-options button { border: 1px solid var(--incident-line); border-radius: 9px; background: #242930; padding: 2px 6px; font-size: 9px; cursor: pointer; }
.talkgroup-options button.is-selected { border-color: #397cb7; background: #234d70; color: #d6ebff; }
.talkgroup-input { width: 100%; margin-top: 7px; border: 1px solid var(--incident-line); border-radius: 4px; outline: 0; background: #121519; padding: 5px; color: var(--incident-text); font-size: 9px; }

.incident-search { z-index: 5; }
.location-results {
  position: absolute;
  top: calc(100% + 3px);
  right: 0;
  left: 0;
  z-index: 15;
  display: grid;
  gap: 3px;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--incident-line);
  border-radius: 5px;
  background: #1b1e23;
  padding: 4px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, .55);
}
.location-results[hidden] { display: none; }
.location-empty { margin: 0; padding: 7px; color: var(--incident-muted); font-size: 9px; }
.selected-location {
  position: relative;
  display: block;
  width: 100%;
  border: 0;
  border-top: 1px solid var(--incident-line-soft);
  border-bottom: 1px solid var(--incident-line-soft);
  border-radius: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.selected-location:hover { background: #28313b; }
.selected-location > button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.selected-location > button:first-child { padding-right: 34px; }
.selected-location > .clear-primary-location {
  position: absolute;
  top: 5px;
  right: 5px;
  width: auto;
  border: 1px solid #59616b;
  border-radius: 4px;
  padding: 2px 5px;
  color: #b8c0c9;
  font-size: 7px;
  text-transform: uppercase;
}
.selected-location > .clear-primary-location:hover { border-color: #ff7b72; color: #ffb8be; }
.selected-location > .location-coordinates {
  display: inline-block;
  margin-top: 5px;
  width: auto;
  border: 0;
  background: transparent;
  padding: 0;
  color: #78b8ee;
  font: 8px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-decoration: none;
  cursor: pointer;
}
.selected-location > .location-coordinates:hover { color: #b8dcfb; text-decoration: underline; }
.selected-location > .address-person-count,
.selected-location > .address-unit-count {
  display: block;
  margin-top: 5px;
  color: #aeb8c4;
  font-size: 8px;
  letter-spacing: 0;
  line-height: 1.25;
  text-transform: none;
}
.selected-location > .address-person-count[data-state="ready"] { color: #7ee787; }
.selected-location > .address-person-count[data-state="error"] { color: #ffa198; }
.selected-location > .address-unit-count[data-state="ready"] { color: #7ee787; }
.selected-location > .address-unit-count[data-state="error"] { color: #ffa198; }

.legevakt-routing-card { padding-bottom: 5px; }
.legevakt-routing-content { display: grid; gap: 1px; padding: 2px 5px 5px; }
.legevakt-routing-state { margin: 3px 1px; color: var(--incident-muted); font-size: 8px; line-height: 1.4; }
.legevakt-routing-state.is-warning { color: #e3b341; }
.legevakt-routing-state.is-error { color: #ffa198; }
.legevakt-routing-row { display: grid; grid-template-columns: 78px minmax(0, 1fr); align-items: start; gap: 5px; border-top: 1px solid var(--incident-line-soft); padding: 4px 1px; }
.legevakt-routing-row:first-child { border-top: 0; }
.legevakt-routing-row > span { padding-top: 3px; color: var(--incident-muted); font-size: 7px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.legevakt-routing-values { display: flex; min-width: 0; flex-wrap: wrap; gap: 3px; }
.legevakt-routing-copy, .legevakt-routing-retry { min-width: 0; border: 1px solid #384a59; border-radius: 4px; background: #1d2933; padding: 2px 5px; color: #b8dcfb; font-size: 8px; line-height: 1.3; text-align: left; cursor: pointer; }
.legevakt-routing-copy:hover, .legevakt-routing-retry:hover { border-color: #58a6ff; color: #fff; }
.legevakt-routing-retry { margin: 0 1px 3px; }
.address-units-info {
  position: relative;
  display: inline-grid !important;
  place-items: center;
  width: 13px;
  height: 13px;
  margin-left: 5px;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: #78b8ee !important;
  font: 700 8px/1 sans-serif !important;
  cursor: help;
}
.address-units-tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  z-index: 30;
  display: none !important;
  width: max-content;
  max-width: 240px;
  max-height: 160px;
  overflow: auto;
  border: 1px solid #59616b;
  border-radius: 4px;
  background: #11151a;
  padding: 6px;
  color: #d8dee7 !important;
  font: 9px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace !important;
  text-transform: none !important;
  white-space: normal;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .55);
}
.address-units-info:hover .address-units-tooltip,
.address-units-info:focus .address-units-tooltip { display: block !important; }
.location-details-row { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 5px 5px 0; }
.location-details-row > input,
.floor-field {
  width: 100%;
  min-width: 0;
  height: 25px;
  border: 1px solid var(--incident-line);
  border-radius: 4px;
  outline: 0;
  background: #131519;
  padding: 0 6px;
  color: var(--incident-text);
}
.floor-field { position: relative; display: block; padding: 0; overflow: hidden; cursor: text; }
.floor-field input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 36px 0 6px;
  color: var(--incident-text);
}
.floor-value-measure {
  position: absolute;
  visibility: hidden;
  font: inherit;
  white-space: pre;
}
.floor-suffix {
  position: absolute;
  top: 0;
  display: flex;
  height: 100%;
  align-items: center;
  color: var(--incident-muted);
  opacity: .7;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}
.floor-suffix[hidden] { display: none; }
.location-details-row > input:focus,
.floor-field:focus-within { border-color: var(--incident-blue); }
.location-description { display: block; padding: 5px; }
.location-description span { display: block; margin-bottom: 3px; color: var(--incident-muted); font-size: 8px; letter-spacing: .06em; text-transform: uppercase; }
.location-description textarea,
.new-note-form textarea,
.amk-note-form textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--incident-line);
  border-radius: 4px;
  outline: 0;
  background: #131519;
  padding: 5px 6px;
  color: var(--incident-text);
}
.location-description textarea:focus,
.new-note-form textarea:focus,
.amk-note-form textarea:focus { border-color: var(--incident-blue); }
.location-description textarea { min-height: 42px; line-height: 1.35; overflow-y: hidden; }

.related-block { flex: 1; }
.incident-tabs { display: grid; grid-template-columns: 1fr 1fr auto; border-bottom: 1px solid var(--incident-line-soft); }
.incident-tabs button { border: 0; border-right: 1px solid var(--incident-line-soft); background: transparent; padding: 6px 4px; color: var(--incident-muted); font-size: 9px; font-weight: 700; cursor: pointer; }
.incident-tabs button.is-active { background: #292f37; color: var(--incident-text); box-shadow: inset 0 -2px var(--incident-blue); }
.incident-tabs .related-add { width: 25px; border-right: 0; color: var(--incident-text); font-size: 13px; }
.related-panel[hidden] { display: none !important; }
.secondary-location-list { display: grid; gap: 4px; padding: 5px; }
.secondary-location-card { position: relative; min-width: 0; border: 1px solid var(--incident-line); border-radius: 6px; background: #202329; padding: 7px 24px 7px 7px; }
.secondary-location-card:hover { background: #28313b; }
.selected-location.secondary-location-card > .secondary-location-edit { padding-right: 0; }
.secondary-location-card > .secondary-location-edit strong,
.secondary-location-card > .secondary-location-edit small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.secondary-location-card > .secondary-location-edit strong { font-size: 11px; }
.secondary-location-card.address-only > .secondary-location-edit strong { font-size: 12px; }
.secondary-location-card > .secondary-location-edit small { margin-top: 2px; color: #c5cad0; font-size: 9px; }
.secondary-location-card > .remove-button { position: absolute; top: 4px; right: 4px; width: 16px; }
.secondary-location-card > .location-coordinates { margin-top: 4px; }

.timeline-list { width: 100%; min-width: 0; max-height: none; overflow: visible; }
.timeline-entry { display: block; width: 100%; min-width: 0; max-width: 100%; padding: 0; }
.timeline-entry.is-deleted { border-color: #a84f57; box-shadow: inset 0 0 0 1px #a84f5738; }
.timeline-entry-header { display: flex; min-width: 0; align-items: center; gap: 4px; border-bottom: 1px solid var(--incident-line-soft); padding: 3px 4px; }
.timeline-entry-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 1px; }
.timeline-entry-actions > .remove-button { flex: 0 0 16px; }
.timeline-icon-button { display: grid; width: 16px; height: 16px; place-items: center; border: 0; border-radius: 3px; background: transparent; padding: 2px; color: #777f89; cursor: pointer; }
.timeline-icon-button:hover { background: #303740; color: #dce3ea; }
.timeline-icon-button svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.35; }
.timeline-pin-button svg { fill: currentColor; stroke-width: .9; }
.timeline-pin-button.is-active { color: #efc04b; }
.timeline-share-button .share-disabled-slash { stroke: #ef5964; stroke-width: 2; }
.timeline-restore-button { color: #f1848d; }
.timeline-restore-button:hover { background: #493036; color: #ffb1b7; }
.timeline-meta { display: flex; min-width: 0; flex: 1; align-items: center; gap: 4px; }
.timeline-meta .time-edit { width: 48px; flex: 0 0 48px; font-weight: 800; }
.timeline-tags { display: flex; min-width: 0; flex: 1 1 0; align-items: center; gap: 3px; overflow: hidden; }
.timeline-tag { display: block; min-width: 0; flex: 1 1 0; overflow: hidden; border-left: 2px solid #6e7781; padding-left: 3px; color: #aeb5be; font-size: 7px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.timeline-tag.tag-patient { border-color: #e0878d; }
.timeline-tag.tag-resource { border-color: #6eb5f1; }
.timeline-tag.tag-caller { border-color: #d6b866; }
.timeline-content { position: relative; min-width: 0; padding: 3px 4px; }
.timeline-text { display: block; min-height: 22px; overflow: hidden; resize: none; field-sizing: content; line-height: 1.35; white-space: pre-wrap; }
.note-authorship {
  display: flex;
  min-height: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--incident-line-soft);
  padding: 2px 7px 3px;
  color: #747d87;
  font: 7px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
}
.note-creator { color: #87919c; }
.note-editor { color: #68727d; }
.inline-tag-suggestions {
  position: absolute;
  top: calc(100% + 3px);
  left: 3px;
  z-index: 18;
  display: grid;
  width: min(245px, calc(100vw - 40px));
  max-height: 210px;
  overflow: auto;
  border: 1px solid var(--incident-line);
  border-radius: 6px;
  background: #1a1e23;
  padding: 4px;
  box-shadow: 0 14px 38px rgba(0, 0, 0, .58);
}
.inline-tag-suggestions > p { margin: 0; padding: 7px; color: var(--incident-muted); font-size: 9px; }
.inline-tag-suggestions button {
  display: grid;
  grid-template-columns: 55px minmax(0, 1fr);
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  padding: 5px 6px;
  color: var(--incident-text);
  text-align: left;
  cursor: pointer;
}
.inline-tag-suggestions button:hover,
.inline-tag-suggestions button.is-highlighted { border-color: #3e719d; background: #23384a; }
.inline-tag-suggestions small { color: #80b7e7; font-size: 8px; text-transform: uppercase; }
.inline-tag-suggestions strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.slash-command-suggestions {
  position: absolute;
  top: calc(100% + 3px);
  left: 3px;
  z-index: 19;
  display: grid;
  width: min(270px, calc(100vw - 40px));
  max-height: 220px;
  overflow: auto;
  border: 1px solid #495666;
  border-radius: 6px;
  background: #181d23;
  padding: 4px;
  box-shadow: 0 14px 38px rgba(0, 0, 0, .62);
}
.slash-command-level { padding: 4px 6px 5px; color: #7eb8e9; font-size: 7px; font-weight: 850; letter-spacing: .1em; }
.slash-command-suggestions button {
  display: grid;
  gap: 2px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  padding: 6px;
  color: var(--incident-text);
  text-align: left;
  cursor: pointer;
}
.slash-command-suggestions button:hover,
.slash-command-suggestions button.is-highlighted { border-color: #4581b4; background: #23394b; }
.slash-command-suggestions strong { color: #d8ebfb; font: 750 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; }
.slash-command-suggestions span { color: var(--incident-muted); font-size: 8px; }
.tag-picker { position: relative; display: inline-block; flex: 0 0 auto; margin: 0 0 0 2px; }
.tag-picker summary { color: var(--incident-muted); font-size: 8px; cursor: pointer; list-style: none; }
.tag-picker summary::-webkit-details-marker { display: none; }
.tag-picker-menu { position: absolute; z-index: 12; display: grid; width: 170px; gap: 4px; border: 1px solid var(--incident-line); border-radius: 5px; background: #1b1e23; padding: 5px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.tag-picker-menu select { height: 24px; border-color: var(--incident-line); background: #15181d; font-size: 9px; }
.new-note-form { align-items: end; }
.new-note-form textarea { min-height: 44px; resize: vertical; }

.new-note-form.timeline-draft {
  display: block;
  margin: 0;
  border: 1px dashed #48515b;
  border-radius: 5px;
  background: rgba(32, 35, 41, .45);
  padding: 4px;
  opacity: .58;
  transition: border-color 120ms ease, background-color 120ms ease, opacity 120ms ease;
}
.new-note-form.timeline-draft:focus-within {
  border-color: #477ca8;
  background: #202329;
  opacity: 1;
}
.timeline-draft > .timeline-content { padding: 0; }
.new-note-form.timeline-draft textarea {
  min-height: 30px;
  overflow: hidden;
  resize: none;
  border-color: transparent;
  background: transparent;
  line-height: 1.35;
}
.new-note-form.timeline-draft textarea:focus { border-color: #3c6689; background: #15191e; }
.timeline-clinical-badges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-top: 1px solid var(--incident-line-soft); }
.timeline-clinical-badge { display: block; min-width: 0; width: 100%; overflow: hidden; border: 1px solid transparent; border-radius: 4px; padding: 4px 6px; color: #fff; font-size: 9px; font-weight: 750; line-height: 1.2; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.timeline-clinical-badge.is-critical { border-color: #c4545e; background: #8f2d38; }
.timeline-clinical-badge.is-medication { border-color: #438cc7; background: #235f91; }
.timeline-clinical-badge:hover { filter: brightness(1.12); }
.clinical-sharing-controls { display: flex; flex-wrap: wrap; gap: 8px 18px; border: 1px solid #394a58; border-radius: 6px; background: #18232c; padding: 8px 10px; }
.clinical-sharing-option { display: inline-flex; align-items: center; gap: 6px; color: #d3e0ea; font-size: 10px; font-weight: 700; cursor: pointer; }
.clinical-sharing-option input { width: 14px; height: 14px; margin: 0; accent-color: #3c94d6; }
.shared-clinical-preview-dialog { width: min(680px, calc(100% - 24px)); }
.shared-clinical-preview-dialog pre { max-height: min(70vh, 720px); overflow: auto; margin: 0; padding: 14px; color: #dce8f2; font: 11px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; }

.patient-card { align-items: flex-start; padding-left: 4px; }
.patient-identity { display: flex; flex: 0 0 42px; flex-direction: column; align-items: center; gap: 3px; }
.patient-demographics { display: grid; grid-template-columns: 18px 22px; width: 42px; gap: 1px; }
.patient-demographics input { height: 17px; padding: 0; color: var(--incident-muted); font-size: 10px; font-weight: 700; text-align: center; }
.patient-address-actions { display: grid; gap: 2px; justify-items: center; }
.patient-address-action {
  display: grid;
  width: 22px;
  height: 17px;
  place-items: center;
  border: 1px solid #465765;
  border-radius: 3px;
  background: #202d37;
  padding: 2px;
  color: #9fcbed;
  cursor: pointer;
}
.patient-address-action svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
.patient-address-action:hover:not(:disabled) { border-color: var(--incident-blue); background: #294153; color: #d7edff; }
.patient-address-action:disabled { cursor: not-allowed; opacity: .35; }
.patient-nin-row { display: flex; height: 20px; align-items: center; gap: 4px; }
.patient-name-row { display: flex; height: 18px; min-width: 0; align-items: center; gap: 3px; }
.patient-name-row .incident-edit { flex: 1 1 auto; }
.incident-edit.patient-note-edit {
  display: block;
  height: 17px;
  margin: 1px 2px;
  border: 0;
  border-bottom: 1px dotted #66717c;
  border-radius: 0;
  background: transparent;
  padding: 0;
  color: #bfc8d1;
  font: inherit;
  font-size: 12px;
  line-height: 1.35;
}
.incident-edit.patient-note-edit::placeholder { color: #77818b; font-style: italic; opacity: 1; }
.incident-edit.patient-note-edit:hover { border: 0; border-bottom: 1px dotted #9aa7b3; }
.incident-edit.patient-note-edit:focus { border: 0; border-bottom: 1px solid var(--incident-blue); background: transparent; }
.incident-edit.patient-note-collapsed { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
textarea.incident-edit.patient-note-expanded {
  min-height: 17px;
  overflow: hidden;
  overflow-wrap: anywhere;
  resize: none;
  white-space: pre-wrap;
}
.patient-birth-date-row {
  display: flex;
  min-height: 19px;
  align-items: center;
  margin: 1px 2px;
}
.patient-birth-date-edit {
  width: 11ch;
  height: 18px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  padding: 1px 3px;
  color: #c8d2dc;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .03em;
}
.patient-birth-date-edit::placeholder { color: #66727d; text-transform: lowercase; }
.patient-birth-date-edit:hover:not(:read-only) { border-color: #4b6275; background: #19232b; }
.patient-birth-date-edit:focus { border-color: var(--incident-blue); outline: 0; background: #141b21; box-shadow: 0 0 0 2px rgba(88,166,255,.12); }
.patient-birth-date-edit.is-invalid { border-color: #b45b62; color: #ffb3b8; }
.patient-birth-date-edit.person-locked { color: #91a0ad; cursor: default; }
.patient-nin-row .patient-id-edit {
  flex: 0 0 14ch;
  width: 14ch;
  max-width: 14ch;
  color: #c8cdd3;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}
.kj-indicator { position: relative; display: inline-grid; flex: 0 0 18px; width: 18px; height: 18px; place-items: center; overflow: visible; border: 0; border-radius: 50%; background: transparent; padding: 0; }
.kj-indicator svg { display: block; width: 18px; height: 18px; }
.kj-sharing-marker,
.kj-verified-marker { position: absolute; z-index: 1; display: grid; width: 9px; height: 9px; place-items: center; border: 1px solid #111820; border-radius: 50%; color: #fff; font-size: 7px; font-weight: 900; line-height: 1; box-shadow: 0 1px 2px #0008; }
.kj-sharing-marker { right: -4px; bottom: -3px; background: #2788d8; }
.kj-verified-marker { top: -3px; right: -4px; background: #2d9b58; }
.kj-clickable { cursor: pointer; }
.kj-clickable:hover { box-shadow: 0 0 0 2px rgba(117, 182, 238, .45); }
.kj-clickable:focus-visible { outline: 2px solid #75b6ee; outline-offset: 2px; }
.kj-loading svg { animation: kj-pulse 1.1s ease-in-out infinite; }
@keyframes kj-pulse { 50% { opacity: .45; } }
.pjd-document-badge {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  min-width: 27px;
  height: 18px;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 1px solid #58636f;
  border-radius: 9px;
  background: #2b323a;
  padding: 0 5px 0 4px;
  color: #d9e2ea;
  font-size: 8px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.pjd-document-badge[hidden] { display: none; }
.pjd-document-icon { position: relative; display: inline-grid; place-items: center; }
.pjd-document-badge svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.25; }
.pjd-sharing-marker { position: absolute; right: -4px; bottom: -4px; display: grid; width: 8px; height: 8px; place-items: center; border: 1px solid #111820; border-radius: 50%; background: #2788d8; color: #fff; font-size: 6px; font-weight: 900; line-height: 1; box-shadow: 0 1px 2px #0008; }
.pjd-document-badge:is(button) { cursor: pointer; }
.pjd-document-badge:is(button):hover { border-color: #58a6ff; background: #263b4e; color: #dff1ff; }
.hospital-routing-indicator {
  display: inline-grid;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid #4e6575;
  border-radius: 4px;
  background: #21313c;
  padding: 2px;
  color: #9ed5f8;
}
.hospital-routing-indicator svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.35; }
.hospital-routing-indicator:is(button) { cursor: pointer; }
.hospital-routing-indicator:is(button):hover { border-color: #58a6ff; background: #29475b; color: #e1f4ff; }
.hospital-routing-indicator.is-waiting, .hospital-routing-indicator.is-loading { opacity: .6; animation: kj-pulse 1.1s ease-in-out infinite; }
.hospital-routing-indicator.is-error { border-color: #75444a; background: #38252a; color: #ff9da4; }

.proposal-list { max-height: none; overflow: visible; }
.proposal-group { min-height: 39px; border: 1px dashed transparent; border-radius: 5px; padding: 2px; }
.proposal-group:has(.is-dragging),
.proposal-group:hover { border-color: #39424d; }
.proposal-group h3 { display: flex; align-items: center; justify-content: space-between; padding: 1px 2px; }
.proposal-group h3 small { display: grid; min-width: 14px; height: 14px; place-items: center; border-radius: 7px; background: #303640; color: var(--incident-muted); font-size: 7px; }
.proposal-row { position: relative; grid-template-columns: 13px minmax(0, 1fr) 16px; align-items: start; cursor: grab; }
.proposal-row.is-dragging { opacity: .45; }
.drag-handle { color: #6f7781; font-size: 12px; }
.proposal-main { display: grid; grid-template-columns: 38px minmax(60px, 1fr); min-width: 0; gap: 2px; }
.proposal-secondary { display: grid; grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 3px; margin-top: 2px; }
.proposal-comment { color: var(--incident-muted); font-size: 8px; }
.proposal-moves { display: flex; gap: 1px; }
.proposal-moves button { width: 16px; height: 16px; border: 1px solid var(--incident-line); border-radius: 3px; background: #272c33; padding: 0; color: #b9c0c8; font-size: 7px; font-weight: 850; cursor: pointer; }
.proposal-moves button:hover { border-color: var(--incident-blue); }
.proposal-empty { min-height: 22px; border: 1px dashed #383e46; border-radius: 4px; padding: 5px; text-align: center; }

.mission-topline { grid-template-columns: 34px 42px minmax(62px, .8fr) minmax(58px, .7fr) minmax(68px, 1fr) minmax(66px, .8fr) auto 16px; }
.add-transport-button { height: 18px; border: 1px solid var(--incident-line); border-radius: 3px; background: #262c33; padding: 0 4px; font-size: 7px; cursor: pointer; }
.transport-list { display: grid; }
.transport-row {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(85px, .8fr) 21px minmax(52px, 1fr) 12px 18px minmax(52px, 1fr) 16px;
  align-items: center;
  gap: 2px;
  border-top: 1px solid var(--incident-line-soft);
  padding: 3px 4px;
}
.proposal-row:has(.card-confirmation),
.transport-row:has(.card-confirmation) { min-height: 40px; }
.transport-number { color: var(--incident-blue); font-size: 8px; font-weight: 800; }
.transport-patient { border-color: #394957; background: #1a252e; color: #bfd8ec; font-size: 8px; }

.amk-note-form { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 6px; border-top: 1px solid var(--incident-line); padding: 10px 14px 14px; }
.amk-note-form button,
.incident-dialog footer button { border: 1px solid var(--incident-line); border-radius: 4px; background: #292e35; padding: 6px 9px; color: var(--incident-text); cursor: pointer; }
.dialog-form { display: grid; gap: 9px; padding: 14px; }
.dialog-form label { display: grid; gap: 4px; color: var(--incident-muted); font-size: 9px; }
.dialog-form input,
.dialog-form textarea { width: 100%; border: 1px solid var(--incident-line); border-radius: 4px; outline: 0; background: #121519; padding: 7px; color: var(--incident-text); }
.split-fields { display: grid; grid-template-columns: 95px 1fr; gap: 7px; }
.incident-dialog footer { display: flex; justify-content: flex-end; gap: 6px; border-top: 1px solid var(--incident-line); padding: 10px 14px; }
.incident-dialog footer .primary-button { border-color: #367bbb; background: #235f96; }

@container (max-width: 980px) {
  .incident-workspace { grid-template-columns: minmax(180px, .72fr) minmax(280px, 1.28fr); min-width: 500px; }
  .incident-commandbar { min-width: 500px; }
  .incident-operations-column { grid-column: 1 / -1; }
  .upper-operations { grid-template-columns: minmax(210px, .9fr) minmax(270px, 1.1fr); }
}

@container (max-width: 680px) {
  .incident-workspace { display: block; min-width: 0; padding: 6px; }
  .incident-commandbar { min-width: 0; }
  .incident-column + .incident-column { margin-top: 6px; }
  .upper-operations { grid-template-columns: 1fr; }
  .incident-location-column,
  .incident-notes-column,
  .incident-operations-column { display: flex; }
  .timeline-list,
  .patient-list,
  .proposal-list,
  .mission-list { max-height: none; overflow: visible; }
}

@media (max-width: 640px) {
  .pjd-browser { grid-template-columns: 1fr; grid-template-rows: minmax(130px, .6fr) minmax(220px, 1.4fr); }
  .patient-history-sources { border-right: 0; border-bottom: 1px solid var(--incident-line); }
}

@container (max-width: 500px) {
  .incident-commandbar { position: static; flex-direction: column; align-items: stretch; gap: 5px; }
  .incident-identity { flex-wrap: wrap; }
  .incident-actions { justify-content: flex-end; }
  .incident-status-control { margin-left: auto; }
  .proposal-main { grid-template-columns: 35px 1fr; }
  .proposal-moves { flex-direction: column; }
  .mission-topline { grid-template-columns: 34px 42px 1fr 16px; }
  .mission-topline .order-edit { grid-column: 1; grid-row: 1; }
  .mission-topline .time-edit { grid-column: 2; grid-row: 1; }
  .mission-topline .mission-type { grid-column: 3; grid-row: 1; }
  .mission-topline > .remove-button { grid-column: 4; grid-row: 1; }
  .mission-topline .resource-edit { grid-column: 1 / span 2; }
  .mission-topline .mission-status { grid-column: 3; }
  .mission-topline .mission-district { grid-column: 4; }
  .mission-topline .add-transport-button { grid-column: 1 / span 4; }
  .transport-row { grid-template-columns: 20px minmax(90px, 1fr) 20px 1fr 12px 18px 1fr 16px; }
}

/* Compact mission and transport workflow. */
.mission-card { overflow: visible; }
.mission-card + .mission-card { margin-top: 4px; }
.mission-topline {
  grid-template-columns: 35px 24px 48px minmax(92px, .95fr) 64px minmax(94px, .85fr) 22px minmax(76px, .7fr) 26px 16px;
  gap: 3px;
}
.mission-topline datalist { display: none; }
.mission-number {
  display: block;
  width: 5ch;
  max-width: 5ch;
  height: 20px;
  overflow: hidden;
  border-radius: 3px;
  padding: 5px 0 0 4px;
  color: #9fcdf5;
  font: 850 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
  text-align: left;
  white-space: nowrap;
}
.mission-card.is-closed .mission-number { background: #c99a22; color: #18130a; box-shadow: inset 0 0 0 1px #f1c859; }
.mission-emergency { min-width: 0; }
.mission-emergency-trigger { width: 24px; height: 20px; border: 1px solid #58636d; border-radius: 3px; background: #343b43; padding: 0; color: #fff; font-size: 9px; font-weight: 900; cursor: pointer; }
.mission-emergency-trigger.is-inherited { filter: saturate(.55); opacity: .58; }
.mission-emergency-trigger[data-emergency-code="U"], .mission-emergency-option[data-emergency-code="U"] strong { background: #59636e; color: #fff; }
.mission-emergency-trigger[data-emergency-code="A"], .mission-emergency-option[data-emergency-code="A"] strong { background: #a93642; color: #fff; }
.mission-emergency-trigger[data-emergency-code="H"], .mission-emergency-option[data-emergency-code="H"] strong { background: #b87820; color: #17120a; }
.mission-emergency-trigger[data-emergency-code="V1"], .mission-emergency-option[data-emergency-code="V1"] strong { background: #4d8b65; color: #fff; }
.mission-emergency-trigger[data-emergency-code="V2"], .mission-emergency-option[data-emergency-code="V2"] strong { background: #286b49; color: #fff; }
.mission-emergency-popup { position: fixed; z-index: 1000; inset: auto; display: grid; width: 170px; gap: 3px; margin: 0; border: 1px solid #52606d; border-radius: 6px; background: #171c21; padding: 6px; box-shadow: 0 12px 30px #000c; }
.mission-emergency-popup:not(:popover-open) { display: none; }
.mission-emergency-option { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 7px; border: 0; border-radius: 4px; background: transparent; padding: 3px; color: #dce3e9; text-align: left; cursor: pointer; }
.mission-emergency-option:hover, .mission-emergency-option.is-active { background: #293a48; }
.mission-emergency-option strong { display: grid; width: 27px; height: 22px; place-items: center; border-radius: 3px; background: #424b54; font-size: 9px; }
.mission-emergency-option span { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.mission-emergency-follow { border: 0; border-radius: 4px; background: transparent; padding: 5px 6px; color: #aab5bf; font-size: 8px; text-align: left; cursor: pointer; }
.mission-emergency-follow:hover, .mission-emergency-follow.is-active { background: #293a48; color: #e5edf3; }
.mission-topline .time-edit { width: 48px; min-width: 48px; padding-inline: 4px; font-variant-numeric: tabular-nums; }
.mission-topline .resource-edit { min-width: 0; }
.mission-status-actions { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr) auto; gap: 2px; }
.mission-alert-button { display: grid; width: 22px; height: 20px; place-items: center; border: 1px solid #8d6d2c; border-radius: 3px; background: #46391f; padding: 2px; color: #ffd474; cursor: pointer; }
.mission-alert-button:hover { border-color: #d5a846; background: #5a4723; color: #fff1bd; }
.mission-alert-button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.35; }
.mission-completion { min-width: 0; }
.mission-completion-trigger { display: grid; width: 16px; height: 20px; place-items: center; border: 0; border-radius: 3px; background: transparent; padding: 1px; color: #84909a; cursor: pointer; }
.mission-completion-trigger:hover { background: #2b3944; color: #cfe8fa; }
.mission-completion.is-set .mission-completion-trigger { background: #594719; color: #ffd866; }
.mission-completion-trigger svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.35; }
.mission-completion-popup { position: fixed; z-index: 1000; inset: auto; display: grid; width: 190px; margin: 0; border: 1px solid #52606d; border-radius: 6px; background: #171c21; padding: 7px; box-shadow: 0 12px 30px #000c; }
.mission-completion-popup:not(:popover-open) { display: none; }
.mission-completion-select { width: 100%; height: 27px; border: 1px solid #46515d; border-radius: 4px; background: #101419; padding: 3px 20px 3px 6px; color: #e1e7ec; font-size: 9px; }
.operation-pin, .continue-transport-button {
  display: grid;
  width: 22px;
  height: 20px;
  place-items: center;
  border: 1px solid #46515c;
  border-radius: 3px;
  background: #242a31;
  padding: 2px;
  color: #aeb8c2;
  cursor: pointer;
}
.operation-pin svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.35; }
.operation-pin.is-set { border-color: #af8420; background: #594719; color: #ffd866; }
.operation-pin:hover, .continue-transport-button:hover { border-color: var(--incident-blue); color: #d9efff; }
.operation-status { min-width: 0; }
.operation-status-trigger {
  position: relative;
  display: flex;
  width: 100%;
  height: 20px;
  align-items: center;
  overflow: hidden;
  border: 1px solid #485461;
  border-radius: 3px;
  background: #252c33;
  padding: 0 13px 0 5px;
  color: #d7dde3;
  font-size: 8px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  text-align: left;
}
.operation-status-trigger::after { position: absolute; top: 6px; right: 5px; content: "▾"; color: #89939d; font-size: 7px; }
.status-none .operation-status-trigger { color: #89939d; }
.status-new .operation-status-trigger { border-left-color: #87909a; }
.status-alerted .operation-status-trigger, .status-departed .operation-status-trigger { border-left-color: #d9a62e; }
.status-responding .operation-status-trigger { border-left-color: #e77449; }
.status-on_scene .operation-status-trigger, .status-arrived .operation-status-trigger { border-left-color: #5da8e5; }
.status-available .operation-status-trigger { border-left-color: #55b477; }
.status-time-popup {
  position: fixed;
  z-index: 1000;
  inset: auto;
  display: grid;
  width: 224px;
  box-sizing: border-box;
  gap: 4px;
  border: 1px solid #52606d;
  border-radius: 6px;
  background: #171c21;
  padding: 7px;
  box-shadow: 0 12px 30px #000c;
}
.status-time-popup:not(:popover-open) { display: none; }
.status-time-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) 25px 18px; align-items: center; gap: 4px; color: #aab3bc; font-size: 8px; }
.status-time-row input { min-width: 0; height: 24px; border: 1px solid #3e4751; border-radius: 3px; background: #101419; padding: 2px 3px; color: #dce3e9; font-size: 8px; }
.status-time-now { width: 25px; height: 20px; border: 1px solid #46515d; border-radius: 3px; background: #252d35; padding: 0; color: #cbd5dd; font-size: 8px; cursor: pointer; }
.status-time-now:hover { border-color: #6686a0; background: #30404d; color: #fff; }
.status-time-clear { width: 18px; height: 20px; border: 0; border-radius: 3px; background: transparent; color: #aeb5bd; cursor: pointer; }
.status-time-clear:hover { background: #52292e; color: #ff9ba3; }
.status-time-clear:disabled { cursor: not-allowed; opacity: .22; }
.status-time-clear:disabled:hover { background: transparent; color: #aeb5bd; }
.operation-location-popover, .destination-results {
  position: fixed;
  z-index: 1000;
  inset: auto;
  margin: 0;
  display: grid;
  width: min(310px, calc(100vw - 16px));
  box-sizing: border-box;
  max-height: 220px;
  overflow: auto;
  border: 1px solid #52606d;
  border-radius: 6px;
  background: #171c21;
  padding: 5px;
  box-shadow: 0 12px 30px #000c;
}
.operation-location-popover:not(:popover-open), .destination-results:not(:popover-open) { display: none; }
.operation-location-popover { grid-template-columns: minmax(0, 1fr) auto; }
.operation-location-current { display: grid; grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; margin-bottom: 3px; border-bottom: 1px solid #343e47; padding: 3px 2px 7px; }
.operation-location-current span { min-width: 0; }
.operation-location-current strong, .operation-location-current small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.operation-location-current strong { color: #e2e8ed; font-size: 9px; }
.operation-location-current small { margin-top: 2px; color: #929da7; font-size: 7px; }
.operation-location-edit { min-height: 24px; border: 1px solid #4b5965; border-radius: 4px; background: #27313a; padding: 3px 7px; color: #d4dce3; font-size: 8px; cursor: pointer; }
.operation-location-edit:hover { border-color: var(--incident-blue); }
.operation-location-popover input { min-width: 0; height: 27px; border: 1px solid #46515d; border-radius: 4px; background: #101419; padding: 4px 6px; color: #e4e9ed; font-size: 9px; }
.operation-location-clear { border: 1px solid #4b555f; border-radius: 4px; background: #292f36; color: #c8ced4; font-size: 8px; cursor: pointer; }
.operation-location-results { position: static; display: grid; grid-column: 1 / -1; width: auto; max-height: 175px; margin-top: 4px; overflow: auto; border: 0; padding: 0; box-shadow: none; }
.operation-location-results.destination-results { position: fixed; display: grid; width: min(360px, calc(100vw - 16px)); max-height: 220px; margin: 0; overflow: auto; border: 1px solid #52606d; padding: 5px; box-shadow: 0 12px 30px #000c; }
.operation-location-results.destination-results:not(:popover-open) { display: none; }
.operation-location-result { display: grid; gap: 2px; border: 0; border-radius: 3px; background: transparent; padding: 5px; color: #dce3e9; text-align: left; cursor: pointer; }
.operation-location-result:hover, .operation-location-result.is-active { background: #273947; }
.operation-location-result strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.operation-location-result small { overflow: hidden; color: #8e99a4; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.transport-row {
  grid-template-columns: 20px 74px minmax(74px, .68fr) 18px 22px 16px minmax(130px, 1.5fr) 22px 16px;
  gap: 3px;
}
.transport-patient { width: 74px; min-width: 74px; }
.transport-destination-control { position: relative; min-width: 0; }
.transport-destination-control .transport-destination { width: 100%; }
.transport-destination-control.is-set .transport-destination { padding-right: 20px; }
.transport-destination-clear { position: absolute; top: 1px; right: 1px; display: grid; width: 18px; height: 18px; place-items: center; border: 0; border-radius: 3px; background: #202830; padding: 2px; color: #aeb8c2; cursor: pointer; }
.transport-destination-clear:hover { background: #4a292f; color: #ffb8be; }
.transport-destination-clear svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.35; }
.transport-destination.coordinates-missing { color: #a9adb2; font-style: italic; }
.continue-transport-button svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; transform: rotate(-90deg); }
.add-transport-button { display: grid; width: 26px; height: 20px; place-items: center; padding: 1px; color: #b9d8ee; }
.add-transport-button svg { width: 20px; height: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.25; }
.mission-section-heading { gap: 6px; }
.incident-section-heading .mission-add-controls { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.incident-section-heading .mission-add-shortcut { min-width: 25px; height: 20px; padding: 1px 4px; font-size: 8px; font-weight: 800; }
.mission-type-add-input { width: 92px; height: 20px; border: 1px solid #46515d; border-radius: 3px; background: #171c21; padding: 2px 5px; color: #dce3e9; font-size: 8px; }

@container (max-width: 720px) {
  .mission-topline { grid-template-columns: 40px 24px 48px minmax(88px, 1fr) 64px minmax(94px, .9fr) 22px; }
  .mission-topline .mission-district { grid-column: 4 / span 2; }
  .mission-topline .add-transport-button { grid-column: 6; }
  .transport-row { grid-template-columns: 20px 68px minmax(68px, .7fr) 18px 22px 16px minmax(110px, 1.4fr) 22px 16px; }
}
