/* Tablet and compact desktop layout: 768px to 1180px. */
@media (min-width: 768px) and (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 12px;
  }

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

/* Portrait tablets use a vertical workspace to keep map and filters legible. */
@media (min-width: 768px) and (max-width: 980px) {
  .topbar {
    min-height: auto;
    padding: 10px 12px;
  }

  .brand-block {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
  }

  .brand-logo {
    width: 58px;
    height: 44px;
  }

  .topbar h1 {
    max-width: 440px;
    font-size: 21px;
  }

  .toolbar,
  .table-controls {
    grid-template-columns: 1fr;
  }

  .toolbar {
    gap: 8px;
    padding: 9px;
  }

  #main-tabs {
    padding: 8px 12px;
  }

  .content-tab {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0;
  }

  .point-source-filter,
  .uf-filter,
  .pmsb-filter,
  button {
    width: 100%;
  }

  .map-workspace {
    grid-template-columns: 1fr;
  }

  .map-panel,
  .map-loading,
  .municipality-map {
    min-height: 62vh;
    height: 62vh;
  }

  .detail-panel {
    min-height: auto;
    max-height: none;
    padding: 14px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .map-shell {
    height: auto;
    overflow: visible;
  }

  .table-workspace {
    height: auto;
    padding: 12px;
    overflow: visible;
  }
}
