:root {
  color-scheme: light;
  --ink: #17211b;
  --muted: #64706a;
  --line: #d9e2dc;
  --surface: #ffffff;
  --soft: #eef5f1;
  --accent: #87cefa;
  --accent-strong: #075f51;
  --danger: #a83d3d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f6faf7;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-weight: 700;
  min-height: 42px;
  padding: 0 14px;
}

button:hover {
  background: var(--accent-strong);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: var(--surface);
  padding: 11px 12px;
}

textarea {
  resize: vertical;
}

.hidden {
  display: none !important;
}

.app-shell,
.dashboard-view,
.map-view,
#map {
  min-height: 100vh;
}

.auth-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(rgba(246, 250, 247, 0.82), rgba(246, 250, 247, 0.92)),
    url("https://images.unsplash.com/photo-1524661135-423995f22d0b?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.auth-panel {
  width: min(440px, 100%);
  display: grid;
  gap: 18px;
  border: 1px solid rgba(217, 226, 220, 0.8);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  padding: 26px;
  box-shadow: 0 24px 70px rgba(22, 36, 28, 0.18);
}

.brand-logo {
  display: block;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.auth-brand {
  display: flex;
  justify-content: center;
}

.auth-logo {
  height: 54px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 7vw, 3.6rem);
  line-height: 0.96;
}

h1.auth-title-small {
  font-size: 1.45rem;
  line-height: 1.1;
}

h2 {
  margin-bottom: 0;
  font-size: 1.2rem;
}

h3 {
  margin-bottom: 12px;
  font-size: 0.98rem;
}

.message {
  min-height: 1.35rem;
  color: var(--danger);
  margin-bottom: 0;
}

.qr-wrap {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.qr-wrap img {
  width: min(220px, 100%);
  aspect-ratio: 1;
}

.qr-wrap p {
  color: var(--muted);
  margin-bottom: 0;
  text-align: center;
}

.twofa-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.twofa-methods label {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: row;
  gap: 0.55rem;
  padding: 0.7rem 0.8rem;
}

.twofa-methods input {
  width: auto;
}

.twofa-methods label:has(input:checked) {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(8, 124, 102, 0.12);
}

.twofa-code-field {
  gap: 10px;
}

.twofa-code-boxes {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  width: 75%;
}

.twofa-code-box {
  aspect-ratio: 0.72;
  min-height: 48px;
  padding: 0;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  border-color: #6f7772;
  border-radius: 7px;
  caret-color: var(--accent);
}

.twofa-code-box:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.16);
  outline: none;
}

.disclaimer-panel {
  width: min(680px, 100%);
}

.disclaimer-title {
  font-size: clamp(1rem, 2.3vw, 1.2rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.disclaimer-title-panel {
  font-size: 0.9rem;
}

.disclaimer-copy {
  display: grid;
  gap: 10px;
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 14px;
}

.disclaimer-copy p {
  margin-bottom: 0;
  color: #354139;
  line-height: 1.48;
}

.check-row {
  grid-template-columns: 20px 1fr;
  align-items: start;
  color: var(--ink);
}

.check-row input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.dashboard-view {
  display: grid;
  align-content: start;
  gap: 22px;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.dashboard-logo {
  height: 42px;
  margin-bottom: 8px;
}

.dashboard-title {
  font-size: 1.35rem;
  line-height: 1.1;
}

.topbar-actions {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  justify-content: end;
  overflow-x: auto;
}

.dashboard-admin-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 10px;
}

.dashboard-button-row {
  min-width: 0;
}

.dashboard-button-row {
  scrollbar-width: thin;
}

#open-map-button,
#dashboard-profile-button,
#dashboard-logout-button,
#manage-companies-button,
#manage-users-button,
#manage-capabilities-button,
#manage-services-button,
#manage-events-button,
.dashboard-icon-button {
  align-items: center;
  border: 0;
  border-radius: 6px;
  color: #fff;
  display: inline-flex;
  flex: 0 0 auto;
  font-weight: 850;
  gap: 8px;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  white-space: nowrap;
}

.topbar-actions #open-map-button,
.topbar-actions #dashboard-profile-button,
.topbar-actions #dashboard-logout-button,
.topbar-actions #manage-companies-button,
.topbar-actions #manage-users-button,
.topbar-actions #manage-capabilities-button,
.topbar-actions #manage-services-button,
.topbar-actions #manage-events-button,
.section-actions #manage-companies-button,
.section-actions #manage-users-button,
.section-actions #manage-capabilities-button,
.section-actions #manage-services-button,
.section-actions #manage-events-button {
  flex: 0 0 auto;
}

.dashboard-icon-button svg {
  display: block;
  flex: 0 0 auto;
  height: 18px;
  width: 18px;
  fill: currentColor;
}

#open-map-button.dashboard-map-button,
#open-map-button,
.dashboard-map-button {
  background: #15803d;
}

#open-map-button.dashboard-map-button:hover,
#open-map-button:hover,
.dashboard-map-button:hover {
  background: #166534;
}

#dashboard-profile-button.dashboard-profile-button,
#dashboard-profile-button,
.dashboard-profile-button {
  background: #2563eb;
}

#dashboard-profile-button.dashboard-profile-button:hover,
#dashboard-profile-button:hover,
.dashboard-profile-button:hover {
  background: #1d4ed8;
}

#dashboard-logout-button.dashboard-logout-button,
#dashboard-logout-button,
.dashboard-logout-button {
  background: #475569;
}

#dashboard-logout-button.dashboard-logout-button:hover,
#dashboard-logout-button:hover,
.dashboard-logout-button:hover {
  background: #334155;
}

.ghost-button {
  background: #e8f0eb;
  color: var(--ink);
}

.ghost-button:hover {
  background: #d9e5de;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.stat-card,
.dashboard-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.stat-card {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.stat-card span {
  color: var(--muted);
  font-weight: 750;
}

.stat-card strong {
  font-size: 2.4rem;
  line-height: 1;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.admin-dashboard {
  display: grid;
  gap: 14px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: flex-start;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.section-heading h2 {
  margin-bottom: 0;
}

.section-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  justify-content: flex-start;
  overflow-x: auto;
  width: 100%;
}

.admin-action-row {
  padding-bottom: 2px;
}

#manage-companies-button.admin-action-companies,
#manage-companies-button,
.admin-action-companies {
  background: #0f766e;
}

#manage-companies-button.admin-action-companies:hover,
#manage-companies-button:hover,
.admin-action-companies:hover {
  background: #115e59;
}

#manage-users-button.admin-action-users,
#manage-users-button,
.admin-action-users {
  background: #2563eb;
}

#manage-users-button.admin-action-users:hover,
#manage-users-button:hover,
.admin-action-users:hover {
  background: #1d4ed8;
}

#manage-capabilities-button.admin-action-capabilities,
#manage-capabilities-button,
.admin-action-capabilities {
  background: #7c3aed;
}

#manage-capabilities-button.admin-action-capabilities:hover,
#manage-capabilities-button:hover,
.admin-action-capabilities:hover {
  background: #6d28d9;
}

#manage-services-button.admin-action-services,
#manage-services-button,
.admin-action-services {
  background: #ea580c;
}

#manage-services-button.admin-action-services:hover,
#manage-services-button:hover,
.admin-action-services:hover {
  background: #c2410c;
}

#manage-events-button.admin-action-events,
#manage-events-button,
.admin-action-events {
  background: #be123c;
}

#manage-events-button.admin-action-events:hover,
#manage-events-button:hover,
.admin-action-events:hover {
  background: #9f1239;
}

.admin-grid {
  display: contents;
}

.dashboard-panel {
  padding: 18px;
}

.dashboard-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.dashboard-panel h2 {
  font-size: 1rem;
  margin-bottom: 0;
}

.admin-panel-heading {
  align-items: flex-start;
  border-bottom: 1px solid #e5edf0;
  padding-bottom: 12px;
}

.admin-panel-heading h2 {
  font-size: 1.08rem;
}

.admin-panel-heading p {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 5px 0 0;
  max-width: 720px;
}

.admin-control-card {
  background: #f8fbfc;
  border: 1px solid #dce7eb;
  border-radius: 8px;
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
  padding: 14px;
}

.services-admin-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 0.9fr);
  margin-bottom: 14px;
}

.services-admin-layout .admin-control-card {
  margin-bottom: 0;
}

.services-card-heading,
.services-section-heading {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.services-card-heading strong,
.services-section-heading strong {
  color: var(--ink);
  display: block;
  font-size: 0.95rem;
}

.services-card-heading span,
.services-section-heading span {
  color: var(--muted);
  display: block;
  font-size: 0.82rem;
  line-height: 1.35;
  margin-top: 3px;
}

.services-section-heading {
  background: #ffffff;
  border: 1px solid #dce7eb;
  border-radius: 8px;
  margin-bottom: 12px;
  padding: 12px 14px;
}

.services-bulk-switches {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.services-bulk-switches .table-check-all {
  background: #f8fbfc;
  border: 1px solid #dce7eb;
  border-radius: 6px;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 8px 10px;
  white-space: nowrap;
}

.services-diagnostic {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
}

.services-diagnostic-card {
  background: #ffffff;
  border: 1px solid #dce7eb;
  border-radius: 8px;
  display: grid;
  gap: 5px;
  min-height: 92px;
  padding: 12px 14px;
}

.services-diagnostic-card span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.services-diagnostic-card strong {
  color: #0f172a;
  font-size: 1.2rem;
  line-height: 1.1;
}

.services-diagnostic-card small {
  color: var(--muted);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.services-tools {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.services-search,
.services-cache-filter {
  color: #334155;
  display: grid;
  font-size: 0.78rem;
  font-weight: 800;
  gap: 5px;
  min-width: 190px;
}

.services-cache-filter {
  min-width: 145px;
}

.services-search input,
.services-cache-filter select {
  background: #ffffff;
  border: 1px solid #d7e3e8;
  border-radius: 6px;
  min-height: 36px;
  padding: 7px 10px;
}

.metric-list {
  display: grid;
  gap: 8px;
}

.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  border-bottom: 1px solid #edf2ef;
  color: var(--muted);
}

.metric-row strong {
  color: var(--ink);
}

.login-chart {
  display: grid;
  gap: 12px;
}

.login-chart-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(130px, 1fr) minmax(90px, 0.8fr) minmax(132px, auto);
}

.login-chart-row span {
  color: var(--ink);
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-chart-track {
  background: #e7eef1;
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}

.login-chart-track i {
  background: #0d7c66;
  display: block;
  height: 100%;
}

.login-chart-row strong {
  color: var(--ink);
  font-size: 0.86rem;
  text-align: right;
}

.login-chart-row small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-form {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.compact-form .inline-checkbox {
  align-items: center;
  display: flex;
  gap: 8px;
}

.compact-form .inline-checkbox input[type="checkbox"] {
  width: auto;
}

.services-config-form {
  gap: 14px 18px;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  margin-bottom: 0;
}

.services-config-stack {
  display: grid;
  gap: 10px;
}

.services-cache-actions {
  align-content: start;
  display: grid;
  gap: 10px;
}

.services-cache-actions small {
  color: #64748b;
  line-height: 1.35;
}

.admin-create-form {
  margin-top: 14px;
}

.primary-action {
  justify-self: start;
  width: auto;
  min-height: 38px;
  background: #2563eb;
}

.primary-action:hover {
  background: #1d4ed8;
}

.success-button {
  background: #16a34a;
}

.success-button:hover {
  background: #15803d;
}

.danger-button {
  background: #dc2626;
  color: #ffffff;
}

.danger-button:hover {
  background: #b91c1c;
}

.admin-toolbar {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-toolbar label {
  display: grid;
  gap: 6px;
  min-width: 240px;
}

.users-toolbar label {
  min-width: 180px;
}

.users-toolbar .primary-action {
  margin-right: auto;
}

.filters-box {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 16px;
  align-items: end;
  margin: 16px 0 22px;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  background: #ffffff;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.filters-box .ghost-button,
.filters-box .success-button {
  min-height: 40px;
}

.filters-box .success-button {
  justify-self: end;
}

.admin-table-wrap {
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

.admin-table th {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
}

.sort-button {
  min-height: auto;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font: inherit;
  text-align: left;
  text-transform: inherit;
}

.sort-button:hover {
  background: transparent;
  color: #2563eb;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid #e5e7eb;
  padding: 14px 24px;
  vertical-align: middle;
  white-space: nowrap;
}

.admin-table td strong {
  display: block;
}

.admin-table td small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.admin-table select {
  min-width: 165px;
  min-height: 34px;
  padding: 5px 8px;
}

.empty-cell {
  color: var(--muted);
  text-align: center;
}

.readonly-label {
  color: var(--muted);
  font-weight: 700;
}

.link-button,
.danger-link,
.icon-action {
  border: 0;
  background: transparent;
  color: #2563eb;
  min-height: 28px;
  padding: 0 5px;
}

.danger-link {
  color: #dc2626;
}

.link-button:disabled,
.danger-link:disabled,
.icon-action:disabled {
  color: #94a3b8;
  cursor: not-allowed;
}

.icon-action {
  display: inline-grid;
  place-items: center;
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 4px;
  font-size: 1rem;
  vertical-align: middle;
}

.icon-action:hover:not(:disabled) {
  background: #eff6ff;
}

.icon-action svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.icon-warning {
  color: #d97706;
}

.icon-warning:hover:not(:disabled) {
  background: #fffbeb;
}

.icon-danger {
  color: #dc2626;
}

.icon-danger:hover:not(:disabled) {
  background: #fef2f2;
}

.status-ok {
  color: #6d5bb5;
  font-size: 1.35rem;
  font-weight: 900;
}

.status-bad {
  color: #ef476f;
  font-size: 1.55rem;
  font-weight: 900;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #475569;
  margin-top: 14px;
}

.pager {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #64748b;
}

.pager strong {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  min-height: 34px;
  border-radius: 4px;
  background: #3b82f6;
  color: #ffffff;
}

.pager button:disabled {
  cursor: default;
  opacity: 0.5;
}

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

  .users-toolbar,
  .users-toolbar label {
    width: 100%;
  }
}

.admin-list {
  display: grid;
  gap: 10px;
}

.capability-company-form {
  margin-bottom: 0;
  max-width: none;
}

@media (max-width: 900px) {
  .services-admin-layout {
    grid-template-columns: 1fr;
  }

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

  .services-section-heading {
    display: grid;
  }

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

  .services-tools {
    justify-content: flex-start;
  }

  .services-bulk-switches {
    justify-content: flex-start;
  }

  .service-group-tabs {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .services-diagnostic {
    grid-template-columns: 1fr;
  }

  .services-search,
  .services-cache-filter {
    min-width: 100%;
  }
}

.capability-company-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.capability-company-heading span {
  color: var(--muted);
  font-size: 0.86rem;
}

.capability-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 0;
}

.capability-row {
  align-items: center;
}

.capability-row td,
.service-config-row td {
  vertical-align: middle;
}

.capability-row strong,
.service-config-row strong {
  display: block;
  line-height: 1.2;
}

.capability-row small,
.service-config-row small {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
  margin-top: 4px;
}

.capabilities-table td:first-child,
.capabilities-table th:first-child {
  text-align: center;
  width: 84px;
}

.capabilities-table code {
  color: #475569;
  font-size: 0.84rem;
}

.service-visibility-help {
  background: #f8fbfc;
  border: 1px solid #dce7eb;
  display: grid;
  gap: 3px;
  margin-bottom: 12px;
  padding: 10px 12px;
}

.service-visibility-help span {
  color: var(--muted);
  font-size: 0.86rem;
}

.service-config-row {
  align-items: center;
  border: 1px solid #e5e7eb;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) auto auto minmax(130px, 160px) auto auto;
  padding: 10px 12px;
}

.services-table {
  min-width: 1080px;
}

.services-table .service-config-row {
  border: 0;
  display: table-row;
  padding: 0;
}

.services-table th {
  background: #f8fbfc;
  color: #334155;
  font-size: 0.76rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.services-table td {
  white-space: normal;
}

.services-table td:nth-child(1),
.services-table td:nth-child(2) {
  text-align: center;
  width: 118px;
}

.services-table td:nth-child(4) {
  width: 210px;
}

.services-table td:nth-child(5) {
  width: 190px;
}

.service-toggle-cell {
  align-items: center;
  display: grid;
  gap: 6px;
  justify-items: center;
}

.service-toggle-cell small {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  margin: 0;
}

.service-toggle-cell small.is-on {
  color: #0f766e;
}

.service-name-cell strong {
  color: #0f172a;
  font-size: 0.92rem;
}

.service-name-cell code {
  color: #64748b;
  font-size: 0.78rem;
  word-break: break-word;
}

.service-cache-cell {
  display: grid;
  gap: 5px;
  min-width: 180px;
}

.service-cache-badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.74rem;
  font-weight: 850;
  justify-content: center;
  justify-self: start;
  padding: 5px 9px;
  white-space: nowrap;
}

.service-cache-badge.ready {
  background: #dcfce7;
  color: #166534;
}

.service-cache-badge.missing {
  background: #fef3c7;
  color: #92400e;
}

.service-cache-badge.neutral {
  background: #eef2f7;
  color: #475569;
}

.service-group-select {
  display: grid;
  gap: 5px;
}

.service-group-select small {
  margin-top: 0;
}

.commerce-filter-config {
  display: grid;
  gap: 7px;
  min-width: 230px;
}

.commerce-filter-config select[multiple] {
  min-height: 88px;
}

.service-group-tabs {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 12px;
}

.service-group-tab {
  background: #ffffff;
  border: 1px solid #dbe7ec;
  border-radius: 8px;
  color: #27363d;
  cursor: pointer;
  display: grid;
  gap: 8px;
  min-height: 92px;
  padding: 12px 14px;
  text-align: left;
}

.service-group-tab:hover {
  background: #e5eef3;
}

.service-group-tab:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.service-group-tab span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.service-tab-toggle {
  align-items: center;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  gap: 6px;
  justify-self: start;
}

.service-tab-toggle input {
  accent-color: #0d7c66;
}

.service-group-tab.active {
  background: #ecfdf5;
  border-color: #0f766e;
  box-shadow: inset 4px 0 0 #0f766e;
  color: #0f172a;
}

.service-group-tab.active span {
  color: #0f766e;
}

.service-group-tab.active .service-tab-toggle {
  color: #0f172a;
}

.service-config-row small {
  color: var(--muted);
  display: block;
  margin-top: 3px;
}

.service-chip {
  background: #eef2f7;
  border-radius: 999px;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 5px 9px;
  text-align: center;
  white-space: nowrap;
}

.service-chip-on {
  background: #dcfce7;
  color: #166534;
}

.switch-mini {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  margin: 0;
  white-space: nowrap;
}

.admin-user-row {
  display: grid;
  grid-template-columns: 1fr 130px 110px;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid #edf2ef;
  padding-bottom: 10px;
}

.admin-user-row strong,
.admin-user-row span {
  overflow-wrap: anywhere;
}

.admin-user-row small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}

.admin-user-row select {
  min-height: 36px;
  padding: 6px 8px;
}

.admin-user-row button {
  min-height: 36px;
}

.admin-record-row {
  display: grid;
  grid-template-columns: 1fr 120px 120px;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid #edf2ef;
  padding: 10px 0;
}

.admin-record-row strong {
  display: block;
  overflow-wrap: anywhere;
}

.admin-record-row small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}

.admin-record-row span {
  color: var(--muted);
  font-weight: 750;
}

.empty-row {
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--muted);
  padding: 14px;
  text-align: center;
}

.account-2fa-inline {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.events-list {
  display: grid;
  gap: 10px;
}

.event-row {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(260px, 1.2fr);
  gap: 12px;
  align-items: start;
  border-bottom: 1px solid #edf2ef;
  padding: 10px 0;
}

.event-row strong,
.event-row span {
  display: block;
  color: var(--ink);
}

.event-row small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.map-view {
  position: relative;
  overflow: hidden;
  background: #d7dee0;
}

.map-view #map {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.map-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 700;
  display: grid;
  grid-template-columns: 116px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 24px 8px 14px;
  pointer-events: none;
}

.map-logo,
.map-menu,
.map-session,
.mobile-menu-button {
  pointer-events: auto;
}

.map-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  width: 104px;
  min-width: 104px;
}

.map-logo img {
  display: block;
  width: 100%;
  height: 24px;
  object-fit: contain;
}

.map-menu,
.map-session {
  display: flex;
  align-items: center;
  gap: 10px;
}

.map-menu {
  justify-content: center;
  flex-wrap: wrap;
}

.map-session {
  justify-content: end;
}

.mobile-menu-button,
.mobile-account-button {
  display: none;
}

.toolbar-button,
.logout-button {
  min-height: 28px;
  border-radius: 3px;
  padding: 0 12px;
  box-shadow: 0 1px 2px rgba(31, 44, 48, 0.12);
  font-size: 0.88rem;
  font-weight: 500;
}

.toolbar-button {
  background: rgba(255, 255, 255, 0.94);
  color: #2d3436;
}

.toolbar-button:hover {
  background: #ffffff;
}

.admin-switch {
  display: inline-flex;
  justify-content: center;
}

.admin-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.admin-switch span {
  background: #cbd5e1;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
  display: inline-block;
  height: 24px;
  position: relative;
  transition: background 0.16s ease, box-shadow 0.16s ease;
  width: 44px;
}

.admin-switch span::after {
  background: #ffffff;
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.22);
  content: "";
  height: 18px;
  left: 3px;
  position: absolute;
  top: 3px;
  transition: transform 0.16s ease;
  width: 18px;
}

.admin-switch input:checked + span {
  background: #0d7c66;
}

.admin-switch input:checked + span::after {
  transform: translateX(20px);
}

.admin-switch input:focus-visible + span {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.menu-button-legend {
  background: #e8f1ff;
  color: #184e9f;
}

.menu-button-filters {
  background: #eafaf5;
  color: #0f766e;
}

.menu-button-tools {
  background: #eaf4ff;
  color: #1457a6;
}

.menu-button-modules {
  background: #f5edff;
  color: #6d28d9;
}

.menu-button-stats {
  background: #fff4db;
  color: #b45309;
}

.menu-button-reports {
  background: #ecfdf3;
  color: #15803d;
}

.menu-button-help {
  background: #fff1f2;
  color: #be123c;
}

.menu-button-search {
  background: #eef2ff;
  color: #4338ca;
}

.menu-button-icons {
  background: #f3f4f6;
  color: #374151;
}

.menu-button-account {
  background: #0f766e;
  color: #ffffff;
}

.toolbar-button[class*="menu-button-"]:hover,
.toolbar-button[class*="menu-button-"].active {
  filter: brightness(0.98);
}

.menu-toggle-icon {
  display: inline-grid;
  gap: 3px;
  width: 16px;
}

.menu-toggle-icon i {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.logout-button {
  background: #d92f2f;
  color: #ffffff;
}

.logout-button:hover {
  background: #b82020;
}

.left-toolbox {
  position: absolute;
  left: 9px;
  top: 198px;
  z-index: 650;
  display: grid;
  gap: 10px;
}

.map-tool,
.layers-float-button,
.base-map-button,
.geoai-float-button {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #cfd8dc;
  border-radius: 3px;
  background: #ffffff;
  color: #3f4b52;
  padding: 0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
  font-size: 1rem;
  line-height: 1;
}

.map-tool:hover,
.layers-float-button:hover,
.base-map-button:hover,
.base-map-button.active {
  background: #ffffff;
  color: #1f2b30;
}

.map-tool.active {
  background: #f2f7ff;
  border-color: #a9c4f8;
  color: #1d4ed8;
}

.map-tool:disabled {
  cursor: default;
  opacity: 0.45;
}

.map-tool svg {
  fill: currentColor;
  height: 19px;
  width: 19px;
}

.layers-float-button {
  position: absolute;
  right: 18px;
  top: 64px;
  z-index: 650;
  display: none;
}

.geoai-float-button {
  position: absolute;
  left: 9px;
  top: 451px;
  z-index: 650;
  background: #0d7c66;
  border-color: #0d7c66;
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(13, 124, 102, 0.28);
}

.geoai-float-button svg {
  fill: currentColor;
  height: 19px;
  width: 19px;
}

.geoai-float-button:hover {
  background: #0a6b58;
  border-color: #0a6b58;
  color: #ffffff;
}

.base-map-switcher {
  position: absolute;
  right: 18px;
  top: 64px;
  z-index: 650;
  display: grid;
  gap: 6px;
}

.base-map-button {
  display: grid;
  place-items: center;
}

.base-map-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
}

.base-map-icon i {
  position: absolute;
  left: 3px;
  display: block;
  width: 12px;
  height: 8px;
  border: 1.6px solid currentColor;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.92);
  transform: rotate(45deg) skew(-8deg, -8deg);
}

.base-map-icon i:nth-child(1) {
  top: 1px;
  opacity: 0.55;
}

.base-map-icon i:nth-child(2) {
  top: 5px;
  opacity: 0.75;
}

.base-map-icon i:nth-child(3) {
  top: 9px;
}

.menu-base-map {
  position: relative;
  display: flex;
}

.base-map-button {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0;
}

.coordinate-result-group {
  display: grid;
  gap: 8px;
  border-top: 1px solid #edf2f5;
  padding-top: 10px;
}

.coordinate-point-label {
  border: 0 !important;
  background: #dc2626 !important;
  color: #ffffff !important;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  padding: 2px 5px !important;
}

.popup-title-centered {
  text-align: center;
}

.base-map-menu {
  position: absolute;
  right: 0;
  top: 40px;
  display: grid;
  gap: 4px;
  min-width: 116px;
  border: 1px solid #cfd8dc;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.98);
  padding: 5px;
  box-shadow: 0 8px 22px rgba(21, 35, 40, 0.18);
}

.base-map-menu button {
  min-height: 30px;
  border-radius: 4px;
  background: transparent;
  color: #27363d;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0 10px;
  text-align: left;
}

.base-map-menu button:hover,
.base-map-menu button.active {
  background: #edf3f6;
  color: #1446a0;
}

.map-panel {
  position: absolute;
  top: 54px;
  right: 18px;
  z-index: 680;
  display: grid;
  gap: 12px;
  width: min(360px, calc(100vw - 28px));
  max-height: calc(100vh - 96px);
  overflow: auto;
  border: 1px solid #cfd8dc;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.97);
  padding: 14px;
  box-shadow: 0 10px 30px rgba(21, 35, 40, 0.18);
}

.map-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.map-panel h3 {
  margin-bottom: 0;
}

.panel-close {
  width: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border-radius: 3px;
  background: #edf2f4;
  color: #2d3436;
}

.panel-close:hover {
  background: #dbe4e7;
}

.panel-header-actions {
  align-items: center;
  display: flex;
  gap: 6px;
}

.panel-icon-button {
  align-items: center;
  background: #edf2f4;
  border: 0;
  border-radius: 3px;
  color: #2d3436;
  display: inline-flex;
  height: 28px;
  justify-content: center;
  min-height: 28px;
  min-width: 28px;
  padding: 0;
  width: 28px;
}

.panel-icon-button svg {
  fill: currentColor;
  height: 16px;
  width: 16px;
}

.panel-icon-button:hover {
  background: #dbe4e7;
}

.panel-icon-button.active {
  background: #dbeafe;
  color: #1446a0;
}

.danger-icon-button {
  background: #fee2e2;
  color: #991b1b;
}

.danger-icon-button:hover {
  background: #fecaca;
}

.danger-icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.map-panel form,
.tool-grid {
  display: grid;
  gap: 12px;
}

.search-drawer {
  bottom: 0;
  gap: 0;
  grid-template-rows: auto auto 1fr;
  max-height: none;
  overflow: hidden;
  padding: 0;
  right: 0;
  top: 46px;
  z-index: 720;
  width: min(320px, calc(100vw - 36px));
  border-bottom: 0;
  border-right: 0;
  border-top: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: -12px 0 28px rgba(15, 23, 42, 0.16);
}

.search-drawer header {
  border-bottom: 1px solid #e3e8ee;
  padding: 17px 16px;
}

.search-drawer h3 {
  color: #2f3947;
  font-size: 1.08rem;
  font-weight: 800;
}

.search-drawer .compact-form {
  border-bottom: 1px solid #e3e8ee;
  gap: 8px;
  margin-bottom: 0;
  padding: 12px 16px 10px;
}

.search-drawer input[type="search"] {
  border: 1px solid #d3dae3;
  border-radius: 3px;
  color: #1f2937;
  font-size: 0.92rem;
  height: 38px;
  outline: 0;
  padding: 0 11px;
  width: 100%;
}

.search-drawer input[type="search"]:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.14);
}

.search-drawer button[type="submit"] {
  background: #2f62df;
  border-radius: 3px;
  height: 36px;
}

.search-drawer .panel-note {
  display: none;
}

.search-results-section {
  align-content: start;
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding: 10px 16px 16px;
}

.search-results-section h4 {
  color: #006099;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0;
}

.search-results-section .result-count {
  color: #6b7280;
  font-size: 0.86rem;
  margin: 0;
}

.measure-panel {
  left: 54px;
  right: auto;
  top: 72px;
  gap: 14px;
  width: min(326px, calc(100vw - 72px));
  border-color: #e4e9ed;
  background: rgba(255, 255, 255, 0.99);
}

.measure-panel header h3 {
  color: #0f172a;
  font-size: 1.05rem;
  line-height: 1.35;
  max-width: 145px;
}

.measure-panel select {
  min-height: 32px;
  border: 1px solid #dbe3e8;
  border-radius: 5px;
  background: #ffffff;
  color: #334155;
  padding: 0 9px;
}

.measure-tabs,
.measure-actions {
  display: grid;
  gap: 8px;
}

.measure-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.measure-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.measure-tabs button {
  min-height: 32px;
  border: 1px solid #e3e8ee;
  border-radius: 999px;
  background: #ffffff;
  color: #263241;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0 9px;
  box-shadow: none;
}

.measure-tabs button.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.measure-actions button {
  min-height: 40px;
  border-radius: 5px;
  font-weight: 850;
  box-shadow: none;
}

.measure-actions .ghost-button {
  background: #ffffff;
  border: 1px solid #e3e8ee;
  color: #334155;
}

.measure-actions .ghost-button:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.measure-stats {
  display: grid;
  gap: 6px;
  border-top: 1px solid #eef2f6;
  padding-top: 4px;
  color: #4b5563;
}

.measure-stats strong {
  color: #4b5563;
}

.measure-stats span {
  font-size: 0.85rem;
}

.measure-segments {
  display: grid;
  gap: 6px;
  max-height: 112px;
  overflow: auto;
  border: 1px solid #eef2f6;
  border-radius: 5px;
  background: #fbfdff;
  padding: 8px;
  color: #64748b;
  font-size: 0.82rem;
}

.measure-segments div {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.measure-segments strong {
  color: #0f766e;
  white-space: nowrap;
}

.measure-segment-label {
  border: 0 !important;
  background: rgba(15, 23, 42, 0.78) !important;
  color: #ffffff !important;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 6px !important;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
}

.measure-cursor,
.measure-cursor .leaflet-container {
  cursor: crosshair;
}

.analysis-panel {
  left: 54px;
  right: auto;
  top: 72px;
  width: min(360px, calc(100vw - 72px));
}

.analysis-panel h3 {
  color: #1f2937;
  font-size: 1.3rem;
}

.analysis-status {
  display: grid;
  gap: 8px;
  border: 1px solid #bfd7ff;
  border-radius: 5px;
  background: #eef5ff;
  color: #1d4ed8;
  padding: 14px;
}

.analysis-status.ready {
  border-color: #bbf7d0;
  background: #effdf3;
  color: #15803d;
}

.analysis-status span {
  line-height: 1.55;
}

.analysis-two-cols,
.analysis-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.analysis-scale,
.analysis-toolbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.analysis-scale {
  color: #4b5563;
  font-size: 0.88rem;
}

.analysis-preview {
  border: 1px solid #fde68a;
  border-radius: 6px;
  background: #fffbeb;
  color: #92400e;
  padding: 13px;
  font-weight: 750;
}

.analysis-ring-label {
  background: transparent;
  border: 0;
}

.analysis-ring-label span {
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid currentColor;
  border-radius: 7px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.14);
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  justify-content: center;
  min-width: 56px;
  padding: 3px 7px;
  pointer-events: none;
}

.ring-list {
  display: grid;
  gap: 10px;
}

.ring-row {
  align-items: center;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto 28px;
  gap: 8px;
  border-radius: 6px;
  background: #f8fafc;
  padding: 8px;
}

.ring-row i {
  width: 15px;
  height: 15px;
  border-radius: 999px;
}

.ring-row button {
  min-height: 28px;
  background: #fee2e2;
  color: #b91c1c;
  padding: 0;
}

.search-directions-button {
  background: #0d7c66;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  min-width: 26px;
  padding: 0;
  width: 26px;
}

.search-directions-button svg {
  fill: currentColor;
  height: 15px;
  width: 15px;
}

.search-directions-button:hover {
  background: #09604f;
}

.directions-panel {
  left: 54px;
  right: auto;
  top: 72px;
  width: min(360px, calc(100vw - 72px));
}

.directions-form {
  gap: 0;
}

.directions-row {
  align-items: center;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
}

.directions-row input {
  border: 0;
  border-bottom: 1px solid #d8e2e7;
  border-radius: 0;
  min-height: 40px;
}

.directions-badge {
  align-items: center;
  border: 0;
  border-radius: 0;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 900;
  height: 40px;
  justify-content: center;
  min-height: 40px;
  padding: 0;
  width: 34px;
}

.directions-badge.start {
  background: #38bdf8;
}

.directions-badge.end {
  background: #4b5563;
}

.directions-swap {
  background: #ffffff;
  color: #111827;
  font-size: 0.72rem;
  font-weight: 900;
  justify-self: start;
  margin-left: 34px;
  min-height: 22px;
  padding: 0;
  width: 28px;
}

.coordinate-result-title {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.coordinate-result-title strong {
  color: #2872b8;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
}

.directions-modes,
.mode-icon-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 0;
}

.directions-modes button,
.mode-icon-group button {
  background: #eef4f7;
  color: #4b5563;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
}

.directions-modes button svg,
.mode-icon-group button svg {
  fill: currentColor;
  height: 21px;
  width: 21px;
}

.directions-modes button.active,
.mode-icon-group button.active {
  background: #ffffff;
  color: #0d7c66;
  box-shadow: inset 0 -3px 0 #0d7c66;
}

.directions-point-marker {
  background: transparent;
  border: 0;
}

.directions-point-marker span {
  align-items: center;
  border: 3px solid #ffffff;
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.25);
  color: #ffffff;
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.directions-point-marker.start span {
  background: #38bdf8;
}

.directions-point-marker.end span {
  background: #4b5563;
}

.geoai-panel {
  bottom: 28px;
  left: 54px;
  right: auto;
  top: auto;
  width: min(680px, calc(100vw - 86px));
  max-height: min(560px, calc(100vh - 112px));
  grid-template-rows: auto minmax(160px, 1fr) auto;
}

.geoai-panel.pinned {
  border-color: #1446a0;
  box-shadow: 0 14px 34px rgba(20, 70, 160, 0.22);
  z-index: 760;
}

.geoai-panel.free-position {
  bottom: auto;
  right: auto;
}

.geoai-panel.dragging {
  cursor: grabbing;
  user-select: none;
}

.geoai-messages {
  background: #f8fafc;
  border: 1px solid #e3ebef;
  border-radius: 6px;
  display: grid;
  gap: 8px;
  max-height: none;
  min-height: 180px;
  overflow: auto;
  padding: 10px;
}

.geoai-message {
  border-radius: 6px;
  font-size: 0.86rem;
  line-height: 1.35;
  padding: 9px 10px;
}

.geoai-message.assistant {
  background: #ffffff;
  border: 1px solid #dbeafe;
  color: #1f2937;
}

.geoai-message.user {
  background: #0d7c66;
  color: #ffffff;
  justify-self: end;
  max-width: 88%;
}

.geoai-form {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.geoai-form input {
  min-width: 0;
}

.graph-panel {
  left: 54px;
  right: auto;
  top: 72px;
  width: min(520px, calc(100vw - 72px));
}

.graph-summary {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.graph-metric {
  background: #f8fafc;
  border: 1px solid #e3ebef;
  border-radius: 5px;
  display: grid;
  gap: 2px;
  padding: 8px;
}

.graph-metric span {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
}

.graph-metric strong {
  color: #111827;
  font-size: 1rem;
}

.graph-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.graph-legend-item {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e3ebef;
  border-radius: 999px;
  color: #334155;
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 700;
  gap: 6px;
  padding: 4px 8px;
}

.graph-legend-item i {
  border-radius: 999px;
  display: inline-block;
  height: 10px;
  width: 10px;
}

.graph-legend-item strong {
  color: #111827;
}

.graph-results {
  display: grid;
  gap: 8px;
}

.graph-component-card {
  background: #ffffff;
  border: 1px solid #e3ebef;
  border-top: 4px solid var(--accent);
  border-radius: 5px;
  display: grid;
  gap: 9px;
  padding: 10px;
}

.graph-component-card header {
  align-items: start;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.graph-component-card strong {
  color: #1f2937;
  font-size: 0.9rem;
}

.graph-component-card small {
  color: #64748b;
  font-size: 0.78rem;
}

.graph-component-stats {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.graph-component-stats span {
  background: #f8fafc;
  border: 1px solid #edf2f7;
  border-radius: 4px;
  color: #475569;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 5px 6px;
  text-align: center;
}

.graph-node-list {
  display: grid;
  gap: 5px;
}

.graph-node-button {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e5edf2;
  border-radius: 4px;
  color: #334155;
  cursor: pointer;
  display: grid;
  font-size: 0.82rem;
  gap: 8px;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  justify-items: stretch;
  min-height: 0;
  padding: 7px 8px;
  text-align: left;
}

.graph-node-button:hover,
.graph-node-button.active {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.graph-node-button i {
  border-radius: 999px;
  display: block;
  height: 12px;
  width: 12px;
}

.graph-node-button span {
  display: grid;
  min-width: 0;
}

.graph-node-button span strong,
.graph-node-button span small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graph-node-button em {
  background: #e2e8f0;
  border-radius: 999px;
  color: #334155;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
  min-width: 24px;
  padding: 2px 6px;
  text-align: center;
}

.graph-empty {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 5px;
  color: #64748b;
  font-size: 0.84rem;
  padding: 12px;
  text-align: center;
}

.graph-node-label {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.14);
  color: #1f2937;
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
  max-width: min(260px, 42vw);
  padding: 2px 7px;
  pointer-events: none;
  white-space: normal;
  overflow-wrap: anywhere;
}

.sweeper-panel {
  bottom: auto;
  left: 54px;
  right: auto;
  top: 72px;
  width: min(460px, calc(100vw - 72px));
}

.sweeper-summary {
  gap: 6px;
}

.sweeper-active-card,
.sweeper-target-card {
  background: #ffffff;
  border: 1px solid #e3ebef;
  border-left: 4px solid var(--accent);
  border-radius: 5px;
  display: grid;
  gap: 7px;
  padding: 10px;
}

.sweeper-active-card strong,
.sweeper-target-card strong {
  color: #1f2937;
  font-size: 0.94rem;
}

.sweeper-active-card span,
.sweeper-target-card span,
.sweeper-target-card small {
  color: #64748b;
  font-size: 0.8rem;
}

.sweeper-directions {
  min-height: 44px;
}

.sweeper-results {
  display: grid;
  gap: 8px;
}

.sweeper-target-card {
  cursor: pointer;
  text-align: left;
}

.sweeper-target-card:hover,
.sweeper-target-card.active {
  background: #f4faf8;
  border-color: #b9dcd4;
}

.sweeper-zone-form,
.sweeper-assignment-form,
.sweeper-feedback-form {
  display: grid;
  gap: 8px;
}

.sweeper-zone-form input[type="text"] {
  border: 1px solid #d7e1e5;
  border-radius: 4px;
  font: inherit;
  min-height: 38px;
  padding: 8px 10px;
}

.sweeper-assignment-form select {
  min-height: 86px;
}

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

.sweeper-feedback-actions button {
  min-height: 42px;
}

.sweeper-feedback-actions button.active {
  background: #0d7c66;
  color: #ffffff;
}

.sweeper-feedback-form textarea {
  border: 1px solid #d7e1e5;
  border-radius: 4px;
  font: inherit;
  padding: 9px;
  resize: vertical;
}

.sweeper-marker {
  align-items: center;
  border: 2px solid #ffffff;
  border-radius: 999px;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.25);
  color: #ffffff;
  display: flex;
  font-size: 0.76rem;
  font-weight: 850;
  height: 30px;
  justify-content: center;
  width: 30px;
}

@media (max-width: 720px) {
  .sweeper-panel {
    bottom: 0;
    left: 0;
    max-height: 64vh;
    right: 0;
    top: auto;
    width: 100vw;
    border-bottom: 0;
    border-left: 0;
    border-right: 0;
    border-radius: 10px 10px 0 0;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }

  .sweeper-feedback-actions button {
    min-height: 48px;
  }
}

.locator-panel {
  left: 54px;
  right: auto;
  top: 72px;
  width: min(540px, calc(100vw - 72px));
}

.locator-level-modal {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #cfd8dc;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(21, 35, 40, 0.18);
  display: grid;
  gap: 8px;
  padding: 10px;
  position: fixed;
  right: 18px;
  top: 72px;
  width: min(188px, calc(100vw - 36px));
  z-index: 720;
}

.locator-level-modal.hidden {
  display: none;
}

.locator-level-modal header {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.locator-level-modal h3 {
  font-size: 0.98rem;
  margin: 0;
}

.locator-level-modal .check-row {
  width: 100%;
}

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

.locator-weight-grid label {
  background: #f8fafc;
  border: 1px solid #e5edf2;
  border-radius: 5px;
  color: #334155;
  display: grid;
  font-size: 0.82rem;
  font-weight: 750;
  gap: 5px;
  padding: 8px;
}

.locator-weight-grid input {
  width: 100%;
}

.locator-summary {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.locator-metric {
  background: #f8fafc;
  border: 1px solid #e3ebef;
  border-radius: 5px;
  display: grid;
  gap: 1px;
  padding: 8px;
}

.locator-metric span {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
}

.locator-metric strong {
  color: #111827;
  font-size: 1rem;
}

.locator-metric em {
  color: #64748b;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 700;
}

.locator-loading {
  background: #f8fafc;
  border: 1px solid #d7e1e5;
  border-radius: 5px;
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
  padding: 10px;
}

.locator-loading strong {
  color: #111827;
  font-size: 0.9rem;
}

.locator-loading-row {
  align-items: center;
  color: #475569;
  display: grid;
  gap: 8px;
  grid-template-columns: 16px minmax(0, 1fr) auto;
}

.locator-loading-row i {
  animation: locator-spin 0.8s linear infinite;
  border: 2px solid #cbd5e1;
  border-top-color: #0d7c66;
  border-radius: 999px;
  display: block;
  height: 14px;
  width: 14px;
}

.locator-loading-row.done i {
  animation: none;
  background: #0d7c66;
  border-color: #0d7c66;
}

.locator-loading-row em {
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 750;
  min-width: 0;
}

.locator-loading-row b {
  color: #64748b;
  font-size: 0.72rem;
}

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

.locator-results {
  display: grid;
  gap: 8px;
}

.locator-result-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e3ebef;
  border-left: 4px solid var(--accent);
  border-radius: 5px;
  cursor: pointer;
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 9px;
  text-align: left;
}

.locator-result-card:hover,
.locator-result-card.active {
  background: #f4faf8;
  border-color: #b9dcd4;
}

.locator-score {
  align-items: center;
  background: var(--accent);
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 0.86rem;
  font-weight: 850;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.locator-result-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.locator-result-main strong {
  color: #1f2937;
  font-size: 0.92rem;
}

.locator-result-main span,
.locator-result-card small {
  color: #64748b;
  font-size: 0.78rem;
}

.locator-result-side {
  align-items: end;
  display: grid;
  justify-items: end;
}

.locator-result-side strong {
  color: #111827;
  font-size: 0.9rem;
}

.locator-signal-list {
  display: grid;
  gap: 5px;
  grid-column: 1 / -1;
}

.locator-signal {
  align-items: center;
  display: grid;
  gap: 7px;
  grid-template-columns: 78px minmax(0, 1fr) 30px;
}

.locator-signal em {
  color: #64748b;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
}

.locator-signal i {
  background: #e2e8f0;
  border-radius: 999px;
  display: block;
  height: 7px;
  overflow: hidden;
}

.locator-signal b {
  background: var(--accent);
  display: block;
  height: 100%;
}

.locator-signal strong {
  color: #334155;
  font-size: 0.72rem;
  text-align: right;
}

.locator-empty {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 5px;
  color: #64748b;
  font-size: 0.84rem;
  padding: 12px;
  text-align: center;
}

.locator-marker {
  align-items: center;
  border: 2px solid #ffffff;
  border-radius: 999px;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.25);
  color: #ffffff;
  display: flex;
  font-size: 0.78rem;
  font-weight: 850;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.locator-marker.selected {
  border-color: #111827;
  box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.18), 0 4px 14px rgba(15, 23, 42, 0.28);
  font-size: 0.9rem;
  height: 38px;
  width: 38px;
}

.filter-modal-panel {
  width: min(480px, calc(100vw - 28px));
}

.filter-modal-panel header {
  align-items: center;
}

#filter-reload-button {
  background: #fef2f2;
  color: #b91c1c;
}

#filter-reload-button:hover {
  background: #fee2e2;
  color: #991b1b;
}

.cache-status {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.panel-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.small-button {
  min-height: 28px;
  padding: 4px 10px;
}

.filter-loading {
  display: grid;
  gap: 8px;
  border: 1px solid #d7e1e5;
  border-radius: 4px;
  background: #f8fbfc;
  padding: 14px;
  color: #1446a0;
  text-align: center;
}

.filter-loading strong {
  color: #0f172a;
  font-size: 0.95rem;
}

.filter-loading span {
  color: #475569;
  font-size: 0.84rem;
}

.progress-track {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #dce6ea;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: #2563eb;
  transition: width 160ms ease;
}

.advanced-filter-form {
  display: grid;
  gap: 12px;
}

.filter-tabs {
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-self: center;
  width: min(100%, 360px);
}

.filter-tab {
  background: #edf3f6;
  border: 1px solid #dbe7ec;
  border-radius: 5px;
  color: #27363d;
  font-size: 0.85rem;
  min-height: 30px;
  padding: 5px 8px;
}

.filter-tab.active {
  background: #1446a0;
  border-color: #1446a0;
  color: #ffffff;
}

.filter-tab-panel {
  display: none;
}

.filter-tab-panel.active {
  display: grid;
  gap: 6px;
}

.filter-section {
  display: grid;
  gap: 8px;
  padding-bottom: 4px;
}

.filter-section h4 {
  justify-self: center;
  margin: 0;
  color: #1446a0;
  font-size: 0.95rem;
  width: min(100%, 284px);
}

.filter-section:has(#toggle-proyectos-mivi) > h4 {
  display: none;
}

.filter-section .check-row {
  justify-self: center;
  width: min(100%, 284px);
}

.filter-control-stack {
  display: grid;
  gap: 8px;
  justify-self: center;
  width: min(100%, 284px);
}

.filter-control-stack .check-row,
.filter-control-stack select {
  width: 100%;
}

.filter-section .filter-inline-action {
  justify-self: center;
  width: min(100%, 284px);
}

[data-filter-panel="riesgo"] .filter-grid {
  grid-template-columns: 1fr;
}

.filter-section select[multiple] {
  min-height: 76px;
}

.native-multi-hidden {
  display: none !important;
}

.chip-select {
  align-items: center;
  background: #ffffff;
  border: 1px solid #93c5fd;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr 34px;
  min-height: 36px;
  padding: 4px;
  position: relative;
}

#bank-select + .chip-select,
#atm-select + .chip-select,
#commerce-select + .chip-select,
#proyecto-tipo + .chip-select,
#censo-metric,
#barrios-censo-metric,
#manzanas-riesgo-symbol-field {
  justify-self: center;
  max-width: 284px;
  width: min(100%, 284px);
}

.chip-select.disabled {
  background: #f1f5f9;
  border-color: #d6e0e5;
  box-shadow: none;
  opacity: 0.72;
}

.chip-list {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.chip-item {
  align-items: center;
  background: #2f8fcb;
  border: 1px solid #1f6fa5;
  border-radius: 2px;
  color: #ffffff;
  display: inline-flex;
  font-size: 0.82rem;
  gap: 6px;
  line-height: 1;
  min-height: 27px;
  padding: 5px 8px;
}

.chip-item span {
  font-size: 1rem;
  line-height: 0.8;
}

.chip-placeholder {
  color: #94a3b8;
  font-size: 0.84rem;
  padding-left: 6px;
}

.chip-dropdown-toggle {
  align-items: center;
  background: #ffffff;
  border: 0;
  color: #475569;
  display: flex;
  font-size: 0.9rem;
  justify-content: center;
  min-height: 28px;
  padding: 3px;
  width: 30px;
}

.chip-dropdown-menu {
  background: #ffffff;
  border: 1px solid #93c5fd;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  left: -1px;
  max-height: 220px;
  overflow: auto;
  padding: 6px;
  position: absolute;
  right: -1px;
  top: calc(100% + 4px);
  z-index: 900;
}

.chip-dropdown-option {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 8px;
  grid-template-columns: 18px 1fr;
  min-height: 30px;
  padding: 5px 6px;
}

.chip-dropdown-option:hover {
  background: #eff6ff;
}

.filter-grid,
.filter-two-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.manual-filter-box {
  border: 1px solid #dde6ea;
  border-radius: 4px;
  padding: 10px;
}

.manual-filter-box summary {
  cursor: pointer;
  font-weight: 800;
}

.manual-filter-box label {
  margin-top: 10px;
}

.filter-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr 1.15fr;
  justify-self: center;
  width: min(100%, 360px);
}

.filter-actions button {
  border-radius: 5px;
  font-size: 0.88rem;
  min-height: 34px;
  padding: 0 12px;
}

.danger-soft-button {
  background: #fef2f2;
  color: #b91c1c;
}

.danger-soft-button:hover {
  background: #fee2e2;
}

.tool-grid {
  grid-template-columns: 1fr 1fr;
}

.tool-icon-button {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
  min-height: 46px;
  padding: 0 12px;
}

.tool-icon-button svg {
  flex: 0 0 auto;
  fill: currentColor;
  height: 23px;
  width: 23px;
}

.tool-icon-button span {
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.1;
}

.stats-layer-list {
  border-top: 1px solid #edf2f5;
  padding-top: 8px;
}

.stats-charts {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.stats-chart-card {
  background: #ffffff;
  border: 1px solid #dce7eb;
  border-radius: 6px;
  display: grid;
  gap: 9px;
  padding: 10px;
}

.stats-chart-card header {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.stats-chart-card h4 {
  color: #1f2937;
  font-size: 0.92rem;
  margin: 0;
}

.stats-chart-card header span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.stats-bar-list {
  display: grid;
  gap: 7px;
}

.stats-bar-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(84px, 1fr) minmax(100px, 1.7fr) 44px;
}

.stats-bar-row span {
  color: #334155;
  font-size: 0.78rem;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-bar-row i {
  background: #e8eef2;
  border-radius: 999px;
  display: block;
  height: 8px;
  overflow: hidden;
}

.stats-bar-row b {
  display: block;
  height: 100%;
}

.stats-bar-row strong {
  color: #1f2937;
  font-size: 0.78rem;
  text-align: right;
}

.stats-empty {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
  margin: 0;
}

.selection-report-panel {
  left: 50%;
  max-height: min(78vh, 760px);
  right: auto;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(760px, calc(100vw - 28px));
  z-index: 960;
}

#help-panel {
  left: 50%;
  right: auto;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(920px, calc(100vw - 28px));
}

.selection-report-panel.maximized {
  height: calc(100vh - 104px);
  max-height: calc(100vh - 104px);
  width: min(1120px, calc(100vw - 40px));
}

.division-selection-panel {
  width: min(420px, calc(100vw - 28px));
}

.coordinate-results-panel {
  top: 132px;
  width: min(420px, calc(100vw - 28px));
}

.coordinate-results-list {
  align-content: start;
  display: grid;
  gap: 8px;
}

.coordinate-result-group {
  align-content: start;
  border-top: 1px solid #edf2f5;
  display: grid;
  gap: 8px;
  padding-top: 10px;
}

.coordinate-result-group:first-child {
  border-top: 0;
  padding-top: 0;
}

.coordinate-result-items {
  display: grid;
  gap: 6px;
}

.coordinate-result-card {
  border-bottom: 1px solid #edf2f5;
  display: grid;
  gap: 6px;
  padding-bottom: 8px;
}

.coordinate-result-item {
  align-items: start;
  background: #ffffff;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  display: grid;
  gap: 3px;
  justify-items: start;
  min-height: 0;
  padding: 4px 0 0;
  text-align: left;
}

.coordinate-result-item:hover {
  background: #f8fbfc;
}

.coordinate-result-item strong {
  color: #2872b8;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
}

.coordinate-candidate-pager {
  align-items: center;
  color: #64748b;
  display: grid;
  font-size: 0.82rem;
  gap: 6px;
  grid-template-columns: 1fr auto 1fr;
}

.coordinate-candidate-pager button {
  background: #eef4f7;
  border: 1px solid #d8e2e7;
  border-radius: 4px;
  color: #24313a;
  cursor: pointer;
  font-size: 0.8rem;
  min-height: 28px;
  padding: 0 8px;
}

.coordinate-candidate-pager button:last-child {
  justify-self: end;
}

.coordinate-candidate-pager button:disabled {
  cursor: default;
  opacity: 0.45;
}

.coordinate-result-details {
  color: #6b7280;
  display: grid;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.82rem;
  gap: 2px;
  line-height: 1.2;
}

.coordinate-result-row {
  display: block;
}

.coordinate-result-row em {
  color: #8b8f95;
  font-style: italic;
  font-weight: 700;
  margin-right: 4px;
}

.coordinate-result-row span {
  color: #6f747a;
  font-style: italic;
}

.coordinate-selection-path {
  shape-rendering: geometricPrecision;
  stroke-linecap: butt !important;
  stroke-linejoin: miter !important;
  stroke-miterlimit: 10 !important;
}

.coordinate-result-empty {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.selection-report-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.selection-report-visual.hidden {
  display: none;
}

.locator-print-card {
  border: 2px solid #b9dcd4;
  border-radius: 4px;
  padding: 12px;
}

.locator-print-head {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 44px 1fr auto;
}

.locator-print-head b {
  align-items: center;
  background: var(--accent);
  border-radius: 999px;
  color: #fff;
  display: flex;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.locator-print-head h2 {
  font-size: 0.96rem;
  margin: 0;
}

.locator-print-head p,
.locator-print-head small {
  color: #64748b;
  display: block;
  font-weight: 750;
  margin: 3px 0 0;
}

.locator-print-head strong {
  color: #111827;
  text-align: right;
}

.locator-print-head strong small {
  display: block;
}

.locator-print-signal {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 82px 1fr 34px;
  margin-top: 7px;
}

.locator-print-signal strong {
  color: #64748b;
  font-size: 0.78rem;
}

.locator-print-signal span {
  background: #e2e8f0;
  border-radius: 999px;
  height: 7px;
  overflow: hidden;
}

.locator-print-signal i {
  background: var(--accent);
  display: block;
  height: 100%;
}

.locator-print-signal em {
  color: #334155;
  font-style: normal;
  font-weight: 800;
  text-align: right;
}

.locator-print-map {
  display: grid;
  gap: 6px;
}

.locator-print-map h2 {
  font-size: 0.94rem;
  margin: 0;
}

.locator-print-map-frame {
  border: 1px solid #d1d5db;
  border-radius: 4px;
  display: block;
  max-width: 100%;
  overflow: hidden;
  width: 560px;
}

.locator-print-map-frame svg {
  display: block;
  height: auto;
  width: 100%;
}

.reports-list {
  display: grid;
  gap: 8px;
}

.report-card {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 28px;
  min-height: 56px;
  border: 1px solid #dce7eb;
  border-radius: 6px;
  background: #f8fbfc;
  color: #1f2937;
  padding: 6px 8px 6px 10px;
  text-align: left;
}

.report-card > button:first-child {
  display: grid;
  gap: 4px;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
}

.report-card span {
  color: var(--muted);
  font-size: 0.82rem;
}

.report-card.active,
.report-card:hover {
  border-color: #2563eb;
  background: #eff6ff;
}

.report-remove-button {
  width: 26px;
  min-width: 26px;
  min-height: 26px;
  border: 1px solid #dbe3e8;
  border-radius: 4px;
  background: #ffffff;
  color: #64748b;
  padding: 0;
}

.report-remove-button:hover {
  border-color: #ef4444;
  color: #dc2626;
}

.selection-report-panel .panel-close {
  font-size: 0;
}

.selection-report-panel .panel-close::before {
  content: "×";
  font-size: 1rem;
}

.selection-table-wrap {
  max-height: 320px;
}

.selection-report-panel.maximized .selection-table-wrap {
  max-height: none;
}

.wide-button {
  width: 100%;
}

.help-pdf-viewer {
  width: min(860px, calc(100vw - 56px));
  height: min(72vh, 720px);
  min-height: 520px;
  border: 1px solid #dce7eb;
  border-radius: 4px;
  background: #f8fbfc;
}

.help-pdf-link {
  align-items: center;
  background: #2563eb;
  border-radius: 4px;
  color: #ffffff;
  display: inline-flex;
  justify-content: center;
  min-height: 38px;
  text-decoration: none;
}

.panel-note {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.account-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.account-summary div {
  display: grid;
  gap: 4px;
  border-bottom: 1px solid #edf2ef;
  padding-bottom: 9px;
}

.account-summary span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: uppercase;
}

.account-summary strong {
  color: var(--ink);
  font-size: 0.94rem;
  overflow-wrap: anywhere;
}

.account-form-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(260px, 1fr);
  gap: 10px;
  align-items: end;
}

.account-password-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 10px;
  align-items: end;
}

.account-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  margin-top: 4px;
}

.account-actions button {
  flex: 1 1 0;
  min-width: 0;
  max-width: 190px;
  white-space: nowrap;
}

.account-action-save {
  background: #2563eb;
}

.account-action-disclaimer {
  background: #0891b2;
}

.account-action-disclaimer:hover {
  background: #0e7490;
}

.account-action-save:hover {
  background: #1d4ed8;
}

.account-action-enable {
  background: #16a34a;
}

.account-action-enable:hover {
  background: #15803d;
}

.account-action-disable {
  background: #f59e0b;
  color: #111827;
}

.account-action-disable:hover {
  background: #d97706;
  color: #111827;
}

.account-action-dashboard {
  background: #7c3aed;
}

.account-action-dashboard:hover {
  background: #6d28d9;
}

.account-action-logout {
  background: #dc2626;
}

.account-action-logout:hover {
  background: #b91c1c;
}

.mini-button {
  justify-self: start;
  min-height: 30px;
  margin-top: 4px;
  padding: 0 10px;
  border-radius: 4px;
  background: #e8f0eb;
  color: var(--ink);
  font-size: 0.82rem;
}

.mini-button:hover {
  background: #d9e5de;
}

.account-disclaimer-copy {
  max-height: 360px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 890;
  background: rgba(18, 30, 34, 0.42);
  backdrop-filter: blur(2px);
}

.modal-panel {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  z-index: 900 !important;
  width: min(1040px, calc(100vw - 32px)) !important;
  max-height: min(88vh, 820px) !important;
  overflow: auto !important;
  transform: translate(-50%, -50%);
  border: 1px solid #cfd8dc;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.99);
  box-shadow: 0 24px 80px rgba(10, 20, 24, 0.32);
}

.user-modal-panel {
  width: min(1180px, calc(100vw - 24px)) !important;
}

.modal-close {
  width: 30px;
  min-width: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 4px;
  background: #edf2f4;
  color: #2d3436;
}

.modal-close:hover {
  background: #dbe4e7;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cache-progress-modal {
  width: min(620px, calc(100vw - 32px)) !important;
}

.cache-progress-modal header {
  border-bottom: 1px solid #e5edf0;
  margin-bottom: 14px;
  padding-bottom: 12px;
}

.cache-progress-modal h2 {
  margin-bottom: 4px;
}

.cache-progress-modal p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.cache-progress-track {
  background: #e5edf0;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.cache-progress-track span {
  background: #0f766e;
  display: block;
  height: 100%;
  transition: width 0.2s ease;
  width: 0;
}

.cache-progress-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.cache-progress-row {
  align-items: center;
  border: 1px solid #e5edf0;
  border-radius: 6px;
  display: grid;
  gap: 10px;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  min-height: 42px;
  padding: 8px 10px;
}

.cache-progress-row i {
  background: #cbd5e1;
  border-radius: 999px;
  display: block;
  height: 10px;
  width: 10px;
}

.cache-progress-row.running i {
  background: #2563eb;
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.14);
}

.cache-progress-row.done i {
  background: #0f766e;
}

.cache-progress-row.error i {
  background: #dc2626;
}

.cache-progress-row strong {
  color: #0f172a;
  display: block;
  font-size: 0.9rem;
}

.cache-progress-row small {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
  margin-top: 2px;
}

.cache-progress-row em {
  color: #64748b;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 800;
}

.cache-progress-actions {
  justify-content: flex-end;
  margin-top: 16px;
}

.coordinate-readout {
  position: absolute;
  left: 8px;
  bottom: 4px;
  z-index: 640;
  min-height: 24px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.9);
  color: #2e383d;
  padding: 5px 8px;
  font-size: 0.78rem;
}

.map-credit {
  position: absolute;
  left: 50%;
  bottom: 5px;
  z-index: 640;
  transform: translateX(-50%);
  color: #314148;
  font-size: 0.78rem;
}

.map-view .leaflet-top.leaflet-left {
  top: 96px;
}

.map-view .leaflet-control-zoom {
  border: 1px solid #cfd8dc;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

.map-view .leaflet-control-zoom a {
  width: 34px;
  height: 34px;
  border: 0;
  border-bottom: 1px solid #e3e8ee;
  background: #ffffff;
  color: #2d3436;
  display: grid;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  place-items: center;
}

.map-view .leaflet-control-zoom a:last-child {
  border-bottom: 0;
}

.map-view .leaflet-control-zoom a:hover {
  background: #f8fafc;
  color: #1f2b30;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 8px;
}

.icon-button {
  width: 42px;
  min-width: 42px;
  padding: 0;
  background: #e8f0eb;
  color: var(--ink);
}

.panel {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.layers-list {
  display: grid;
  gap: 8px;
}

.layer-row {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 36px;
  color: var(--ink);
}

.layer-row input {
  width: 18px;
  height: 18px;
}

.filter-legend {
  border-top: 1px solid #dfe8ec;
  display: grid;
  gap: 10px;
  margin-top: 8px;
  padding-top: 12px;
}

.filter-legend h4 {
  color: #1446a0;
  font-size: 0.95rem;
  margin: 0;
}

.filter-legend-group {
  display: grid;
  gap: 5px;
}

.filter-legend-group strong {
  color: #27363d;
  font-size: 0.88rem;
}

.filter-legend-group small {
  color: var(--muted);
}

.filter-legend-entries {
  display: grid;
  gap: 5px;
}

.filter-legend-entry {
  align-items: center;
  color: #435049;
  display: grid;
  font-size: 0.82rem;
  gap: 8px;
  grid-template-columns: 28px 1fr;
  min-height: 22px;
}

.legend-point-symbol,
.legend-logo-symbol {
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.24);
  display: inline-block;
  height: 16px;
  justify-self: center;
  width: 16px;
}

.legend-logo-symbol {
  align-items: center;
  background: #ffffff;
  color: #1446a0;
  display: flex;
  font-size: 7px;
  font-weight: 800;
  justify-content: center;
}

.legend-line-symbol {
  border-radius: 999px;
  display: inline-block;
  height: 4px;
  justify-self: center;
  width: 24px;
}

.legend-gradient {
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.14);
  display: inline-block;
  height: 10px;
  justify-self: center;
  width: 26px;
}

.result-count {
  color: var(--muted);
  margin-bottom: 0;
}

.filter-show-all-button {
  background: #dc2626;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  justify-self: center;
  margin-top: 8px;
  min-height: 30px;
  padding: 0 12px;
  width: fit-content;
}

.filter-show-all-button:hover {
  background: #b91c1c;
  color: #fff;
}

.leaflet-popup-content {
  max-height: min(440px, 68vh);
  overflow: auto;
}

.popup-table {
  border-collapse: collapse;
  min-width: 220px;
}

.popup-table th,
.popup-table td {
  padding: 5px 7px;
  text-align: left;
  vertical-align: top;
}

.popup-table th {
  color: #435049;
  font-weight: 800;
}

.popup-title {
  color: #101820;
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 8px;
  text-align: center;
}

.popup-logo {
  align-items: center;
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
  padding-bottom: 8px;
}

.popup-logo img {
  display: block;
  max-height: 38px;
  max-width: 96px;
  object-fit: contain;
}

.logo-point-marker {
  align-items: center;
  background: transparent;
  border: 0;
  box-shadow: none;
  display: flex;
  height: 20px !important;
  justify-content: center;
  overflow: hidden;
  width: 20px !important;
}

.logo-point-marker img {
  display: block;
  height: 20px !important;
  max-height: 20px !important;
  max-width: 20px !important;
  object-fit: contain;
  width: 20px !important;
}

.filter-inline-action {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.mini-button {
  min-height: 26px;
  padding: 4px 8px;
}

.mini-button.active {
  background: #1446a0;
  color: #ffffff;
}

.category-point-marker {
  align-items: center;
  display: flex;
  justify-content: center;
}

.category-point-marker span {
  align-items: center;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.26);
  color: #ffffff;
  display: flex;
  font-size: 10px;
  font-weight: 800;
  justify-content: center;
  line-height: 1;
}

@media (max-width: 820px) {
  .dashboard-view {
    gap: 16px;
    padding: 16px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    padding-bottom: 14px;
  }

  .stats-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-logo {
    height: 34px;
    margin-bottom: 6px;
  }

  .dashboard-title {
    font-size: 1.1rem;
  }

  .topbar-actions {
    align-items: stretch;
    display: grid;
    gap: 10px;
    justify-content: stretch;
    overflow: visible;
    width: 100%;
  }

  .dashboard-admin-actions {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  #open-map-button,
  #dashboard-profile-button,
  #dashboard-logout-button,
  #manage-companies-button,
  #manage-users-button,
  #manage-capabilities-button,
  #manage-services-button,
  #manage-events-button,
  .dashboard-icon-button {
    min-height: 42px;
    padding: 10px 12px;
    white-space: normal;
  }

  .dashboard-icon-button svg {
    height: 16px;
    width: 16px;
  }

  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .section-actions {
    justify-content: flex-start;
  }

  .section-actions button,
  .topbar-actions button {
    flex: 0 0 auto;
  }

  .admin-user-row {
    grid-template-columns: 1fr;
  }

  .admin-record-row {
    grid-template-columns: 1fr;
  }

  .service-config-row {
    grid-template-columns: 1fr;
  }

  .service-group-tabs,
  .filter-tabs {
    grid-template-columns: 1fr;
  }

  .filters-box {
    grid-template-columns: 1fr;
  }

  .filter-grid,
  .filter-two-cols,
  .filter-actions {
    grid-template-columns: 1fr;
  }

  .graph-summary,
  .graph-component-stats,
  .locator-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .locator-weight-grid,
  .locator-result-card {
    grid-template-columns: 1fr;
  }

  .locator-result-side {
    justify-items: start;
  }

  .table-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .event-row {
    grid-template-columns: 1fr;
  }

  .account-form-grid,
  .account-password-grid,
  .account-summary {
    grid-template-columns: 1fr;
  }

  .account-actions {
    flex-wrap: wrap;
  }

  .account-actions button {
    max-width: none;
  }

  .topbar-actions {
    justify-content: stretch;
  }

  .stat-card,
  .dashboard-panel {
    border-radius: 12px;
  }

  .stat-card {
    gap: 10px;
    padding: 16px;
  }

  .stat-card strong {
    font-size: 2rem;
  }

  .dashboard-panel {
    padding: 16px;
  }

  .dashboard-panel h2 {
    font-size: 0.95rem;
  }

  .metric-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    min-height: 0;
    padding: 6px 0;
  }

  .login-chart-row {
    gap: 8px;
    grid-template-columns: 1fr;
  }

  .login-chart-row span {
    white-space: normal;
  }
}

@media (max-width: 560px) {
  .dashboard-admin-actions {
    grid-template-columns: 1fr;
  }

  #open-map-button,
  #dashboard-profile-button,
  #dashboard-logout-button {
    width: 100%;
  }

  .map-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    gap: 10px;
  }

  .map-menu .toolbar-button,
  .map-menu .base-map-button {
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 42px;
    font-size: 0.8rem;
    padding: 10px 12px;
    white-space: normal;
  }

  .map-menu .toolbar-button::before {
    content: none;
  }

  #account-panel {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    max-height: calc(100vh - 16px) !important;
  }

  .account-summary {
    gap: 6px;
  }

  .account-summary div {
    padding-bottom: 8px;
  }

  .account-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
  }

  .account-actions button {
    max-width: none;
    min-height: 42px;
    width: 100%;
    white-space: normal;
    text-align: center;
  }

  .map-topbar {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 6px;
    min-height: 42px;
    padding: 5px 8px 6px;
  }

  .map-logo {
    grid-column: 1;
    grid-row: 1;
    width: 92px;
    min-width: 92px;
    padding-top: 1px;
  }

  .map-logo img {
    height: 20px;
  }

  .mobile-menu-button {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    min-width: 28px;
    border-radius: 3px;
    padding: 0;
    background: #ffffff;
    color: #1f2b30;
    box-shadow: 0 1px 2px rgba(31, 44, 48, 0.12);
  }

  .map-menu {
    position: absolute;
    top: 42px;
    left: 8px;
    right: 8px;
    z-index: 780;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 9px;
    border: 1px solid #d7e0e5;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
  }

  .map-menu.open {
    display: grid;
  }

  .mobile-account-button {
    display: inline-flex;
    justify-content: center;
    text-align: center;
  }

  .map-session {
    grid-column: 3;
    grid-row: 1;
    justify-content: end;
  }

  #map-user-button {
    display: none;
  }

  .toolbar-button,
  .logout-button {
    min-height: 27px;
    padding: 0 9px;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .left-toolbox {
    top: 176px;
  }

  .geoai-float-button {
    left: 9px;
    top: 399px;
  }

  .map-view .leaflet-top.leaflet-left {
    top: 68px;
  }

  .base-map-switcher {
    top: 60px;
    right: 10px;
    z-index: 760;
  }

  .base-map-menu {
    z-index: 790;
  }

  .map-panel {
    top: 58px;
    right: 8px;
    left: 48px;
    width: auto;
  }

  .selection-report-panel {
    left: 50%;
    right: auto;
    top: 50%;
    width: calc(100vw - 28px);
  }

  .selection-report-panel.maximized {
    height: calc(100vh - 78px);
    max-height: calc(100vh - 78px);
    width: calc(100vw - 24px);
  }

  .search-drawer {
    bottom: 0;
    left: auto;
    max-height: none;
    right: 0;
    top: 42px;
    width: min(320px, calc(100vw - 36px));
  }

  .geoai-panel {
    bottom: 18px;
    left: 8px;
    right: 8px;
    top: auto;
    width: auto;
    max-height: min(64vh, 520px);
    padding: 10px;
    z-index: 780;
  }

  .geoai-messages {
    min-height: 120px;
  }

  .geoai-message {
    font-size: 0.84rem;
  }

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

  .geoai-form button {
    width: 100%;
  }

  .map-credit {
    display: none;
  }
}
