:root {
  --bg: #f6f7f5;
  --panel: #ffffff;
  --panel-alt: #f0f4f1;
  --text: #17201b;
  --muted: #65706a;
  --line: #d8ded9;
  --line-strong: #b9c4bd;
  --accent: #0f7b5c;
  --accent-dark: #095a43;
  --accent-soft: #dceee7;
  --blue: #2866a6;
  --amber: #b46a16;
  --danger: #a83f3f;
  --shadow: 0 18px 45px rgba(27, 40, 34, 0.12);
  --radius: 8px;
  --topbar-height: 72px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.62;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
}

@supports (min-height: 100dvh) {
  .app-shell {
    min-height: 100dvh;
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: var(--topbar-height);
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 247, 245, 0.94);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #b9d7cb;
  border-radius: var(--radius);
  background: #e8f4ee;
  color: var(--accent-dark);
}

.brand-mark svg,
.icon-button svg,
.button svg,
.mobile-nav svg,
.map-empty svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.9;
}

.brand h1,
.panel-head h2,
.map-toolbar h2,
.section-head h2 {
  margin: 0;
  letter-spacing: 0;
}

.brand h1 {
  font-size: 18px;
  line-height: 1.1;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar-actions,
.map-actions,
.filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-pill,
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill {
  padding: 0 10px;
}

.status-pill.is-ready {
  border-color: #afd9c9;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.badge {
  min-width: 22px;
  padding: 0 7px;
  background: var(--accent);
  color: #fff;
}

.button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  font-weight: 700;
}

.button {
  padding: 0 13px;
}

.button-compact {
  min-height: 32px;
  gap: 6px;
  padding: 0 10px;
  font-size: 13px;
  line-height: 1;
}

.button-compact svg {
  width: 16px;
  height: 16px;
}

.icon-button {
  width: 38px;
  padding: 0;
}

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

.button-primary:hover,
.button-primary:focus-visible {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
}

.button.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.button-secondary:hover,
.button-secondary:focus-visible,
.icon-button:hover,
.icon-button:focus-visible {
  border-color: #9eb0a6;
  background: #eef3f0;
}

.layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 14px;
  height: calc(100vh - var(--topbar-height));
  padding: 14px;
}

@supports (height: 100dvh) {
  .layout {
    height: calc(100dvh - var(--topbar-height));
  }
}

.filters-panel,
.map-panel,
.data-panel,
.auth-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 1px 0 rgba(27, 40, 34, 0.04);
}

.filters-panel {
  display: flex;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.panel-head,
.map-toolbar,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2,
.map-toolbar h2,
.section-head h2 {
  font-size: 15px;
}

.filters-form {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  overflow: auto;
  padding: 14px;
  -webkit-overflow-scrolling: touch;
}

.filter-group {
  display: grid;
  gap: 10px;
}

.filter-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  text-align: left;
}

.filter-toggle .field-label {
  display: block;
}

.filter-toggle svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--muted);
  transition: transform 140ms ease;
}

.filter-group.is-open .filter-toggle svg {
  transform: rotate(180deg);
}

.filter-content[hidden] {
  display: none;
}

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

.field-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.field,
.field-label {
  display: grid;
  gap: 6px;
}

.field span,
.field-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.field input,
.field select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
}

.field input {
  padding: 0 10px;
}

.field input[type="range"] {
  padding: 0;
}

.field select {
  padding: 7px 9px;
}

.field select[multiple] {
  min-height: 112px;
}

.field select option {
  padding: 5px 7px;
}

.field input:focus,
.field select:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(15, 123, 92, 0.14);
}

.range-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
  padding: 10px;
}

.numeric-range-card .field-grid {
  gap: 8px;
}

.numeric-range-card .field span {
  font-size: 11px;
}

.numeric-range-card .field input[type="number"] {
  min-height: 32px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
}

.range-values {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.range-values strong {
  color: var(--text);
}

.dual-range {
  --range-start: 0%;
  --range-end: 100%;
  position: relative;
  height: 28px;
}

.dual-range::before,
.dual-range::after {
  position: absolute;
  left: 0;
  right: 0;
  top: 12px;
  height: 4px;
  border-radius: 999px;
  content: "";
}

.dual-range::before {
  background: var(--line);
}

.dual-range::after {
  left: var(--range-start);
  right: calc(100% - var(--range-end));
  background: var(--accent);
}

.dual-range input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 28px;
  margin: 0;
  appearance: none;
  background: transparent;
  pointer-events: none;
}

.dual-range input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: transparent;
}

.dual-range input[type="range"]::-moz-range-track {
  height: 4px;
  background: transparent;
}

.dual-range input[type="range"]::-webkit-slider-thumb {
  width: 17px;
  height: 17px;
  margin-top: -6px;
  appearance: none;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-dark);
  pointer-events: auto;
}

.dual-range input[type="range"]::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-dark);
  pointer-events: auto;
}

.checkbox-tree,
.checkbox-list {
  display: grid;
  max-height: 210px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
  padding: 6px;
}

.checkbox-list {
  max-height: 150px;
}

.tree-group {
  border-bottom: 1px solid var(--line);
  padding: 2px 0;
}

.tree-group:last-child {
  border-bottom: 0;
}

.tree-head,
.check-row {
  display: flex;
  align-items: center;
  min-width: 0;
}

.tree-head {
  gap: 4px;
}

.tree-toggle {
  display: inline-flex;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  padding: 0;
}

.check-row {
  flex: 1;
  gap: 7px;
  min-height: 26px;
  padding: 2px 4px;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}

.check-row input {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  accent-color: var(--accent);
}

.check-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-children {
  display: grid;
  padding-left: 26px;
}

.check-row-child {
  color: var(--muted);
  font-weight: 650;
}

.range-readable,
.point-status {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.align-end {
  align-self: end;
}

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

.radius-actions .button {
  min-width: 0;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel-alt);
}

.segmented label {
  position: relative;
}

.segmented input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.segmented span {
  display: grid;
  min-height: 32px;
  place-items: center;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.segmented input:checked + span {
  background: #fff;
  color: var(--accent-dark);
  box-shadow: 0 1px 4px rgba(27, 40, 34, 0.1);
}

.filter-actions {
  position: sticky;
  bottom: -14px;
  justify-content: flex-end;
  margin: auto -14px -14px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.content {
  display: grid;
  grid-template-rows: minmax(320px, 1fr) 350px;
  min-width: 0;
  min-height: 0;
  gap: 14px;
}

.map-panel,
.data-panel {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.map-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.map-wrap {
  position: relative;
  min-height: 300px;
}

#transactions-map {
  position: absolute;
  inset: 0;
  z-index: 0;
}

#transactions-map.is-selecting-point {
  cursor: crosshair;
}

.leaflet-container {
  font: inherit;
  background: #dbe4dd;
}

.leaflet-control-zoom {
  border: 1px solid var(--line-strong) !important;
  box-shadow: var(--shadow) !important;
}

.cluster-marker {
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(27, 40, 34, 0.2);
}

.cluster-marker.is-selected {
  outline: 3px solid rgba(23, 32, 27, 0.72);
  outline-offset: 2px;
}

.selected-point-marker {
  position: relative;
  width: 24px;
  height: 24px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(15, 123, 92, 0.45), 0 10px 22px rgba(27, 40, 34, 0.28);
}

.selected-point-marker::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: inherit;
  background: #fff;
}

.map-empty {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 450;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(320px, calc(100% - 32px));
  transform: translate(-50%, -50%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.95);
  padding: 12px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.data-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

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

.metric-card,
.summary-panel,
.table-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.metric-card {
  min-height: 58px;
  padding: 9px 10px;
}

.metric-card span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.metric-card strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 17px;
  line-height: 1.1;
}

.split-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
}

.summary-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.72fr);
  align-items: end;
  gap: 12px;
}

.summary-panel .section-head > div {
  width: 100%;
}

.summary-column-headings {
  display: grid;
  grid-template-columns: repeat(3, minmax(52px, 1fr));
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.summary-panel,
.table-panel {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.summary-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.table-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.table-head {
  align-items: flex-start;
}

.table-tools {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.selection-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 260px;
  border: 1px solid #afd9c9;
  border-radius: 999px;
  background: var(--accent-soft);
  padding: 5px 7px 5px 10px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
}

.selection-pill span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selection-pill button {
  display: inline-grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-dark);
  padding: 0;
}

.selection-pill svg {
  width: 14px;
  height: 14px;
}

.summary-list {
  display: grid;
  min-height: 0;
  align-content: start;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px;
  -webkit-overflow-scrolling: touch;
}

.summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.72fr);
  gap: 12px;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.summary-row-parent {
  grid-template-columns: 22px minmax(0, 1fr) minmax(180px, 0.72fr);
}

.summary-row-child {
  background: #fbfcfb;
  padding-left: 42px;
}

.summary-row:last-child {
  border-bottom: 0;
}

.summary-label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.summary-row strong,
.summary-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-row strong {
  font-size: 13px;
}

.summary-row span,
.summary-row small {
  color: var(--muted);
  font-size: 12px;
}

.summary-row span {
  flex: 0 0 auto;
}

.summary-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(52px, 1fr));
  gap: 8px;
  align-items: center;
  text-align: center;
}

.summary-values small {
  color: var(--text);
  font-weight: 400;
}

.summary-values .summary-percentile {
  color: #7b8982;
  font-weight: 400;
}

.table-scroll {
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.table-pagination {
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.table-pagination span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.col-date {
  width: 92px;
}

.col-type {
  width: 116px;
}

.col-tipologia {
  width: 112px;
}

.col-area {
  width: 92px;
}

.col-value {
  width: 128px;
}

.col-unit {
  width: 104px;
}

th,
td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8faf8;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

th button {
  display: inline-flex;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font: inherit;
  text-align: left;
}

th button.is-active {
  color: var(--accent-dark);
}

td {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}

tr[data-transaction-row] {
  cursor: zoom-in;
}

tr[data-transaction-row]:hover {
  background: #f4f8f6;
}

.empty-state {
  padding: 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.mobile-only {
  display: none;
}

.mobile-nav {
  display: none;
}

.sheet-backdrop,
.auth-modal {
  position: fixed;
  inset: 0;
}

.sheet-backdrop {
  z-index: 50;
  background: rgba(12, 18, 15, 0.38);
}

.auth-modal {
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(12, 18, 15, 0.48);
}

.auth-card {
  width: min(560px, 100%);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.auth-form {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  background: var(--line);
  content: "";
}

.form-message {
  margin: 0;
  border: 1px solid #efc6c6;
  border-radius: var(--radius);
  background: #fff2f2;
  padding: 10px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1120px) {
  .layout {
    grid-template-columns: 300px minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  :root {
    --topbar-height: 66px;
  }

  body {
    overflow: hidden;
  }

  .topbar {
    padding: 10px 12px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand h1 {
    font-size: 16px;
  }

  .topbar-actions .icon-button,
  .topbar-actions .status-pill {
    display: none;
  }

  .button {
    min-height: 36px;
  }

  .layout {
    display: block;
    height: calc(100vh - var(--topbar-height));
    padding: 10px 10px 78px;
    overflow: hidden;
  }

  @supports (height: 100dvh) {
    .layout {
      height: calc(100dvh - var(--topbar-height));
    }
  }

  .content {
    display: block;
    height: 100%;
  }

  .map-panel,
  .data-panel {
    height: 100%;
  }

  .map-panel {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .app-shell[data-mobile-view="results"] .map-panel {
    display: none;
  }

  .app-shell[data-mobile-view="map"] .data-panel {
    display: none;
  }

  .map-wrap {
    min-height: 0;
  }

  .data-panel {
    overflow: auto;
  }

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

  .split-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .summary-list,
  .table-scroll {
    max-height: none;
  }

  .filters-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    max-height: min(86vh, 780px);
    max-height: min(86dvh, 780px);
    border-radius: 12px 12px 0 0;
    box-shadow: var(--shadow);
    transform: translateY(105%);
    transition: transform 180ms ease;
  }

  .filters-panel.is-open {
    transform: translateY(0);
  }

  .filters-form {
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }

  .filter-actions {
    position: static;
    bottom: auto;
    margin-bottom: -14px;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }

  .mobile-only {
    display: inline-flex;
  }

  .mobile-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    padding: 4px;
    box-shadow: var(--shadow);
  }

  .mobile-nav button {
    display: grid;
    min-width: 0;
    min-height: 54px;
    place-items: center;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    gap: 2px;
  }

  .mobile-nav button.is-active {
    background: var(--accent-soft);
    color: var(--accent-dark);
  }

  .mobile-nav .badge {
    position: absolute;
    margin-left: 38px;
    margin-top: -28px;
  }

  .field-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .range-values,
  .table-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .table-tools,
  .selection-pill {
    width: 100%;
    max-width: none;
  }

  .table-pagination {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }

  .table-pagination .button {
    min-width: 0;
    padding: 0 9px;
  }
}

@media (max-width: 460px) {
  .topbar-actions .button {
    width: 38px;
    padding: 0;
  }

  .topbar-actions .button span,
  .topbar-actions .button:not(.button-primary) {
    overflow: hidden;
  }

  .topbar-actions .button {
    font-size: 0;
  }

  .topbar-actions .button svg {
    width: 18px;
    height: 18px;
  }

  .metric-card {
    min-height: 70px;
  }

  .metric-card strong {
    font-size: 18px;
  }

  th,
  td {
    padding: 9px 10px;
  }
}
