:root {
  color-scheme: dark;
  --bg: #080a0d;
  --card: #0f131a;
  --card-border: #1a1f2b;
  --text: #e8ecf5;
  --muted: #a2abbe;
  --accent: #4db7ff;
  --accent-dark: #2f9be8;
  --success: #38d173;
  --success-soft: #1a3226;
  --manual: #7be7b0;
  --manual-soft: #0f2219;
  --warning: #fbbf24;
  --warning-soft: #2f2305;
  --pending: #8ab4ff;
  --pending-soft: #0b1a33;
  --danger: #f87171;
  --alert-hit: #ff4d57;
  --alert-hit-soft: #4d0a12;
  --flag: #f4b740;
  --flag-soft: #1e1606;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  font-family: 'SF Pro Display', 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #0a0c11 0%, #06070b 100%);
  color: var(--text);
}

a {
  color: inherit;
}

.auth-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  gap: 24px;
  padding: 32px;
}

.auth-card {
  width: min(420px, 100%);
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.auth-copy {
  margin: 0 0 24px;
  color: var(--muted);
}

.login-tabs {
  margin: 0 0 20px;
}

.login-tabs .pill {
  min-width: 140px;
  justify-content: center;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  color: var(--muted);
  gap: 8px;
}

.auth-form input {
  background: #0c1118;
  border: 1px solid #243045;
  border-radius: 12px;
  padding: 12px;
  color: var(--text);
  font-size: 16px;
}

.auth-form button {
  margin-top: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #0a84ff, #0066cc);
  cursor: pointer;
}

.auth-error {
  color: var(--danger);
  margin: 8px 0 0;
  font-size: 14px;
}

.app-view {
  min-height: 100vh;
  padding: 32px clamp(16px, 4vw, 64px) 48px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.app-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--card-border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: auto;
  height: 22px;
  max-width: 160px;
  border-radius: 0;
  object-fit: contain;
}

.app-header h1 {
  margin: 4px 0 0;
  font-size: clamp(28px, 3vw, 36px);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.app-header .dashboard-tabs {
  flex: 1 1 auto;
  justify-content: center;
  min-width: 320px;
}

.header-settings {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.user-pill {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid #243045;
  font-size: 14px;
  color: var(--text);
  background: #0c1118;
}

.ghost-btn {
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: #0c1118;
  color: var(--text);
  padding: 10px 16px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.ghost-btn--small {
  padding: 6px 12px;
  font-size: 14px;
}

.ghost-btn:hover,
.ghost-btn:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.ghost-btn.is-active {
  color: #d4e8ff;
  border-color: #4e7aa6;
  background: rgba(77, 183, 255, 0.2);
}
.ghost-btn:disabled {
  opacity: 0.55;
  color: #7f91aa;
  border-color: #2a3446;
  cursor: default;
}

.ghost-btn:disabled:hover,
.ghost-btn:disabled:focus-visible {
  color: #7f91aa;
  border-color: #2a3446;
}

.app-footer,
.auth-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

.app-footer {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--card-border);
}

.auth-footer {
  text-align: center;
}

.footer-links {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-links a {
  text-decoration: none;
  color: var(--muted);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--accent);
}

.footer-sep {
  color: var(--muted);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 0.9fr);
  gap: clamp(16px, 3vw, 36px);
}

.dashboard-main {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.dashboard-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.dashboard-tab {
  border-radius: 12px;
  border: 1px solid #243045;
  background: #0c1118;
  color: var(--muted);
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.dashboard-tab:hover,
.dashboard-tab:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.dashboard-tab.is-active {
  color: #d4e8ff;
  border-color: #4e7aa6;
  background: rgba(77, 183, 255, 0.2);
}

.dashboard-panel[hidden] {
  display: none !important;
}

.notifications-tab-grid .settings-card {
  min-height: 0;
}

.notifications-tab-grid.is-filters-collapsed {
  grid-template-columns: minmax(0, 1fr);
}

.notifications-tab-grid.is-filters-collapsed .settings-card {
  display: none;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  padding: clamp(20px, 3vw, 28px);
  box-shadow: var(--shadow);
  min-height: 320px;
}

body.dashboard-modal-open {
  overflow: hidden;
}

.dashboard-modal {
  position: fixed;
  inset: 0;
  z-index: 5200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 2.5vw, 28px);
  background: rgba(3, 9, 18, 0.72);
}

#streetworkAddModal.streetwork-add-modal--plotting {
  align-items: flex-start;
  justify-content: flex-end;
  background: rgba(3, 9, 18, 0.2);
  pointer-events: none;
}

#streetworkAddModal.streetwork-add-modal--plotting .dashboard-modal__dialog {
  width: min(460px, 100%);
  pointer-events: auto;
}

.dashboard-modal[hidden] {
  display: none !important;
}

.dashboard-toast {
  position: fixed;
  right: clamp(12px, 2.4vw, 28px);
  bottom: clamp(12px, 2.6vw, 30px);
  z-index: 5600;
  min-width: min(260px, calc(100vw - 28px));
  max-width: min(420px, calc(100vw - 28px));
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(116, 194, 255, 0.55);
  background: linear-gradient(135deg, rgba(21, 44, 66, 0.96), rgba(16, 35, 52, 0.94));
  color: #e6f3ff;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 20px 56px rgba(2, 8, 18, 0.55);
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.dashboard-toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.dashboard-toast.is-error {
  border-color: rgba(248, 113, 113, 0.62);
  background: linear-gradient(135deg, rgba(78, 25, 25, 0.95), rgba(63, 19, 19, 0.94));
  color: #fee2e2;
}

.dashboard-modal__dialog {
  width: min(560px, 100%);
  max-height: min(92vh, 860px);
  overflow: auto;
  background: #0d131d;
  border: 1px solid #22324b;
  border-radius: 20px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
  padding: clamp(16px, 2.4vw, 24px);
}

.dashboard-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.dashboard-modal__close {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
}

.dashboard-modal__close svg {
  width: 16px;
  height: 16px;
}

.dashboard-modal__header h2 {
  margin: 4px 0 0;
  font-size: 22px;
}

.dashboard-modal__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dashboard-modal__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

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

.dashboard-modal__field input,
.dashboard-modal__field select,
.dashboard-modal__field textarea {
  width: 100%;
  background: #09101a;
  border: 1px solid #22324b;
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 15px;
}

.dashboard-modal__date-range-control {
  position: relative;
}

.dashboard-modal__date-range-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-modal__date-range-trigger {
  flex: 1 1 auto;
  min-height: 44px;
  width: 100%;
  border: 1px solid #22324b;
  border-radius: 10px;
  background: #09101a;
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-modal__date-range-trigger:hover,
.dashboard-modal__date-range-trigger:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(77, 183, 255, 0.28);
}

.dashboard-modal__date-range-trigger.is-active {
  border-color: #4e7aa6;
  background: rgba(77, 183, 255, 0.16);
  color: #dbeeff;
}

.dashboard-modal__date-range-clear {
  flex: 0 0 auto;
  min-width: 72px;
}

.dashboard-modal__date-range-panel {
  left: 0;
  right: auto;
  top: calc(100% + 8px);
  width: min(360px, 100%);
  max-width: calc(100vw - 44px);
  z-index: 5400;
}

.dashboard-modal__readonly-id {
  background: #070d16;
  color: #b9cce4;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  letter-spacing: 0.02em;
}

.dashboard-modal__copy-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-modal__copy-row input {
  min-width: 0;
  flex: 1 1 auto;
}

.dashboard-copy-btn {
  flex: 0 0 auto;
  min-width: 74px;
}

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

.dashboard-modal__field input:focus,
.dashboard-modal__field select:focus,
.dashboard-modal__field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(77, 183, 255, 0.28);
}

.dashboard-modal__hint {
  margin-top: -4px;
}

.dashboard-modal__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
  padding-bottom: 8px;
}

.dashboard-modal__inputwrap {
  position: relative;
}

.dashboard-modal__suffix {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 13px;
  pointer-events: none;
}

.dashboard-modal__inputwrap input {
  padding-right: 36px;
}

.dashboard-modal__coords {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(128, 166, 212, 0.35);
  border-radius: 10px;
  background: rgba(45, 77, 117, 0.22);
  color: #dbeafe;
  font-size: 13px;
}

.dashboard-modal__plot-tools {
  justify-content: flex-end;
}

.dashboard-modal__plot-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.dashboard-modal__plot-actions .ghost-btn {
  white-space: nowrap;
}

.dashboard-modal__dialog--danger {
  border-color: rgba(248, 113, 113, 0.45);
}

.dashboard-modal__warning {
  margin: 0;
  color: #fecaca;
  font-size: 14px;
  line-height: 1.45;
}

.dashboard-modal__delete-name {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: rgba(127, 29, 29, 0.24);
  color: #fee2e2;
  font-size: 14px;
  font-weight: 600;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.section-header h2 {
  margin: 4px 0 0;
  font-size: 22px;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}


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

.search-field {
  flex: 1;
  min-width: 220px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid #1f2733;
  background: #0c1118;
  color: var(--text);
}

.search-field input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 15px;
}

.search-field input:focus {
  outline: none;
}

.search-field input::placeholder {
  color: var(--muted);
}

.search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.search-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.notification-sort-btn svg {
  width: 18px;
  height: 18px;
}

.notification-sort-btn.is-oldest svg {
  transform: rotate(180deg);
}

.filters-column-toggle-btn svg {
  width: 18px;
  height: 18px;
  transform: rotate(180deg);
  transition: transform 0.2s ease;
}

.filters-column-toggle-btn.is-collapsed {
  color: #d4e8ff;
  border-color: #4e7aa6;
  background: rgba(77, 183, 255, 0.2);
}

.filters-column-toggle-btn.is-collapsed svg {
  transform: rotate(0deg);
}

.filter-pills {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid #1e2633;
  background: #0b1017;
}

.date-filter-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid #1f2733;
  background: #0b1017;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn:hover,
.icon-btn:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.settings-cog-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.settings-cog-btn svg {
  width: 18px;
  height: 18px;
}

.settings-cog-btn.is-active {
  color: #d4e8ff;
  border-color: #4e7aa6;
  background: rgba(77, 183, 255, 0.2);
}

.dashboard-settings-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 320px;
  max-width: min(92vw, 420px);
  z-index: 1300;
}

.dashboard-settings-menu[hidden] {
  display: none !important;
}

.dashboard-settings-menu .settings-panel {
  border-color: #22324b;
  background: #0a1119;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.date-filter-btn.is-active {
  color: #d4e8ff;
  border-color: #4e7aa6;
  background: rgba(77, 183, 255, 0.2);
}

.date-filter-clear {
  width: 44px;
  height: 44px;
}

.date-filter-clear svg {
  width: 18px;
  height: 18px;
}

.date-range-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(340px, 92vw);
  border: 1px solid #203047;
  border-radius: 14px;
  background: #0a1119;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  padding: 10px;
  z-index: 1200;
}

.date-range-panel[hidden] {
  display: none !important;
}

.date-range-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.date-range-panel__month {
  font-size: 14px;
  font-weight: 600;
  color: #e7eef8;
}

.date-range-panel__nav {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid #22324b;
  background: #111b29;
  color: #d3e7ff;
  cursor: pointer;
}

.date-range-panel__weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 6px;
  font-size: 11px;
  color: #8ea4c1;
  text-align: center;
}

.date-range-panel__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid #22324b;
  border-radius: 10px;
  overflow: hidden;
  background: #22324b;
}

.date-range-day {
  height: 36px;
  border: none;
  border-radius: 0;
  background: #0f1723;
  color: #d7e8fb;
  font-size: 12px;
  cursor: pointer;
}

.date-range-day:hover,
.date-range-day:focus-visible {
  border-color: #4db7ff;
  outline: none;
}

.date-range-day.is-outside {
  color: #5f738f;
  background: #0b131e;
}

.date-range-day.is-today {
  border-color: #2c5b84;
}

.date-range-day.is-in-range {
  background: rgba(77, 183, 255, 0.2);
  color: #f2f8ff;
}

.date-range-day.is-in-range:not(.is-range-start):not(.is-range-end) {
  border-radius: 0;
}

.date-range-day.is-range-start,
.date-range-day.is-range-end {
  background: #4db7ff;
  border-color: #4db7ff;
  color: #061320;
  font-weight: 700;
}

.date-range-day.is-range-start {
  border-top-left-radius: 9px;
  border-bottom-left-radius: 9px;
}

.date-range-day.is-range-end {
  border-top-right-radius: 9px;
  border-bottom-right-radius: 9px;
}

.date-range-day.is-range-start.is-range-end {
  border-radius: 9px;
}

.date-range-panel__footer {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.date-range-panel__selection {
  margin: 0;
  color: #9fb2ca;
  font-size: 12px;
}

.date-range-panel__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.date-range-panel__actions .primary-btn {
  padding: 7px 12px;
  font-size: 12px;
}

.pill {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.pill.is-active {
  background: rgba(77, 183, 255, 0.18);
  color: var(--text);
}
.pill.is-active[data-status-filter="auto"]{
  background: rgba(56, 209, 115, 0.16);
  color: var(--success);
}
.pill.is-active[data-status-filter="manual"]{
  background: rgba(123, 231, 176, 0.18);
  color: var(--manual);
}
.pill.is-active[data-status-filter="auto_streetworks"]{
  background: rgba(251, 191, 36, 0.18);
  color: var(--warning);
}
.pill.is-active[data-status-filter="pending"]{
  background: rgba(138, 180, 255, 0.18);
  color: var(--pending);
}
.pill.is-active[data-status-filter="alerts"]{
  background: rgba(255, 77, 87, 0.18);
  color: var(--alert-hit);
}
.pill.is-active[data-status-filter="rejected"]{
  background: rgba(248, 113, 113, 0.18);
  color: var(--danger);
}
.pill.is-active[data-status-filter="flagged"]{
  background: rgba(244, 183, 64, 0.18);
  color: var(--flag);
}

.inline-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid #1f2733;
  background: #0c1118;
  color: var(--muted);
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(77, 183, 255, 0.12);
  color: var(--accent);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  text-align: center;
}

.status-badge--auto {
  background: var(--success-soft);
  color: var(--success);
}

.status-badge--street {
  background: var(--warning-soft);
  color: var(--warning);
}

.status-badge--pending {
  background: var(--pending-soft);
  color: var(--pending);
}

.status-badge--alert-hit {
  background: var(--alert-hit-soft);
  color: var(--alert-hit);
}

.status-badge--rejected {
  background: #3c0a0a;
  color: #f87171;
}

.status-badge--manual {
  background: var(--manual-soft);
  color: var(--manual);
}
.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pager{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:14px;
  padding-top:6px;
}
.pager-bottom{
  justify-content:flex-start;
}
.pager-info{
  margin-left:auto;
  color:var(--muted);
  font-size:13px;
}

.notification-row {
  border: 1px solid var(--card-border);
  border-radius: 18px;
  background: #0c1118;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.notification-row.is-flagged {
  border-color: rgba(244, 183, 64, 0.65);
  background: linear-gradient(130deg, #0c1118 0%, #14110a 60%, #1b1406 100%);
  box-shadow: 0 0 0 1px rgba(244, 183, 64, 0.1);
}

.notification-row:hover {
  border-color: var(--accent);
}

.notification-row.is-flagged:hover {
  border-color: var(--flag);
}

.row-main {
  flex: 1;
  display: flex;
  gap: 16px;
  align-items: center;
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.row-pill {
  min-width: 84px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #0c1118;
  border: 1px solid #243045;
  text-transform: capitalize;
  font-size: 13px;
}

.row-pill.pill-auto {
  border-color: rgba(52, 211, 153, 0.8);
  color: var(--success);
}

.row-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.row-title {
  font-weight: 600;
  font-size: 16px;
}

.row-meta {
  font-size: 13px;
  color: var(--muted);
}

.row-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.flag-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 2px;
  border-radius: 6px;
  line-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.flag-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.flag-btn.is-active {
  color: var(--flag);
}

.flag-btn:hover,
.flag-btn:focus-visible {
  color: var(--flag);
}

.primary-btn {
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #2f9be8, #2563eb);
  color: #fff;
  font-weight: 600;
  padding: 10px 16px;
  cursor: pointer;
}

.primary-btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.danger-btn {
  border: 1px solid #b91c1c;
  border-radius: 12px;
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  font-weight: 600;
  padding: 10px 16px;
  cursor: pointer;
  transition: border-color 0.2s ease, filter 0.2s ease;
}

.danger-btn:hover,
.danger-btn:focus-visible {
  border-color: #ef4444;
  filter: brightness(1.06);
  outline: none;
}

.danger-btn:disabled {
  opacity: 0.6;
  cursor: default;
  filter: none;
}

.empty-state {
  border-radius: 18px;
  border: 1px dashed #243045;
  padding: 32px;
  text-align: center;
  color: var(--muted);
}

.muted {
  color: var(--muted);
  margin: 4px 0 0;
  font-size: 13px;
}

.settings-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.insights-card {
  margin-bottom: 0;
}

.insights-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 28px;
}

.insights-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 14px;
}

.insights-panel {
  border: 1px solid #1f2733;
  background: #0b1119;
  border-radius: 16px;
  padding: 14px;
}

.insights-panel--full {
  margin-top: 14px;
}

.insights-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.insights-panel-head h3 {
  margin: 0;
  font-size: 16px;
}

.insights-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.insights-segment {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #0a1119;
  border: 1px solid #203047;
  border-radius: 999px;
  padding: 3px;
}

.insights-segment-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  padding: 7px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.insights-segment-btn.is-active {
  background: rgba(77, 183, 255, 0.2);
  color: #dbeafe;
}

.insight-trend-chart {
  position: relative;
  height: 268px;
  border-radius: 12px;
  border: 1px solid #22324b;
  background: linear-gradient(180deg, rgba(22, 31, 46, 0.92) 0%, rgba(13, 20, 31, 0.96) 100%);
  padding: 12px;
  overflow: hidden;
}

.insight-chart-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--muted);
  font-size: 13px;
}

.insight-chart-bars {
  position: relative;
  height: calc(100% - 18px);
  width: 100%;
  display: flex;
  align-items: flex-end;
  gap: 2px;
}

.insight-chart-bar {
  flex: 1 1 0;
  min-width: 3px;
  border: none;
  border-radius: 8px 8px 0 0;
  background: var(--bar-color, #4db7ff);
  height: max(var(--bar-height, 2%), 2px);
  opacity: 0.86;
  cursor: pointer;
  transition: opacity 0.16s ease, filter 0.16s ease;
  padding: 0;
}

.insight-chart-bar:hover,
.insight-chart-bar:focus-visible,
.insight-chart-bar.is-active {
  opacity: 1;
  filter: brightness(1.08);
  outline: none;
}

.insight-chart-axis {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #8ca2bf;
  font-size: 11px;
}

.insight-chart-tooltip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  background: rgba(7, 12, 20, 0.95);
  color: #e5edf8;
  border: 1px solid #2d4567;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.35;
  box-shadow: 0 10px 22px rgba(2, 7, 16, 0.5);
  max-width: min(260px, 78vw);
}

.insight-summary-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 10px;
}

.insight-summary-table th,
.insight-summary-table td {
  padding: 8px 0;
  border-bottom: 1px solid rgba(96, 123, 160, 0.18);
  font-size: 13px;
  vertical-align: top;
}

.insight-summary-table th {
  text-align: left;
  color: #9cb0cb;
  font-weight: 500;
  width: 44%;
}

.insight-summary-table td {
  text-align: right;
  color: #e6f0fb;
  font-weight: 600;
}

.insight-status-mix {
  display: grid;
  gap: 8px;
}

.insight-status-row {
  display: grid;
  grid-template-columns: 122px minmax(0, 1fr) 52px;
  gap: 8px;
  align-items: center;
}

.insight-status-label {
  color: #a8bdd8;
  font-size: 12px;
}

.insight-status-bar {
  height: 8px;
  border-radius: 999px;
  background: #172436;
  overflow: hidden;
}

.insight-status-fill {
  display: block;
  height: 100%;
  width: var(--pct, 0%);
  background: var(--fill, #4db7ff);
  border-radius: 999px;
}

.insight-status-value {
  text-align: right;
  color: #d7e6f7;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.insight-top-routes {
  display: grid;
  gap: 8px;
}

.insight-route-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(90, 121, 162, 0.26);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(14, 22, 34, 0.82);
}

.insight-route-rank {
  color: #9ab1cc;
  font-size: 12px;
  font-weight: 700;
}

.insight-route-main {
  min-width: 0;
}

.insight-route-block {
  margin: 0;
  color: #e7f0fb;
  font-size: 13px;
  font-weight: 600;
  word-break: break-all;
}

.insight-route-label {
  margin: 3px 0 0;
  color: #8ea5c2;
  font-size: 12px;
}

.insight-route-count {
  color: #dbe8f8;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.insight-route-copy {
  border: 1px solid rgba(92, 125, 166, 0.45);
  background: rgba(21, 31, 46, 0.86);
  color: #cfe1f7;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.insight-route-copy:hover,
.insight-route-copy:focus-visible {
  border-color: #4db7ff;
  color: #e8f3ff;
  outline: none;
}
.settings-inline-control {
  margin-bottom: 0;
}

.settings-inline-control .setting-row {
  border-top: none;
  padding: 0;
}

.settings-inline-control .muted {
  margin: 0;
  max-width: 320px;
}

.dashboard-demo-council-field {
  display: block;
  margin: 12px 0 6px;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.dashboard-demo-council-select {
  width: 100%;
  background: #09101a;
  border: 1px solid #22324b;
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
}

.dashboard-demo-council-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(77, 183, 255, 0.28);
}
.dashboard-setting-field-group {
  margin-top: 12px;
}

.dashboard-setting-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-setting-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 40px;
  background: #09101a;
  border: 1px solid #22324b;
  border-radius: 10px;
  padding: 0 12px;
  color: var(--text);
  font-size: 14px;
}

.dashboard-setting-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(77, 183, 255, 0.28);
}

.dashboard-setting-inline-btn {
  height: 40px;
  min-width: 74px;
  padding: 0 12px;
  border-radius: 10px;
  white-space: nowrap;
}

.infrastructure-card {
  min-height: 0;
  padding: clamp(14px, 2.2vw, 20px);
}

.infrastructure-layout {
  --infrastructure-map-height: clamp(680px, 86vh, 1100px);
  display: block;
}

.infrastructure-map {
  min-height: 680px;
  height: var(--infrastructure-map-height);
  border-radius: 18px;
}

.approvals-map-status {
  margin: 0 0 10px;
}

.infrastructure-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: var(--infrastructure-map-height);
  overflow: auto;
  padding-right: 2px;
}

.infrastructure-layer-pills .pill {
  white-space: nowrap;
}

.infrastructure-mini-metrics {
  margin-bottom: 0;
}

.infrastructure-top-block {
  border: 1px solid #1f2733;
  border-radius: 14px;
  background: #0c1118;
  padding: 12px;
}

.infrastructure-top-list {
  margin: 10px 0 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
}

.infrastructure-top-list li {
  color: var(--text);
  font-size: 13px;
}

.infrastructure-insights-metrics {
  margin-bottom: 20px;
}

#insightMostHitName {
  font-size: 18px;
  line-height: 1.2;
  word-break: break-word;
}

.struct-icon,
.sw-icon {
  background: transparent !important;
  border: none !important;
}

.infra-heat-hex {
  transition: fill-opacity 120ms ease, opacity 120ms ease;
}

.infra-heat-hex:hover,
.infra-heat-hex:focus {
  filter: brightness(1.06);
}

.approvals-density-hex {
  transition: fill-opacity 120ms ease, opacity 120ms ease;
}

.approvals-density-hex:hover,
.approvals-density-hex:focus {
  filter: brightness(1.06);
}

.leaflet-popup.infra-hover-card,
.leaflet-tooltip.infra-hover-card {
  pointer-events: none;
}

.leaflet-popup.infra-hover-card .leaflet-popup-content-wrapper,
.leaflet-tooltip.infra-hover-card {
  background: transparent;
  border: none;
  border-radius: 14px;
  box-shadow: none;
  padding: 0;
}

.leaflet-popup.infra-hover-card .leaflet-popup-content {
  margin: 0;
  padding: 0;
}

.leaflet-tooltip.infra-hover-card::before,
.leaflet-popup.infra-hover-card .leaflet-popup-tip-container {
  display: none;
}

.infra-structure-hover-card {
  color: #fff;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.55);
  width: clamp(220px, 28vw, 340px);
  max-width: min(360px, 80vw);
  overflow: hidden;
  position: relative;
}

.infra-structure-hover-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent, #4db7ff);
}

.infra-structure-hover-card .inner {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.infra-structure-hover-card .title {
  margin: 0;
  color: #fff;
  font: 800 clamp(14px, 1.2vw, 17px)/1.28 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.infra-structure-hover-card .row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 2px 0;
}

.infra-structure-hover-card .muted {
  margin: 0;
  color: #cfd6e4;
  font: 600 clamp(12px, 1.02vw, 13px)/1.35 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.insight-map-panel {
  border: 1px solid #1f2733;
  border-radius: 18px;
  padding: 12px;
  background: #0c1118;
}

.insight-map-panel.is-expanded {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  border-radius: 0;
  border-color: #3b5678;
  background: #090e15;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.7);
}

@supports (height: 100dvh) {
  .insight-map-panel.is-expanded {
    height: 100dvh;
  }
}

@supports not (height: 100dvh) {
  .insight-map-panel.is-expanded {
    height: 100vh;
  }
}

.insight-map-panel.is-expanded .insight-map-wrap {
  flex: 1 1 auto;
  min-height: 0;
}

.insight-map-panel.is-expanded .insight-map-head {
  margin-bottom: 12px;
  flex: 0 0 auto;
  align-items: center;
}

.insight-map-panel.is-expanded .insight-map-actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.insight-map-panel.is-expanded .insight-map-actions label {
  font-size: 13px;
}

.insight-map-panel.is-expanded .insight-map-actions #areaRadiusValue {
  min-width: 64px;
}

.insight-map-panel.is-expanded #areaRadiusKm {
  width: 200px;
  max-width: 32vw;
}

.insight-map-panel.is-expanded .ghost-btn--small {
  padding: 8px 12px;
}

.insight-map-panel.is-expanded .insight-map {
  height: 100%;
  min-height: 0;
}

.insight-map-panel.is-expanded .insight-map-expand-btn {
  top: 12px;
  right: 12px;
}

.insight-map-panel.is-expanded #areaFilterHint {
  margin-top: 8px;
  margin-bottom: 0;
  flex: 0 0 auto;
}

.insight-map-panel.is-expanded .dimension-filters-panel {
  display: none;
}

body.area-map-expanded {
  overflow: hidden;
}

body.area-map-expanded .date-range-panel {
  display: none !important;
}

.insight-map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.insight-map-head .metric-label {
  margin: 0;
}

.insight-map-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.insight-map-actions label {
  color: var(--muted);
  font-size: 12px;
}

#areaRadiusKm {
  width: 120px;
}

#areaRadiusValue {
  min-width: 54px;
  font-size: 12px;
  color: var(--text);
}

.insight-map {
  width: 100%;
  height: 250px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #223146;
  background: #0a0f16;
}

.insight-map .leaflet-control-attribution {
  font-size: 10px;
  background: rgba(6, 10, 14, 0.75);
  color: #d7e6f7;
}

.insight-map .leaflet-control-attribution a {
  color: #d7e6f7;
}

.insight-map-wrap {
  position: relative;
}

.area-filter-marker {
  background: transparent;
  border: 0;
}

.area-filter-marker span {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid #4db7ff;
  background: rgba(77, 183, 255, 0.26);
  box-shadow: 0 0 0 2px rgba(7, 18, 30, 0.82);
}
.insight-map-expand-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(155, 180, 214, 0.45);
  background: rgba(10, 17, 26, 0.86);
  color: #d8e9ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.insight-map-wrap:hover .insight-map-expand-btn,
.insight-map-expand-btn:focus-visible,
.insight-map-panel.is-expanded .insight-map-expand-btn {
  opacity: 1;
  pointer-events: auto;
}

.insight-map-expand-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.insight-map-expand-btn:hover,
.insight-map-expand-btn:focus-visible {
  border-color: #6bb8ff;
  color: #ffffff;
  outline: none;
}

.dimension-filters-panel {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #1f2733;
}

.dimension-filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dimension-filters-head .metric-label {
  margin: 0;
}

.dimension-filters-head .ghost-btn--small {
  white-space: nowrap;
}

.dimension-filters-panel > .muted {
  margin: 6px 0 0;
  font-size: 12px;
}

.dimension-filters-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
}

.dimension-filter {
  border: 1px solid #40658a;
  border-radius: 12px;
  background: #0d1723;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 1;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.dimension-filter.is-active {
  border-color: #40658a;
  background: #0d1723;
  opacity: 1;
}

.dimension-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dimension-filter-title {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.dimension-filter-range {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.dimension-filter-range label {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.dimension-filter-range input[type="range"] {
  width: 100%;
  min-width: 0;
}

.dimension-filter-value {
  min-width: 64px;
  text-align: right;
  color: var(--text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.metric {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid #1f2733;
  background: #0c1118;
}

.metric-label {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
}

.metric-value {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
}

.metric-value.auto {
  color: var(--accent);
}

.metric-value.success {
  color: var(--success);
}

.metric-value.warning {
  color: var(--warning);
}

.metric-value.pending {
  color: var(--pending);
}

.metric-value.alert-hit {
  color: var(--alert-hit);
}

.metric-value.danger {
  color: var(--danger);
}

.metric-value.flagged {
  color: var(--flag);
}

.settings-panel {
  border-radius: 18px;
  border: 1px solid var(--card-border);
  padding: 20px;
  background: #0c1118;
}

.settings-panel h3 {
  margin: 0 0 16px;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--card-border);
  padding: 16px 0;
}

.setting-row:first-of-type {
  border-top: none;
  padding-top: 0;
}

.switch {
  border: none;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex: 0 0 46px;
  width: 46px;
  min-width: 46px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: #1b2433;
  position: relative;
  overflow: hidden;
}

.switch:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.switch:disabled {
  opacity: 0.6;
  cursor: default;
}

.switch span {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #0b1118;
  transition: transform 0.2s ease;
}

.switch[data-state="on"] {
  border-color: var(--accent);
  background: rgba(77, 183, 255, 0.22);
}

.switch[data-state="on"] span {
  transform: translateX(22px);
  background: var(--accent);
}

.settings-subsection {
  margin-top: 20px;
}

.settings-subsection .subheading {
  margin: 0 0 4px;
  font-weight: 600;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chip-toggle {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: transparent;
  color: var(--muted);
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip-toggle.is-active {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(77, 183, 255, 0.2);
}

@media (max-width: 960px) {
  .app-header .dashboard-tabs {
    order: 3;
    flex: 1 0 100%;
    min-width: 0;
    justify-content: flex-start;
  }

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

  .infrastructure-layout {
    --infrastructure-map-height: 420px;
  }

  .infrastructure-map {
    height: var(--infrastructure-map-height);
    min-height: 360px;
  }

  .infrastructure-side {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .insight-map {
    height: 220px;
  }

  .insight-map-panel.is-expanded {
    inset: 0;
    padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right))
      max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  }

  .insight-map-panel.is-expanded .insight-map-head {
    align-items: flex-start;
    gap: 8px;
    flex-direction: column;
  }
  .insight-map-panel.is-expanded .insight-map-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 6px;
    flex-wrap: wrap;
  }

  .insight-map-panel.is-expanded #areaRadiusKm {
    width: min(240px, 60vw);
    max-width: 100%;
  }

  .insight-map-expand-btn {
    opacity: 1;
    pointer-events: auto;
  }

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

  .insights-layout {
    grid-template-columns: 1fr;
  }

  .insights-controls {
    justify-content: flex-start;
  }

  .insight-route-row {
    grid-template-columns: 24px minmax(0, 1fr) auto;
  }

  .insight-route-copy {
    grid-column: 2 / 4;
    justify-self: start;
  }
}

@media (max-width: 600px) {
  .notification-row {
    flex-direction: column;
    align-items: stretch;
  }

  .row-status {
    justify-content: flex-end;
  }

  .dashboard-modal {
    align-items: flex-end;
    padding: 12px;
  }

  .dashboard-modal__dialog {
    width: 100%;
    max-height: 94vh;
    border-radius: 18px 18px 0 0;
  }

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

  .dashboard-modal__date-range-panel {
    width: min(100%, calc(100vw - 32px));
  }

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

  .insights-segment {
    width: 100%;
    justify-content: space-between;
  }

  .insights-segment-btn {
    flex: 1 1 0;
    text-align: center;
  }

  .insight-status-row {
    grid-template-columns: 96px minmax(0, 1fr) 44px;
  }

  .insight-trend-chart {
    height: 220px;
  }

  .app-view {
    padding: 24px 16px 32px;
  }
}
