:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #667085;
  --surface: #ffffff;
  --canvas: #f4f6fa;
  --line: #e4e7ec;
  --brand: #3b247b;
  --brand-soft: #eeeafb;
  --cyan: #117e91;
  --amber: #a15c00;
  --danger: #b42318;
  --success: #067647;
  --shadow: 0 12px 32px rgb(16 24 40 / 8%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 52px);
  color: #fff;
  background: linear-gradient(115deg, #29155f, #4c2f91);
}

.brand {
  color: inherit;
  font-size: 1.2rem;
  font-weight: 750;
  text-decoration: none;
}

.tagline {
  margin: 2px 0 0;
  color: rgb(255 255 255 / 70%);
  font-size: 0.78rem;
}

.identity {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.83rem;
}

.identity strong {
  padding: 4px 9px;
  border: 1px solid rgb(255 255 255 / 35%);
  border-radius: 999px;
  text-transform: capitalize;
}

.preview-access {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1920px, calc(100% - clamp(24px, 3vw, 56px)));
  margin: 18px auto -8px;
  padding: 13px 15px;
  gap: 18px;
  border: 1px solid #f5d88b;
  border-radius: 10px;
  color: #764c00;
  background: #fffaeb;
}

.preview-access p {
  max-width: 860px;
  margin: 4px 0 0;
  font-size: 0.84rem;
  line-height: 1.45;
}

.preview-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.disabled-action {
  display: inline-flex;
  cursor: help;
}

.disabled-action button {
  pointer-events: none;
}

.page-shell {
  width: min(1920px, calc(100% - clamp(24px, 3vw, 56px)));
  margin: 28px auto 56px;
}

.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: -0.035em;
}

h2 {
  margin: 0;
  font-size: 1.35rem;
}

h3 {
  margin: 0 0 10px;
  font-size: 0.92rem;
}

.subtitle {
  margin: 7px 0 0;
  color: var(--muted);
}

.updated {
  min-width: 160px;
  text-align: right;
}

.updated span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.updated strong {
  font-size: 0.88rem;
}

.notice {
  margin-bottom: 18px;
  padding: 13px 15px;
  border: 1px solid #f5d88b;
  border-radius: 10px;
  color: #764c00;
  background: #fffaeb;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.location-search-card {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(320px, 1.2fr);
  gap: 18px 28px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.location-search-form {
  display: flex;
  align-items: end;
  gap: 8px;
}

.location-search-form input {
  min-height: 42px;
}

.location-search-status {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.location-results {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.location-result {
  width: 100%;
  min-height: 70px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: #fafaff;
  text-align: left;
}

.location-result:hover,
.location-result:focus-visible {
  border-color: var(--brand);
}

.location-result strong,
.location-result span {
  display: block;
}

.location-result span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
}

.view-tabs,
.admin-actions,
.dashboard-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.scope-control {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.scope-control select {
  width: auto;
  min-width: 180px;
  min-height: 38px;
  padding: 7px 9px;
}

.scope-summary {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.dashboard-filters {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) repeat(7, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.dashboard-filters label {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.dashboard-filters input,
.dashboard-filters select {
  min-height: 38px;
  margin-top: 5px;
  padding: 7px 9px;
}

.filter-actions {
  display: flex;
  align-items: end;
  gap: 8px;
  grid-column: 1 / -1;
}

.filter-message {
  min-height: 18px;
  margin: 0;
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.76rem;
}

.filter-message.is-error {
  color: var(--danger);
  font-weight: 700;
}

.data-quality-pill {
  padding: 8px 10px;
  border: 1px solid #f5d88b;
  border-radius: 999px;
  color: #764c00;
  background: #fffaeb;
  font-size: 0.76rem;
  font-weight: 700;
}

.view-tab,
.button {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 700;
}

.view-tab {
  border: 1px solid var(--line);
  color: #475467;
  background: var(--surface);
}

.view-tab:hover,
.view-tab:focus-visible,
.view-tab.is-active {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
}

.view-tab span {
  margin-left: 3px;
  color: var(--muted);
  font-size: 0.76rem;
}

.view-tab .tab-count {
  display: inline-block;
  min-width: 1.4em;
  margin-left: 6px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: right;
  vertical-align: middle;
}

.button {
  border: 1px solid transparent;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.button-primary {
  color: #fff;
  background: var(--brand);
}

.button-secondary {
  border-color: var(--line);
  color: var(--ink);
  background: var(--surface);
}

.button-quiet {
  border-color: var(--line);
  color: var(--muted);
  background: transparent;
}

.button-danger {
  color: #fff;
  background: var(--danger);
}

.button:hover:not(:disabled) {
  filter: brightness(0.95);
}

.dashboard-filterbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.dashboard-search-form {
  display: flex;
  width: min(720px, 100%);
  gap: 8px;
}

.dashboard-search-form input {
  min-width: 220px;
  min-height: 40px;
}

.table-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.table-status {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.table-card > .table-scroll > table {
  table-layout: fixed;
}

.table-card > .table-scroll > table > thead th:nth-child(1) {
  width: 7.5%;
}

.table-card > .table-scroll > table > thead th:nth-child(2),
.table-card > .table-scroll > table > thead th:nth-child(3) {
  width: 7%;
}

.table-card > .table-scroll > table > thead th:nth-child(4),
.table-card > .table-scroll > table > thead th:nth-child(14) {
  width: 6%;
}

.table-card > .table-scroll > table > thead th:nth-child(5),
.table-card > .table-scroll > table > thead th:nth-child(6) {
  width: 5.5%;
}

.table-card > .table-scroll > table > thead th:nth-child(7),
.table-card > .table-scroll > table > thead th:nth-child(12) {
  width: 4%;
}

.table-card > .table-scroll > table > thead th:nth-child(8) {
  width: 4.5%;
}

.table-card > .table-scroll > table > thead th:nth-child(9) {
  width: 10.5%;
}

.table-card > .table-scroll > table > thead th:nth-child(10) {
  width: 7%;
}

.table-card > .table-scroll > table > thead th:nth-child(11) {
  width: 8%;
}

.table-card > .table-scroll > table > thead th:nth-child(13) {
  width: 3.5%;
}

.table-card > .table-scroll > table > thead th:nth-child(15) {
  width: 14%;
}

th,
td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table-card td {
  overflow-wrap: anywhere;
}

th {
  color: #475467;
  background: #f9fafb;
  font-size: 0.72rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  overflow-wrap: normal;
  white-space: normal;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #fafaff;
}

tbody tr.is-masked {
  color: #7a7f8a;
  background: #f8f8fa;
}

tbody tr.is-partially-masked {
  background: #fffdf5;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.badge-comf {
  color: #4b188a;
  background: #efe4ff;
}

.badge-iof {
  color: #075f6c;
  background: #dff8fb;
}

.badge-dvrcf {
  color: #7a4100;
  background: #fff0d5;
}

.badge-mask {
  color: #475467;
  background: #eaecf0;
}

.badge-mask-state {
  line-height: 1.25;
  text-align: center;
  white-space: normal;
}

.badge-mask-none {
  color: var(--success);
  background: #dcfae6;
}

.badge-mask-partial {
  color: #7a4100;
  background: #fff0d5;
}

.badge-mask-all {
  color: #475467;
  background: #eaecf0;
}

.badge-ownership-owned {
  color: var(--success);
  background: #dcfae6;
}

.badge-ownership-excluded {
  color: #475467;
  background: #eaecf0;
}

.badge-ownership-unknown,
.badge-ownership-conflict {
  color: #7a4100;
  background: #fff0d5;
}

.subject {
  max-width: 240px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.78rem;
}

.location {
  min-width: 0;
}

.postal-code {
  min-width: 0;
}

.location-fact {
  min-width: 0;
}

.affected-lifts,
.device-model {
  min-width: 0;
}

.affected-lifts,
.lmd-id,
.entity-id,
.state-identity {
  overflow-wrap: anywhere;
}

.problem-identity-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.problem-identity-line strong {
  font-size: 0.78rem;
}

.affected-member-summary {
  font-weight: 750;
}

.location-link {
  padding: 0;
  border: 0;
  color: var(--brand);
  background: transparent;
  font-weight: 750;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: rgb(59 36 123 / 30%);
  text-underline-offset: 2px;
}

.location-sub-link {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: rgb(102 112 133 / 30%);
  text-underline-offset: 2px;
}

.location-link:hover,
.location-sub-link:hover {
  color: var(--brand);
}

.location small,
.cell-note {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.74rem;
}

.related-list {
  display: flex;
  max-width: 260px;
  flex-wrap: wrap;
  gap: 4px;
}

.related-chip {
  padding: 3px 7px;
  border-radius: 999px;
  color: #344054;
  background: #eef2f6;
  font-size: 0.7rem;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.row-action {
  display: inline-flex;
  align-items: center;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #344054;
  background: #fff;
  font-size: 0.72rem;
  text-decoration: none;
}

.row-action:hover:not(:disabled) {
  border-color: var(--brand);
  color: var(--brand);
}

.group-row td {
  border-bottom-color: #d9d6e8;
}

.group-toggle {
  justify-content: center;
}

.group-actions {
  align-items: flex-start;
}

.group-members-row:hover,
.group-members-row {
  background: #f8f7fc;
}

.group-members-row > td {
  padding: 0;
  border-bottom: 1px solid #cbc5e0;
}

.group-members {
  padding: 12px 16px 16px;
  border-left: 4px solid var(--brand);
}

.member-scope-note {
  margin: 0 0 10px;
  color: #54427d;
  font-size: 0.78rem;
  font-weight: 700;
}

.member-table-scroll {
  overflow-x: auto;
}

.member-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 0.78rem;
  table-layout: auto;
}

.member-table th,
.member-table td {
  padding: 8px 9px;
}

.member-table th {
  background: #f2f0f8;
}

.member-table tbody tr:last-child td {
  border-bottom: 0;
}

.state-identity {
  max-width: 230px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.7rem;
}

.member-actions {
  min-width: 220px;
}

.empty-row td {
  padding: 36px;
  color: var(--muted);
  text-align: center;
}

.action-message {
  min-height: 22px;
  margin: 12px 2px 0;
  color: var(--success);
  font-size: 0.84rem;
}

.action-message.is-error {
  color: var(--danger);
}

.modal {
  width: min(620px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  box-shadow: 0 24px 80px rgb(16 24 40 / 28%);
}

.modal-wide {
  width: min(960px, calc(100vw - 28px));
}

.modal::backdrop {
  background: rgb(16 24 40 / 55%);
  backdrop-filter: blur(2px);
}

.modal-card {
  display: flex;
  max-height: calc(100vh - 28px);
  flex-direction: column;
  margin: 0;
}

.modal-header,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: #fff;
}

.modal-header {
  border-bottom: 1px solid var(--line);
}

.modal-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}

.modal-body {
  padding: 18px;
  overflow-y: auto;
  background: #fff;
}

.modal-target {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.modal-scope-note {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-left: 3px solid var(--brand);
  color: #54427d;
  background: #f8f7fc;
  font-size: 0.82rem;
  line-height: 1.45;
}

.icon-button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: #f2f4f7;
  font-size: 1.3rem;
  line-height: 1;
}

label {
  display: block;
  margin: 13px 0 6px;
  color: #344054;
  font-size: 0.82rem;
  font-weight: 700;
}

label:first-child {
  margin-top: 0;
}

input,
select,
textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}

input:disabled,
select:disabled,
textarea:disabled {
  color: #667085;
  background: #f2f4f7;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #8c75c5;
  outline: 3px solid #eeeafb;
}

textarea {
  resize: vertical;
}

.history-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.history-grid section {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.history-list {
  max-height: 260px;
  margin: 0;
  padding-left: 20px;
  overflow-y: auto;
  color: #475467;
  font-size: 0.8rem;
}

.history-list li + li {
  margin-top: 8px;
}

.location-facts {
  display: grid;
  grid-template-columns: minmax(120px, 0.35fr) minmax(0, 1fr);
  gap: 8px 14px;
  margin: 0;
}

.location-facts dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.location-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.detail-breadcrumb {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.82rem;
}

.detail-breadcrumb a {
  color: var(--brand);
}

.location-identity {
  margin: 8px 0 0;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.76rem;
}

.detail-scope {
  min-width: 230px;
}

.detail-card {
  margin-top: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgb(16 24 40 / 5%);
}

.detail-card h2,
.detail-card h3,
.detail-card h4 {
  margin-top: 0;
}

.detail-card details {
  margin-top: 14px;
}

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

.topology-version {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.topology-version header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.topology-version header p,
.asset-list span {
  color: var(--muted);
  font-size: 0.78rem;
}

.asset-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  padding: 0;
  list-style: none;
}

.asset-list li {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.asset-list strong,
.asset-list span {
  display: block;
  overflow-wrap: anywhere;
}

.asset-list pre {
  max-height: 280px;
  overflow: auto;
  white-space: pre-wrap;
  font-size: 0.72rem;
}

.detail-map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.map-page {
  width: min(1600px, calc(100% - 24px));
}

.map-heading {
  margin-bottom: 14px;
}

.map-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 12px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 0.8rem;
}

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

.legend-dot {
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgb(16 24 40 / 16%);
}

.legend-comf {
  background: #7f3fbf;
}

.legend-iof {
  background: #0e899b;
}

.legend-dvrcf {
  background: #d47a00;
}

.legend-note,
.map-sidebar-note {
  color: var(--muted);
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 320px);
  gap: 14px;
  min-height: min(720px, calc(100vh - 245px));
}

.map-card,
.map-sidebar {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.priority-map {
  width: 100%;
  height: 100%;
  min-height: 560px;
  background: #e8edf3;
}

.map-empty {
  padding: 24px;
  color: var(--muted);
}

.map-sidebar {
  padding: 16px;
  overflow-y: auto;
}

.map-status {
  padding: 10px 11px;
  border-radius: 8px;
  color: var(--success);
  background: #ecfdf3;
  font-size: 0.82rem;
  font-weight: 700;
}

.map-status.has-warning {
  color: #854a0e;
  background: #fffaeb;
}

.map-status.is-error {
  color: var(--danger);
  background: #fef3f2;
}

.map-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 12px;
  margin: 16px 0 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
}

.map-summary dt {
  color: var(--muted);
}

.map-summary dd {
  margin: 0;
  font-weight: 800;
}

.map-sidebar h2 {
  font-size: 1rem;
}

.map-sidebar-note {
  margin: 5px 0 12px;
  font-size: 0.76rem;
}

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

.unmapped-list li {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.76rem;
}

.unmapped-list li > span {
  color: var(--muted);
}

.unmapped-list a {
  color: var(--brand);
}

.elti-map-icon {
  border: 0;
  background: transparent;
}

.elti-map-marker {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  transform: rotate(-45deg);
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  color: #fff;
  box-shadow: 0 3px 8px rgb(16 24 40 / 36%);
  font-size: 0.72rem;
  font-weight: 900;
}

.elti-map-marker > span {
  transform: rotate(45deg);
  text-shadow: 0 1px 2px rgb(0 0 0 / 40%);
}

.marker-colors-comf {
  background: #7f3fbf;
}

.marker-colors-iof {
  background: #0e899b;
}

.marker-colors-dvrcf {
  background: #d47a00;
}

.marker-colors-comf-iof {
  background: linear-gradient(135deg, #7f3fbf 0 50%, #0e899b 50%);
}

.marker-colors-comf-dvrcf {
  background: linear-gradient(135deg, #7f3fbf 0 50%, #d47a00 50%);
}

.marker-colors-iof-dvrcf {
  background: linear-gradient(135deg, #0e899b 0 50%, #d47a00 50%);
}

.marker-colors-comf-iof-dvrcf {
  background: conic-gradient(#7f3fbf 0 33%, #0e899b 33% 67%, #d47a00 67%);
}

.marker-colors-unknown {
  background: #667085;
}

.map-popup {
  min-width: 220px;
  max-width: 330px;
  color: var(--ink);
}

.map-popup-title {
  margin: 0;
  font-size: 1rem;
}

.map-popup-title a,
.map-popup-actions a {
  color: var(--brand);
}

.map-popup-address {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
}

.map-popup-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.map-popup-alarms {
  max-height: 190px;
  margin: 10px 0 0;
  padding: 8px 0 0 18px;
  overflow-y: auto;
  border-top: 1px solid var(--line);
  font-size: 0.76rem;
}

.map-popup-alarms li + li {
  margin-top: 5px;
}

.alarm-text-comf {
  color: #6e2ea9;
}

.alarm-text-iof {
  color: #087280;
}

.alarm-text-dvrcf {
  color: #a95c00;
}

.map-popup-more {
  color: var(--muted);
}

.map-popup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 0.76rem;
  font-weight: 700;
}

[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .table-card > .table-scroll > table {
    min-width: 1180px;
  }

  .member-table {
    min-width: 980px;
  }

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

  .preview-access {
    align-items: flex-start;
    flex-direction: column;
  }

  .preview-actions {
    justify-content: flex-start;
  }

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

  .dashboard-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .location-results {
    grid-column: auto;
  }

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

  .map-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .priority-map {
    height: min(68vh, 620px);
    min-height: 430px;
  }

  .map-sidebar {
    max-height: none;
  }
}

@media (max-width: 640px) {
  .topbar,
  .page-heading {
    align-items: flex-start;
  }

  .topbar {
    gap: 10px;
    flex-direction: column;
  }

  .identity {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .page-shell {
    width: calc(100% - 20px);
    margin-top: 18px;
  }

  .page-heading {
    flex-direction: column;
  }

  .updated {
    text-align: left;
  }

  .view-tab {
    flex: 1 1 auto;
  }

  .location-search-form {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-filters {
    grid-template-columns: 1fr;
  }

  .dashboard-filterbar,
  .dashboard-search-form {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-filterbar .button,
  .dashboard-search-form .button {
    width: 100%;
  }

  .map-page {
    width: min(100% - 12px, 1600px);
  }

  .map-heading .button {
    width: 100%;
  }

  .map-legend {
    gap: 8px 12px;
  }

  .legend-note {
    width: 100%;
  }

  .priority-map {
    height: 62vh;
    min-height: 360px;
  }

  .modal-actions {
    flex-wrap: wrap;
  }
}
