﻿:root {
      --bg:        #050d18;
      --surface:   #0c1829;
      --border:    rgba(56,189,248,.13);
      --sky:       #38bdf8;
      --green:     #22c55e;
      --muted:     #64748b;
      --text:      #e2e8f0;
      --text-dim:  #94a3b8;
      --danger:    #f87171;
      --page-max:  1680px;
      --page-pad:  clamp(12px, 2vw, 22px);
      --panel-pad: clamp(18px, 2.2vw, 28px);
    }

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

    body {
      background: var(--bg);
      color: var(--text);
      font-family: 'Syne', sans-serif;
      min-height: 100vh;
      /* scanline texture */
      background-image:
        repeating-linear-gradient(
          0deg,
          transparent,
          transparent 2px,
          rgba(56,189,248,.015) 2px,
          rgba(56,189,248,.015) 4px
        );
    }

    /* â”€â”€ GRID NOISE OVERLAY â”€â”€ */
    body::before {
      content:'';
      position:fixed; inset:0;
      background-image:
        linear-gradient(rgba(56,189,248,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56,189,248,.04) 1px, transparent 1px);
      background-size: 60px 60px;
      pointer-events:none; z-index:0;
    }

    .wrap {
      position: relative;
      z-index: 1;
      max-width: var(--page-max);
      margin: auto;
      padding: 0 var(--page-pad) 48px;
    }

    /* â”€â”€ HEADER â”€â”€ */
    header {
      padding: clamp(30px, 4vw, 46px) 0 clamp(22px, 3vw, 34px);
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      border-bottom: 1px solid var(--border);
      gap: 18px;
      flex-wrap: nowrap;
    }

    .logo-block {
      flex: 1 1 auto;
      min-width: 0;
    }

    .logo-eyebrow {
      font-family: 'DM Mono', monospace;
      font-size: 11px;
      letter-spacing: .18em;
      color: var(--sky);
      text-transform: uppercase;
      margin-bottom: 10px;
    }

    header h1 {
      font-size: clamp(34px, 4.8vw, 62px);
      font-weight: 800;
      line-height: 1.2;
      padding: 0 .08em .08em 0;
      background: linear-gradient(100deg, #e2e8f0 0%, #38bdf8 55%, #22c55e 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      letter-spacing: -.02em;
      white-space: normal;
      overflow-wrap: anywhere;
    }

    .header-meta {
      flex: 0 0 310px;
      margin-left: auto;
      text-align: right;
    }

    .header-meta p {
      color: var(--text-dim);
      font-size: 12px;
      line-height: 1.6;
      max-width: 340px;
      font-family: 'DM Mono', monospace;
    }

    /* â”€â”€ SEARCH PANEL â”€â”€ */
    .search-panel {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: var(--panel-pad);
      margin: 24px 0 18px;
      position: relative;
      overflow: hidden;
    }

    .search-panel::before {
      content: '';
      position: absolute;
      top: -80px; right: -80px;
      width: 280px; height: 280px;
      background: radial-gradient(circle, rgba(56,189,248,.08) 0%, transparent 70%);
      pointer-events: none;
    }

    .panel-title {
      font-size: 11px;
      letter-spacing: .15em;
      color: var(--sky);
      text-transform: uppercase;
      font-family: 'DM Mono', monospace;
      margin-bottom: 18px;
    }

    .form-grid {
      display: grid;
      grid-template-columns: minmax(220px, 2fr) minmax(110px, .85fr) minmax(120px, .95fr) minmax(120px, .95fr) minmax(170px, 1.1fr);
      gap: 12px;
      align-items: end;
    }

    .field label {
      display: block;
      font-size: 12px;
      font-family: 'DM Mono', monospace;
      color: var(--text-dim);
      margin-bottom: 8px;
      letter-spacing: .05em;
    }

    .field input,
    .field select {
      width: 100%;
      padding: 10px 12px;
      background: rgba(255,255,255,.04);
      border: 1px solid rgba(148,163,184,.2);
      border-radius: 10px;
      color: var(--text);
      font-family: 'DM Mono', monospace;
      font-size: 12px;
      outline: none;
      transition: border-color .2s, box-shadow .2s;
    }

    .field input:focus,
    .field select:focus {
      border-color: var(--sky);
      box-shadow: 0 0 0 3px rgba(56,189,248,.1);
    }

    .field select option { background: #0c1829; }

    /* â”€â”€ FILTER ROW â”€â”€ */
    .filter-row {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-top: 14px;
      padding-top: 14px;
      border-top: 1px solid var(--border);
      align-items: center;
    }

    .filter-label {
      font-size: 11px;
      font-family: 'DM Mono', monospace;
      color: var(--muted);
      letter-spacing: .08em;
      margin-right: 4px;
    }

    .chip {
      padding: 5px 12px;
      border-radius: 100px;
      border: 1px solid var(--border);
      background: transparent;
      color: var(--text-dim);
      font-size: 10px;
      font-family: 'DM Mono', monospace;
      cursor: pointer;
      transition: all .2s;
    }

    .chip:hover, .chip.active {
      background: rgba(56,189,248,.12);
      border-color: var(--sky);
      color: var(--sky);
    }

    /* â”€â”€ ACTIONS â”€â”€ */
    .actions {
      display: flex;
      gap: 10px;
      margin-top: 20px;
      flex-wrap: wrap;
      align-items: center;
    }

    .btn {
      padding: 10px 18px;
      border-radius: 10px;
      border: none;
      cursor: pointer;
      font-weight: 700;
      font-family: 'Syne', sans-serif;
      font-size: 13px;
      letter-spacing: .02em;
      transition: all .25s;
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .btn-primary {
      background: linear-gradient(135deg, #0284c7, #22c55e);
      color: #fff;
      box-shadow: 0 0 20px rgba(34,197,94,.2);
    }

    .btn-primary:hover {
      transform: translateY(-2px);
      box-shadow: 0 0 30px rgba(34,197,94,.35);
    }

    .btn-outline {
      background: transparent;
      color: var(--text-dim);
      border: 1px solid var(--border);
    }

    .btn-outline:hover {
      border-color: var(--sky);
      color: var(--sky);
      background: rgba(56,189,248,.05);
    }

    .btn:disabled {
      opacity: .4;
      cursor: not-allowed;
      transform: none !important;
    }

    /* â”€â”€ STATUS BAR â”€â”€ */
    .status-bar {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-top: 16px;
      min-height: 24px;
    }

    .status-dot {
      width: 7px; height: 7px;
      border-radius: 50%;
      background: var(--sky);
      box-shadow: 0 0 8px var(--sky);
      animation: pulse 1.2s infinite;
    }

    .status-dot.idle { background: var(--muted); box-shadow: none; animation: none; }
    .status-dot.ok   { background: var(--green); box-shadow: 0 0 8px var(--green); animation: none; }
    .status-dot.err  { background: var(--danger); box-shadow: 0 0 8px var(--danger); animation: none; }

    @keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

    #statusText {
      font-family: 'DM Mono', monospace;
      font-size: 12px;
      color: var(--text-dim);
    }

    /* â”€â”€ KPI CARDS â”€â”€ */
    .kpi-row {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 12px;
      margin-bottom: 18px;
    }

    .kpi {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 15px 16px;
      position: relative;
      overflow: hidden;
      transition: border-color .2s;
    }

    .kpi:hover { border-color: rgba(56,189,248,.3); }

    .kpi::after {
      content: '';
      position: absolute;
      bottom: -30px; right: -30px;
      width: 100px; height: 100px;
      border-radius: 50%;
      background: radial-gradient(circle, rgba(56,189,248,.07) 0%, transparent 70%);
    }

    .kpi-val {
      font-size: 28px;
      font-weight: 800;
      color: var(--sky);
      line-height: 1;
      margin-bottom: 6px;
    }

    .kpi-label {
      font-family: 'DM Mono', monospace;
      font-size: 10px;
      color: var(--muted);
      letter-spacing: .08em;
      text-transform: uppercase;
    }

    /* â”€â”€ TABLE SECTION â”€â”€ */
    .insights-grid {
      display: grid;
      grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
      gap: 12px;
      margin-bottom: 18px;
    }

    .insight-panel {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      overflow: hidden;
      min-height: 310px;
    }

    .insight-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 13px 15px;
      border-bottom: 1px solid var(--border);
      font-family: 'DM Mono', monospace;
      color: var(--text-dim);
      font-size: 11px;
      letter-spacing: .08em;
      text-transform: uppercase;
    }

    .legend {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: flex-end;
      font-size: 10px;
      letter-spacing: 0;
      text-transform: none;
    }

    .legend-item {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      color: var(--muted);
      max-width: 170px;
    }

    .legend-dot {
      width: 9px;
      height: 9px;
      border-radius: 50%;
      flex: 0 0 auto;
    }

    .legend-quality {
      color: var(--text-dim);
      opacity: .9;
    }

    .legend-dot-exact {
      background: transparent;
      border: 2px solid #fff;
    }

    .legend-dot-approx {
      background: var(--sky);
      opacity: .38;
    }

    #map {
      height: 350px;
      width: 100%;
      background: #0a1422;
    }

    .chart-wrap {
      height: 310px;
      padding: 14px;
    }

    .leaflet-container {
      font-family: 'DM Mono', monospace;
      background: #0a1422;
    }

    .leaflet-popup-content-wrapper,
    .leaflet-popup-tip {
      background: #0c1829;
      color: var(--text);
      border: 1px solid rgba(56,189,248,.25);
    }

    .table-section {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 14px;
      overflow: hidden;
    }

    .table-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 14px 18px;
      border-bottom: 1px solid var(--border);
      gap: 12px;
      flex-wrap: wrap;
    }

    .table-title {
      font-size: 12px;
      font-family: 'DM Mono', monospace;
      color: var(--text-dim);
      letter-spacing: .08em;
    }

    #searchFilter {
      padding: 8px 12px;
      background: rgba(255,255,255,.04);
      border: 1px solid var(--border);
      border-radius: 8px;
      color: var(--text);
      font-family: 'DM Mono', monospace;
      font-size: 12px;
      outline: none;
      width: min(260px, 100%);
      transition: border-color .2s;
    }

    #searchFilter:focus { border-color: var(--sky); }

    .table-wrapper { overflow-x: hidden; }

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

    thead th {
      padding: 10px 12px;
      text-align: left;
      font-family: 'DM Mono', monospace;
      font-size: 10px;
      letter-spacing: .1em;
      text-transform: uppercase;
      color: var(--sky);
      background: rgba(56,189,248,.06);
      white-space: normal;
      cursor: pointer;
      user-select: none;
      transition: background .15s;
    }

    thead th:hover { background: rgba(56,189,248,.12); }

    thead th .sort-icon { margin-left: 4px; opacity: .4; }
    thead th.sort-asc .sort-icon::after  { content: ' â†‘'; opacity: 1; color: var(--sky); }
    thead th.sort-desc .sort-icon::after { content: ' â†“'; opacity: 1; color: var(--sky); }

    tbody tr {
      border-top: 1px solid rgba(148,163,184,.07);
      transition: background .15s;
      cursor: pointer;
    }

    tbody tr:hover { background: rgba(56,189,248,.04); }

    tbody td {
      padding: 9px 12px;
      font-size: 12px;
      color: var(--text);
      font-family: 'DM Mono', monospace;
      white-space: normal;
      max-width: 180px;
      overflow: hidden;
      text-overflow: ellipsis;
      overflow-wrap: break-word;
      word-break: normal;
      line-height: 1.28;
      vertical-align: middle;
    }

    th:nth-child(1), td:nth-child(1),
    th:nth-child(4), td:nth-child(4),
    th:nth-child(6), td:nth-child(6),
    th:nth-child(7), td:nth-child(7),
    th:nth-child(8), td:nth-child(8),
    th:nth-child(9), td:nth-child(9) {
      white-space: nowrap;
    }

    th:nth-child(1), td:nth-child(1) { width: 11%; }
    th:nth-child(2), td:nth-child(2) { width: 16%; }
    th:nth-child(3), td:nth-child(3) { width: 13%; }
    th:nth-child(4), td:nth-child(4) { width: 7%; }
    th:nth-child(5), td:nth-child(5) { width: 16%; }
    th:nth-child(6), td:nth-child(6) { width: 7%; }
    th:nth-child(7), td:nth-child(7) { width: 4%; }
    th:nth-child(8), td:nth-child(8) { width: 10%; }
    th:nth-child(9), td:nth-child(9) { width: 8%; }
    th:nth-child(10), td:nth-child(10) { width: 10%; }

    td:nth-child(2) {
      font-size: 11px;
      line-height: 1.25;
    }

    .badge {
      display: inline-block;
      padding: 2px 8px;
      border-radius: 100px;
      font-size: 11px;
      font-family: 'DM Mono', monospace;
      max-width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .badge-email { background: rgba(34,197,94,.12); color: var(--green); }
    .badge-phone { background: rgba(56,189,248,.12); color: var(--sky); }
    .badge-none  { background: rgba(100,116,139,.12); color: var(--muted); }

    .geo-badge {
      display: inline-flex;
      align-items: center;
      width: fit-content;
      max-width: 100%;
      padding: 3px 8px;
      border-radius: 999px;
      font-family: 'DM Mono', monospace;
      font-size: 10px;
      line-height: 1.2;
      border: 1px solid transparent;
      white-space: nowrap;
    }

    .geo-cell {
      white-space: normal !important;
    }

    .geo-cell .dist-pill,
    .geo-cell .geo-badge {
      margin: 1px 4px 1px 0;
      vertical-align: middle;
    }

    .geo-exato { color: #22c55e; background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.24); }
    .geo-endereco { color: #38bdf8; background: rgba(56,189,248,.12); border-color: rgba(56,189,248,.24); }
    .geo-cep { color: #f59e0b; background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.25); }
    .geo-bairro { color: #f472b6; background: rgba(244,114,182,.12); border-color: rgba(244,114,182,.25); }
    .geo-cidade { color: #a78bfa; background: rgba(167,139,250,.12); border-color: rgba(167,139,250,.25); }
    .geo-legado,
    .geo-desconhecido { color: var(--text-dim); background: rgba(148,163,184,.12); border-color: rgba(148,163,184,.2); }

    .dist-pill {
      display: inline-block;
      padding: 3px 8px;
      border-radius: 100px;
      background: rgba(56,189,248,.1);
      color: var(--sky);
      font-size: 10px;
      line-height: 1.2;
    }

    .cluster-marker {
      display: grid;
      place-items: center;
      width: 42px;
      height: 42px;
      border-radius: 999px;
      background: rgba(245,158,11,.18);
      border: 2px solid rgba(245,158,11,.9);
      box-shadow: 0 0 0 8px rgba(245,158,11,.08), 0 10px 28px rgba(0,0,0,.35);
      color: #fff7ed;
      font-family: 'DM Mono', monospace;
      font-size: 12px;
      font-weight: 700;
    }

    .cluster-marker span {
      display: grid;
      place-items: center;
      min-width: 28px;
      height: 28px;
      border-radius: 999px;
      background: rgba(15,23,42,.9);
    }

    .empty-row td {
      text-align: center;
      color: var(--muted);
      padding: 48px;
      font-family: 'DM Mono', monospace;
      font-size: 13px;
    }

    /* â”€â”€ PAGINATION â”€â”€ */
    .pagination {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 8px;
      padding: 20px;
      border-top: 1px solid var(--border);
    }

    .page-btn {
      padding: 6px 12px;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: transparent;
      color: var(--text-dim);
      font-family: 'DM Mono', monospace;
      font-size: 13px;
      cursor: pointer;
      transition: all .2s;
    }

    .page-btn:hover, .page-btn.active {
      background: rgba(56,189,248,.1);
      border-color: var(--sky);
      color: var(--sky);
    }

    .page-info {
      font-family: 'DM Mono', monospace;
      font-size: 12px;
      color: var(--muted);
      padding: 0 8px;
    }

    footer {
      text-align: center;
      padding: 40px 0 20px;
      font-family: 'DM Mono', monospace;
      font-size: 12px;
      color: var(--muted);
      letter-spacing: .05em;
    }

    footer a { color: var(--sky); text-decoration: none; }
    footer a:hover { text-decoration: underline; }

    .detail-drawer {
      position: fixed;
      inset: 0;
      z-index: 20;
      pointer-events: none;
      background: rgba(2, 6, 23, 0);
      transition: background .2s;
    }

    .detail-drawer.open {
      pointer-events: auto;
      background: rgba(2, 6, 23, .42);
    }

    .detail-panel {
      position: absolute;
      top: 0;
      right: 0;
      width: min(430px, 100vw);
      height: 100%;
      background: #0c1829;
      border-left: 1px solid rgba(56,189,248,.22);
      box-shadow: -24px 0 60px rgba(0,0,0,.38);
      transform: translateX(100%);
      transition: transform .25s ease;
      display: flex;
      flex-direction: column;
    }

    .detail-drawer.open .detail-panel { transform: translateX(0); }

    .detail-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 18px 20px;
      border-bottom: 1px solid var(--border);
      color: var(--sky);
      font-family: 'DM Mono', monospace;
      font-size: 12px;
      letter-spacing: .08em;
      text-transform: uppercase;
    }

    .detail-close {
      width: 32px;
      height: 32px;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: transparent;
      color: var(--text);
      cursor: pointer;
      font-size: 20px;
      line-height: 1;
    }

    .detail-body {
      padding: 20px;
      overflow: auto;
      display: grid;
      gap: 16px;
    }

    .detail-title {
      font-size: 24px;
      line-height: 1.15;
      color: var(--text);
    }

    .detail-subtitle {
      color: var(--text-dim);
      font-family: 'DM Mono', monospace;
      font-size: 12px;
      overflow-wrap: anywhere;
    }

    .detail-grid {
      display: grid;
      gap: 10px;
    }

    .detail-item {
      padding: 12px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: rgba(255,255,255,.03);
    }

    .detail-label {
      display: block;
      margin-bottom: 5px;
      color: var(--muted);
      font-family: 'DM Mono', monospace;
      font-size: 10px;
      letter-spacing: .08em;
      text-transform: uppercase;
    }

    .detail-value {
      color: var(--text);
      font-family: 'DM Mono', monospace;
      font-size: 13px;
      overflow-wrap: anywhere;
    }

    .detail-actions {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
    }

    .detail-empty {
      color: var(--text-dim);
      font-family: 'DM Mono', monospace;
      font-size: 13px;
    }

    /* â”€â”€ RESPONSIVE â”€â”€ */
    @media(max-width: 1400px) {
      :root {
        --page-max: 1440px;
        --panel-pad: 22px;
      }

      header h1 { font-size: clamp(34px, 4.6vw, 54px); }
      .logo-eyebrow { font-size: 9px; }
      .header-meta p { font-size: 11px; }
      #map { height: 330px; }
      .chart-wrap { height: 290px; }

      th:nth-child(3), td:nth-child(3),
      th:nth-child(7), td:nth-child(7) {
        display: none;
      }

      th:nth-child(1), td:nth-child(1) { width: 13%; }
      th:nth-child(2), td:nth-child(2) { width: 16%; }
      th:nth-child(4), td:nth-child(4) { width: 7%; }
      th:nth-child(5), td:nth-child(5) { width: 24%; }
      th:nth-child(6), td:nth-child(6) { width: 8%; }
      th:nth-child(8), td:nth-child(8) { width: 11%; }
      th:nth-child(9), td:nth-child(9) { width: 9%; }
      th:nth-child(10), td:nth-child(10) { width: 12%; }
    }

    @media(max-width: 1000px) {
      :root {
        --page-max: 960px;
        --panel-pad: 18px;
      }

      header {
        align-items: flex-start;
      }

      .form-grid {
        grid-template-columns: minmax(180px, 1.5fr) minmax(90px, .7fr) minmax(105px, .8fr) minmax(105px, .8fr);
      }

      .field:last-child {
        grid-column: 1 / -1;
      }

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

      .kpi {
        padding: 13px 14px;
      }

      .kpi-val {
        font-size: 24px;
      }

      .kpi-label {
        font-size: 9px;
      }

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

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

      table {
        min-width: 900px;
      }
    }

    @media(max-width: 720px) {
      body::before { background-size: 42px 42px; }

      header {
        padding-top: 24px;
        flex-wrap: wrap;
        gap: 12px;
      }

      header h1 {
        font-size: clamp(22px, 8vw, 34px);
        white-space: normal;
      }

      .logo-eyebrow {
        font-size: 8px;
        line-height: 1.5;
        letter-spacing: .12em;
      }

      .header-meta {
        display: none;
      }

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

      .field:first-child,
      .field:last-child {
        grid-column: 1 / -1;
      }

      .actions .btn {
        flex: 1 1 150px;
        justify-content: center;
      }

      .kpi-row {
        grid-template-columns: 1fr 1fr;
      }

      .table-header {
        align-items: stretch;
      }

      #searchFilter {
        width: 100%;
      }

      .table-wrapper {
        overflow-x: visible;
      }

      table,
      tbody,
      tr,
      td {
        display: block;
        width: 100%;
      }

      table {
        min-width: 0;
        table-layout: auto;
      }

      thead {
        display: none;
      }

      tbody {
        display: grid;
        gap: 8px;
        padding: 8px;
      }

      tbody tr {
        border: 1px solid rgba(56,189,248,.12);
        border-radius: 12px;
        background: rgba(255,255,255,.025);
        overflow: hidden;
        padding: 12px;
      }

      tbody td {
        display: block;
        align-items: start;
        width: 100% !important;
        max-width: none;
        padding: 0;
        border-top: 0;
        white-space: normal !important;
        overflow: visible;
        text-overflow: clip;
        overflow-wrap: normal;
        word-break: normal;
      }

      tbody td::before {
        display: none;
      }

      th:nth-child(1), td:nth-child(1),
      th:nth-child(3), td:nth-child(3),
      th:nth-child(4), td:nth-child(4),
      th:nth-child(6), td:nth-child(6),
      th:nth-child(7), td:nth-child(7),
      tbody td[data-label="CNPJ"],
      tbody td[data-label="Fantasia"],
      tbody td[data-label="CNAE"],
      tbody td[data-label="Cidade"],
      tbody td[data-label="UF"] {
        display: none;
      }

      tbody td:nth-child(2) {
        font-size: 13px;
        line-height: 1.35;
        color: var(--text);
        margin-bottom: 7px;
        white-space: normal !important;
        overflow-wrap: normal;
        word-break: normal;
      }

      tbody td:nth-child(5) {
        font-size: 11px;
        line-height: 1.45;
        color: var(--muted);
        margin-bottom: 10px;
        white-space: normal !important;
        overflow-wrap: normal;
        word-break: normal;
      }

      tbody td:nth-child(8),
      tbody td:nth-child(9),
      tbody td:nth-child(10) {
        display: inline-flex;
        width: auto !important;
        max-width: 100%;
        margin: 3px 4px 0 0;
        vertical-align: top;
      }

      tbody tr.empty-row {
        padding: 14px;
      }

      tbody tr.empty-row td {
        display: block;
        color: var(--muted);
      }

      #map {
        height: 300px;
      }

      .chart-wrap {
        height: 260px;
      }
    }

    @media(max-width: 480px) {
      .wrap {
        padding-left: 10px;
        padding-right: 10px;
      }

      header h1 {
        font-size: clamp(20px, 7.4vw, 30px);
      }

      .form-grid,
      .kpi-row {
        grid-template-columns: 1fr;
      }

      .search-panel,
      .table-section,
      .insight-panel {
        border-radius: 12px;
      }

      .chip {
        flex: 1 1 46%;
        text-align: center;
      }

      tbody td { font-size: 11px; }
    }
