    :root{
      --topbar-h: 64px;
      --sidebar-w: 340px;
      --bg: #f4f6f8;
      --card: #ffffff;
      --text: #1f2937;
      --muted: #6b7280;
      --border: rgba(0,0,0,0.08);
      --shadow: 0 10px 26px rgba(0,0,0,0.16);
      --radius: 14px;
    }

    * { box-sizing: border-box; }
    html, body { height: 100%; margin: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; color: var(--text); background: var(--bg); }

    .app { height: 100%; display: flex; flex-direction: column; min-height: 0; }

    .topbar{
      height: var(--topbar-h);
      background: var(--card);
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      padding: 0 16px;
      gap: 16px;
      flex: 0 0 auto;
    }

    .brand{ display: flex; align-items: center; gap: 12px; min-width: 280px; }
    .logo{
      width: 40px; height: 40px; border-radius: 999px;
      background: #1d4ed8; color: #fff;
      display: grid; place-items: center;
      font-weight: 800; user-select: none;
    }
    .brand-title{ font-weight: 800; white-space: nowrap; }

    .tabs{ display: flex; gap: 18px; align-items: center; flex: 1 1 auto; min-width: 0; }
    .tab{
      padding: 10px 10px; color: var(--muted); text-decoration: none;
      border-bottom: 2px solid transparent; font-weight: 650; white-space: nowrap;
    }
    .tab.active{ color: #2563eb; border-bottom-color: #f59e0b; }

    .user{ display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
    .avatar{ width: 34px; height: 34px; border-radius: 999px; background: #e5e7eb; border: 1px solid var(--border); }
    .username{ color: var(--muted); font-weight: 650; font-size: 14px; white-space: nowrap; }

    .content{ flex: 1 1 auto; min-height: 0; display: flex; background: var(--bg); }

    .sidebar{
      width: var(--sidebar-w);
      background: #f7f8fa;
      border-right: 1px solid var(--border);
      padding: 16px;
      overflow: auto;
    }

    .search{
      display: flex; gap: 10px; align-items: center;
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 10px 12px;
      margin-bottom: 10px;
    }
    .search-icon{
      color: var(--muted);
      font-weight: 900;
    }
    .search input{ border: 0; outline: none; width: 100%; font-size: 14px; background: transparent; }

    .section-title{ font-weight: 850; margin: 14px 0 10px; color: #111827; }
    .group-header{
      display:grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items:center;
      column-gap:12px;
    }
    .group-header-actions{
      display: flex;
      align-items: center;
      gap: 8px;
      justify-self: end;
    }
    .layer-group{
      margin-bottom: 6px;
      border-radius: 14px;
      padding: 8px 10px;
      transition: background-color 160ms ease;
    }
    .layer-group.is-open{
      background: rgba(255,255,255,0.72);
    }
    .group-collapse-btn{
      width: 28px;
      height: 28px;
      border: 1px solid rgba(17,24,39,0.10);
      background: #fff;
      border-radius: 8px;
      cursor: pointer;
      font-size: 14px;
      line-height: 1;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: #111827;
      flex: 0 0 auto;
    }
    .group-collapse-btn:hover{
      filter: brightness(0.98);
    }
    .group-toggle-label{
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 0;
      border: 0;
      background: transparent;
      flex: 1 1 auto;
      justify-self: start;
    }
    .group-panel{
      margin-top: 4px;
      margin-left: 14px;
    }
    .item{
      display: flex; align-items: center; gap: 10px;
      padding: 4px 2px; font-size: 14px; color: #374151;
      cursor: pointer; user-select: none;
    }
    .item input{ width: 16px; height: 16px; }

    #district-list{ display: none; margin-bottom: 6px; }
    .districts{ display: flex; flex-direction: column; gap: 6px; }
    .district-btn{
      width: 100%;
      text-align: left;
      padding: 10px 10px;
      border-radius: 12px;
      border: 1px solid var(--border);
      background: white;
      cursor: pointer;
      font-weight: 650;
      color: #374151;
    }
    .district-btn:hover{ filter: brightness(0.98); }
    .district-empty{ font-size: 13px; color: var(--muted); padding: 6px 2px; }

    .layer-control{
      margin-bottom: 4px;
    }
    .group-header .item{
      padding: 0;
      margin: 0;
    }
    .group-header > span{
      display: inline-flex;
      align-items: center;
      min-height: 28px;
      justify-self: start;
    }
    .layer-control.indented{
      padding-left: 0;
    }
    .layer-control .item{
      margin-bottom: 0;
    }
    .layer-opacity{
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 2px 2px 0 22px;
    }
    .layer-control:not(.is-active) .layer-opacity{
      display: none;
    }
    .layer-tools{
      display: flex;
      gap: 6px;
      padding: 4px 2px 0 22px;
      flex-wrap: wrap;
    }
    .layer-control:not(.is-active) .layer-tools{
      display: none;
    }
    .layer-tool-btn{
      border: 1px solid rgba(17,24,39,0.12);
      background: rgba(255,255,255,0.92);
      color: #374151;
      border-radius: 999px;
      padding: 4px 10px;
      font-size: 11px;
      font-weight: 800;
      cursor: pointer;
    }
    .group-center-btn{
      width: 32px;
      height: 28px;
      padding: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      line-height: 1;
    }
    .layer-tool-btn:hover{
      filter: brightness(0.98);
    }
    .layer-tool-btn.is-active{
      background: #111827;
      color: #fff;
      border-color: rgba(17,24,39,0.2);
    }
    .layer-tool-btn:disabled{
      opacity: 0.45;
      cursor: not-allowed;
    }
    .layer-opacity-label{
      color: var(--muted);
      font-size: 11px;
      font-weight: 700;
      min-width: 58px;
    }
    .opacity-slider{
      flex: 1 1 auto;
      accent-color: #111827;
      margin: 0;
    }
    .opacity-value{
      width: 40px;
      text-align: right;
      color: #374151;
      font-size: 11px;
      font-weight: 800;
      font-variant-numeric: tabular-nums;
    }

    .map-area{
      flex: 1 1 auto;
      min-width: 0;
      min-height: 0;
      position: relative;
      background: #dbeafe;
    }
    #map{ height: 100%; width: 100%; }

    .map-card{
      position: absolute;
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      padding: 12px 14px;
      z-index: 600;
    }
    .map-card.is-hidden{
      display: none;
    }

    .legend{
      top: 18px;
      right: 18px;
      width: 300px;
    }
    .legend h4{
      margin: 0 0 10px;
      font-size: 13px;
      color: #374151;
      font-weight: 800;
    }
    .legend-header{
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }
    .metadata-card{
      right: 18px;
      bottom: 18px;
      width: min(340px, calc(100% - 36px));
      max-height: min(46vh, 420px);
      overflow: auto;
    }
    .coordinates-card{
      left: 104px;
      bottom: 7px;
      top: auto;
      padding: 2px 5px 1px;
      z-index: 640;
      border-radius: 0;
      border: 2px solid #777;
      border-top: none;
      background: rgba(255,255,255,0.8);
      box-shadow: none;
      text-shadow: 1px 1px #fff;
    }
    .coordinates-value{
      color: #111827;
      font-size: 10px;
      font-weight: 700;
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
      line-height: 1.1;
    }
    .metadata-header{
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 10px;
    }
    .metadata-card-title{
      font-size: 13px;
      font-weight: 850;
      color: #111827;
    }
    .metadata-close-btn{
      width: 28px;
      height: 28px;
      border: 1px solid rgba(17,24,39,0.10);
      background: #fff;
      border-radius: 8px;
      cursor: pointer;
      font-size: 18px;
      line-height: 1;
      color: #111827;
    }
    .metadata-close-btn:hover{
      filter: brightness(0.98);
    }
    .metadata-body{
      display: flex;
      flex-direction: column;
      gap: 10px;
    }
    .metadata-layer-title{
      font-size: 16px;
      font-weight: 850;
      color: #111827;
    }
    .metadata-grid{
      display: flex;
      flex-direction: column;
      gap: 0;
    }
    .metadata-row{
      display: grid;
      grid-template-columns: 92px minmax(0, 1fr);
      gap: 10px;
      padding: 7px 0;
      border-bottom: 1px solid rgba(17,24,39,0.08);
    }
    .metadata-row:last-child{
      border-bottom: 0;
    }
    .metadata-key{
      color: var(--muted);
      font-size: 11px;
      font-weight: 800;
      letter-spacing: 0.02em;
      text-transform: uppercase;
    }
    .metadata-value{
      color: #374151;
      font-size: 13px;
      line-height: 1.4;
    }
    .legend .bar{
      height: 6px;
      border-radius: 999px;
      background: linear-gradient(90deg, #ef4444, #f59e0b, #22c55e);
      margin-bottom: 8px;
    }
    .legend .labels{
      display: flex;
      justify-content: space-between;
      font-size: 12px;
      color: var(--muted);
      font-weight: 650;
    }

    .map-actions{
      position: absolute;
      left: 18px;
      bottom: 33px;
      display: flex;
      flex-direction: column;
      gap: 10px;
      z-index: 650;
    }
    .btn-square{
      width: 30px;
      height: 30px;
      border-radius: 12px;
      background: var(--card);
      border: 1px solid var(--border);
      box-shadow: var(--shadow);
      display: grid;
      place-items: center;
      cursor: pointer;
      user-select: none;
      font-weight: 900;
      color: #374151;
      line-height: 1;
    }

    #clear-search{
      display: none;
      border: 0;
      background: transparent;
      cursor: pointer;
      font-size: 18px;
      line-height: 1;
      font-weight: 900;
      color: var(--muted);
      padding: 0 4px;
    }
    #clear-search:hover{ color: #111827; }

    .btn-square:active{ transform: translateY(1px); }
    .leaflet-control-zoom{ display: none; }

    /* (NOVO) link/botão dentro do popup */
    .popup-clear{
      margin-top: 6px;
      display: inline-block;
      border: 0;
      background: transparent;
      color: #2563eb;
      cursor: pointer;
      font-weight: 700;
      padding: 0;
    }
    .popup-clear:hover{ text-decoration: underline; }

    .logo{
      width: 40px;
      height: 40px;
      border-radius: 999px;
      background: #1d4ed8;
      display: grid;
      place-items: center;
      overflow: hidden;
    }

    .logo-img{
      width: 70%;
      height: 70%;
      object-fit: contain;
    }

    .avatar{
      width: 34px;
      height: 34px;
      border-radius: 999px;
      background: #e5e7eb;
      border: 1px solid var(--border);
      display: grid;
      place-items: center;
      overflow: hidden;
    }

    .avatar-img{
      width: 70%;
      height: 70%;
      object-fit: contain;
    }

    /* ============================================================
       CHECKBOXES BONITAS (CSS only)
       ============================================================ */
    .sidebar input[type="checkbox"]{
      appearance: none;
      -webkit-appearance: none;
      width: 18px;
      height: 18px;
      border: 2px solid rgba(17,24,39,0.25);
      border-radius: 6px;
      display: inline-grid;
      place-content: center;
      cursor: pointer;
      background: #fff;
      transition: all .12s ease;
      flex: 0 0 18px;
    }
    .sidebar input[type="checkbox"]::before{
      content: "";
      width: 10px;
      height: 10px;
      transform: scale(0);
      transition: transform .12s ease;
      border-radius: 3px;
      background: #111827;
    }
    .sidebar input[type="checkbox"]:checked{
      border-color: #111827;
      background: #fff;
    }
    .sidebar input[type="checkbox"]:checked::before{
      transform: scale(1);
    }
    .sidebar input[type="checkbox"]:indeterminate{
      border-color: #111827;
    }
    .sidebar input[type="checkbox"]:indeterminate::before{
      transform: scale(1);
      width: 12px;
      height: 3px;
      border-radius: 2px;
    }
    .sidebar input[type="checkbox"]:focus-visible{
      outline: none;
      box-shadow: 0 0 0 4px rgba(17,24,39,0.12);
    }
    .sidebar label.item,
    .sidebar label.group-toggle{
      display: flex;
      align-items: center;
      gap: 10px;
      cursor: pointer;
    }
    .sidebar label.item:hover,
    .sidebar label.group-toggle:hover{
      filter: brightness(0.98);
    }

    .sidebar .group-body{
      padding-left: 26px;
      margin-left: 6px;
      border-left: 2px solid rgba(17,24,39,0.10);
      padding-top: 4px;
      padding-bottom: 4px;
    }
    .sidebar .group-body .item{
      margin-top: 2px;
    }

    /* ============================================================
       POPUP / LEGENDA DETALHE
       ============================================================ */
    .popup-clear{
      border: 1px solid rgba(0,0,0,0.12);
      background: #fff;
      padding: 6px 10px;
      border-radius: 10px;
      cursor: pointer;
      font-weight: 700;
    }
    .popup-clear:hover{ filter: brightness(0.98); }

    .popup-legend{ min-width: 260px; line-height: 1.25; }
    .popup-legend .title{ font-weight: 900; margin-bottom: 8px; }
    .popup-legend .row{
      display:flex; justify-content:space-between; gap:10px;
      padding: 2px 0; border-bottom: 1px solid rgba(0,0,0,0.06);
    }
    .popup-legend .row:last-child{ border-bottom: 0; }
    .popup-legend .k{ font-weight: 800; color:#374151; }
    .popup-legend .v{ color:#111827; text-align:right; }

    #dynamic-legend{
      max-height: calc(100vh - 140px);
      width: 250px;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    #dynamic-legend h4{
      flex: 0 0 auto;
      margin-bottom: 0;
      padding-bottom: 8px;
      border-bottom: 1px solid rgba(0,0,0,0.06);
    }

    .legend-body{
      flex: 1 1 auto;
      margin-top: 10px;
      display:flex;
      flex-direction:column;
      gap:10px;

      overflow-y: auto;
      overflow-x: hidden;
      padding-right: 6px;
    }

    .legend-body::-webkit-scrollbar{ width: 10px; }
    .legend-body::-webkit-scrollbar-thumb{
      background: rgba(0,0,0,0.18);
      border-radius: 999px;
      border: 2px solid rgba(255,255,255,0.75);
    }
    .legend-body::-webkit-scrollbar-track{ background: transparent; }

    .legend-muted { color: var(--muted); font-weight: 400; font-size: 12px; }

    .legend-block {
      border: 1px solid rgba(0,0,0,0.08);
      border-radius: 14px;
      background: rgba(255,255,255,0.92);
      padding: 12px 12px;
      box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    }
    .legend-title{
      font-size: 12px;
      font-weight: 800;
      margin-bottom: 10px;
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:10px;
    }

    .legend-img{
      width: auto;
      max-width: 100%;
      height: auto;
      background: #fff;
      display:block;
    }

    .legend-fallback a{
      color: #2563eb;
      font-weight: 900;
      text-decoration: underline;
    }

    /* ============================================================
       ✅ COLAPSO — AJUSTE PARA FICAR "IGUAL" (só botão, como map-actions)
       ============================================================ */
    #dynamic-legend.is-collapsed .legend-body { display:none; }
    #dynamic-legend.is-collapsed h4 span:first-child { display:none; }

    /* em fechado, o card deixa de "parecer card": fica só o botão bonito */
    #dynamic-legend.is-collapsed{
      width: auto !important;
      max-height: none;
      overflow: visible;

      /* remove visual do card */
      background: transparent;
      border: 0;
      box-shadow: none;
      padding: 0;
    }

    /* remove a linha/borda do título em fechado */
    #dynamic-legend.is-collapsed h4{
      margin: 0;
      padding-bottom: 0;
      border-bottom: 0;
    }

    .legend-toggle-btn{
      display:inline-flex;
      align-items:center;
      justify-content:center;
      width: 30px;
      height: 30px;
      border-radius: 10px;
      border: 1px solid rgba(0,0,0,0.10);
      background: rgba(255,255,255,0.9);
      cursor:pointer;
      user-select:none;
    }
    .legend-toggle-btn:hover{ filter: brightness(0.98); }

    /* ícones filled */
    .legend-toggle-btn svg{ width:18px; height:18px; fill:#374151; }

    /* em fechado, o botão fica com o mesmo "look" dos botões do mapa */
    #dynamic-legend.is-collapsed .legend-toggle-btn{
      width: 30px;
      height: 30px;
      border-radius: 12px;
      background: var(--card);
      border: 1px solid var(--border);
      box-shadow: var(--shadow);
    }

    /* ✅ ÍCONES
       ABERTO  => mostra .icon-expand
       FECHADO => mostra .icon-collapse
    */
    .legend-toggle-btn .icon-expand{ display:block; }
    .legend-toggle-btn .icon-collapse{ display:none; }

    #dynamic-legend.is-collapsed .icon-expand{ display:none; }
    #dynamic-legend.is-collapsed .icon-collapse{ display:block; }

    /* ============================================================
       ✅ Language switch (PT/EN/TL)
       ============================================================ */
    .lang-switch{
      display:flex;
      align-items:center;
      gap:8px;
      margin-left: 14px;
    }
    .lang-btn{
      width: 34px;
      height: 24px;
      border-radius: 8px;
      border: 1px solid rgba(0,0,0,0.10);
      background: rgba(255,255,255,0.92);
      cursor:pointer;
      text-decoration: none;
      display:flex;
      align-items:center;
      justify-content:center;
      font-weight: 900;
      user-select:none;
      line-height: 1;
    }
    .lang-btn:hover{ filter: brightness(0.98); }
    .lang-btn.is-active{
      outline: 2px solid rgba(37,99,235,0.35);
      border-color: rgba(37,99,235,0.35);
    }
    .flag{
      font-size: 16px;
      transform: translateY(-0.5px);
    }


/* Contact Page */
    /* ============================================================
       ✅ Apenas estilos adicionais (mantém o teu CSS base no main.css)
       ============================================================ */

    .contacts-area{
      flex: 1 1 auto;
      min-width: 0;
      min-height: 0;
      background: var(--bg);
      padding: 18px;
      overflow: auto;
    }

    .page-wrap{
      max-width: 1100px;
      margin: 0 auto;
      display: grid;
      grid-template-columns: 1.15fr 0.85fr;
      gap: 18px;
    }

    .page-header{
      grid-column: 1 / -1;
      display:flex;
      align-items:flex-end;
      justify-content:space-between;
      gap: 14px;
      padding: 10px 2px 2px;
    }
    .page-title{
      font-size: 18px;
      font-weight: 900;
      color: #111827;
      margin: 0;
    }
    .page-subtitle{
      margin: 4px 0 0;
      color: var(--muted);
      font-weight: 650;
      font-size: 13px;
    }

    .card{
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      padding: 14px;
    }

    .card-title{
      margin: 0 0 10px;
      font-size: 13px;
      font-weight: 900;
      color: #374151;
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap: 10px;
    }
    .card-muted{
      color: var(--muted);
      font-size: 12px;
      font-weight: 650;
    }

    .form-grid{
      display:grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }
    .form-row{ display:flex; flex-direction:column; gap: 6px; }
    .form-row.full{ grid-column: 1 / -1; }

    .label{
      font-size: 12px;
      font-weight: 850;
      color: #374151;
    }
    .input, .textarea, .select{
      width: 100%;
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 10px 12px;
      background: #fff;
      font-size: 14px;
      outline: none;
    }
    .textarea{ min-height: 120px; resize: vertical; }

    .btn-row{
      display:flex;
      gap: 10px;
      justify-content:flex-end;
      margin-top: 12px;
    }
    .btn{
      border: 1px solid rgba(0,0,0,0.10);
      background: rgba(255,255,255,0.92);
      padding: 10px 12px;
      border-radius: 12px;
      cursor: pointer;
      font-weight: 850;
      color: #374151;
      user-select: none;
    }
    .btn:hover{ filter: brightness(0.98); }
    .btn.primary{
      background: #111827;
      color: #fff;
      border-color: rgba(17,24,39,0.2);
    }

    .info-stack{
      display:flex;
      flex-direction:column;
      gap: 12px;
    }

    .info-item{
      display:flex;
      gap: 10px;
      align-items:flex-start;
      padding: 10px 10px;
      border-radius: 14px;
      border: 1px solid rgba(0,0,0,0.08);
      background: rgba(255,255,255,0.92);
    }
    .info-ico{
      width: 38px;
      height: 38px;
      border-radius: 12px;
      border: 1px solid rgba(0,0,0,0.08);
      background: #fff;
      display:grid;
      place-items:center;
      flex: 0 0 auto;
    }
    .info-ico svg{ width: 18px; height: 18px; fill: #374151; }
    .info-text{ min-width: 0; }
    .info-k{
      font-weight: 900;
      color: #111827;
      font-size: 13px;
      margin: 0 0 2px;
    }
    .info-v{
      margin: 0;
      color: #374151;
      font-weight: 650;
      font-size: 13px;
      line-height: 1.25;
    }
    .info-sub{
      margin-top: 6px;
      color: var(--muted);
      font-weight: 650;
      font-size: 12px;
    }

    .hours{
      display:grid;
      gap: 6px;
      margin-top: 6px;
    }
    .hours .row{
      display:flex;
      justify-content:space-between;
      gap: 10px;
      padding: 6px 8px;
      border-radius: 10px;
      background: rgba(0,0,0,0.03);
      border: 1px solid rgba(0,0,0,0.06);
      font-weight: 750;
      color: #374151;
      font-size: 12px;
    }
    .hours .row span:last-child{ color: #111827; font-weight: 900; }

    .map-placeholder{
      height: 220px;
      border-radius: 14px;
      border: 1px solid rgba(0,0,0,0.08);
      background: linear-gradient(180deg, rgba(219,234,254,0.9), rgba(255,255,255,0.9));
      position: relative;
      overflow: hidden;
    }
    .map-placeholder::before{
      content:"";
      position:absolute;
      inset:0;
      background:
        radial-gradient(circle at 25% 35%, rgba(37,99,235,0.12), transparent 45%),
        radial-gradient(circle at 70% 65%, rgba(245,158,11,0.12), transparent 45%),
        linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px),
        linear-gradient(180deg, rgba(0,0,0,0.04) 1px, transparent 1px);
      background-size: auto, auto, 26px 26px, 26px 26px;
      background-position: 0 0, 0 0, 0 0, 0 0;
      opacity: 0.9;
    }
    .map-pin{
      position:absolute;
      left: 50%;
      top: 52%;
      transform: translate(-50%, -50%);
      width: 56px;
      height: 56px;
      border-radius: 18px;
      background: rgba(255,255,255,0.92);
      border: 1px solid rgba(0,0,0,0.10);
      box-shadow: 0 10px 26px rgba(0,0,0,0.12);
      display:grid;
      place-items:center;
    }
    .map-pin svg{ width: 22px; height: 22px; fill: #ef4444; }

    .chips{
      display:flex;
      flex-wrap:wrap;
      gap: 8px;
      margin-top: 10px;
    }
    .chip{
      padding: 8px 10px;
      border-radius: 999px;
      border: 1px solid rgba(0,0,0,0.10);
      background: rgba(255,255,255,0.92);
      color: #374151;
      font-weight: 850;
      font-size: 12px;
      user-select:none;
    }

    @media (max-width: 980px){
      .coordinates-card{
        left: 82px;
        bottom: 7px;
        max-width: calc(100% - 36px);
      }
      .page-wrap{ grid-template-columns: 1fr; }
    }
  


/* Map Page (Index) */
    .legend-title-row{
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:10px;
      margin-bottom: 0;
    }

    .legend-item-toggle{
      display:inline-flex;
      align-items:center;
      justify-content:center;
      width: 28px;
      height: 28px;
      border-radius: 9px;
      border: 1px solid rgba(0,0,0,0.10);
      background: rgba(255,255,255,0.9);
      cursor:pointer;
      user-select:none;
      flex: 0 0 auto;
    }
    .legend-item-toggle:hover{ filter: brightness(0.98); }
    .legend-item-toggle svg{ width:15px; height:15px; fill:#374151; }

    .legend-item-toggle .icon-expand{ display:block; }
    .legend-item-toggle .icon-collapse{ display:none; }
    .legend-block.is-collapsed .legend-item-toggle .icon-expand{ display:none; }
    .legend-block.is-collapsed .legend-item-toggle .icon-collapse{ display:block; }

    .legend-item-body{ margin-top: 10px; }
    .legend-block.is-collapsed .legend-item-body{ display:none; }
    .legend-block.is-collapsed .legend-title{ margin-bottom: 0; }
  
