.sia-shell:has(.cnigs-main) > .sia-sidebar {
    background: linear-gradient(155deg, #194c3f 0%, #103b35 65%, #0c302e 100%);
}

.sia-shell:has(.cnigs-main) .sia-nav a.active {
    border-left: 3px solid #d6a52d;
    background: rgba(218,235,218,.13);
    color: #fff;
}

.sia-shell:has(.cnigs-main) .sia-nav a:hover { background: rgba(218,235,218,.1); }
.cnigs-main { color: #203e3a; }

.cnigs-main .cnigs-studio-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 137px;
    margin: -4px 0 14px;
    padding: 20px 27px;
    overflow: hidden;
    border: 1px solid #dbe7e1;
    border-radius: 7px;
    background: linear-gradient(90deg, #f9fcfa 0%, rgba(249,252,250,.98) 26%, rgba(249,252,250,.72) 48%, rgba(249,252,250,.07) 76%), url("img/cartes-hero.png") right center / cover no-repeat;
}

.cnigs-studio-hero > div { min-width: 0; }
.cnigs-studio-hero > div > span { color: #a37c2b; font-size: 10px; letter-spacing: .13em; }
.cnigs-studio-hero h1 { margin: 5px 0; color: #143d3a; font-size: clamp(27px, 2.7vw, 39px); font-weight: 550; letter-spacing: -.035em; }
.cnigs-studio-hero p { margin: 0; color: #4c6662; font-size: 13px; }
.cnigs-studio-hero > small { align-self: flex-end; max-width: 145px; color: #fff; font-size: 11px; line-height: 1.4; text-align: right; text-shadow: 0 1px 5px #183c36; }

.cnigs-main .cnigs-layout { grid-template-columns: 300px minmax(0, 1fr); gap: 12px; align-items: stretch; }
.cnigs-main .cnigs-layer-list-card,
.cnigs-main .cnigs-map-card { min-width: 0; border: 1px solid #dbe5de; border-radius: 6px; background: #fff; box-shadow: 0 5px 19px rgba(25,62,52,.05); }
.cnigs-main .cnigs-layer-list-card { position: static; }
.cnigs-main .cnigs-layer-list-card .sia-card-head,
.cnigs-main .cnigs-map-card .sia-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 12px 14px; border-bottom: 1px solid #e7eeea; }
.cnigs-main .cnigs-layer-list-card .sia-card-head h2,
.cnigs-main .cnigs-map-card .sia-card-head h2 { color: #193c3b; font-size: 17px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.cnigs-main .cnigs-map-card .sia-card-head p { margin-top: 3px; color: #72837e; font-size: 11px; }
.cnigs-main .cnigs-search-box { display: grid; align-items: stretch; gap: 5px; padding: 11px 12px; background: #fff; }
.cnigs-main .cnigs-search-box label { width: 100%; gap: 5px; }
.cnigs-main .cnigs-search-box span { color: #6b8178; font-size: 10px; }
.cnigs-main .cnigs-search-box input { width: 100%; height: 36px; font-size: 12px; }
.cnigs-main .cnigs-search-box small { font-size: 10px; }

.cnigs-category-filters { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 12px 11px; border-bottom: 1px solid #e8eeea; }
.cnigs-category-filters button { min-height: 27px; padding: 4px 8px; border: 1px solid #dae6de; border-radius: 15px; background: #f7faf8; color: #4b655b; font: inherit; font-size: 10px; cursor: pointer; }
.cnigs-category-filters button.active { border-color: #195b43; background: #195b43; color: #fff; }
.cnigs-category-filters button[hidden] { display: none; }
.cnigs-main .cnigs-layer-toolbar { display: block; max-height: min(65vh, 620px); padding: 0; overflow: auto; border: 0; background: #fff; }
.cnigs-layer-group[hidden] { display: none; }
.cnigs-layer-group h3 { margin: 0; padding: 11px 12px 6px; border-top: 1px solid #ecf1ed; color: #456157; font-size: 11px; font-weight: 600; }
.cnigs-main .cnigs-layer-toolbar button { display: grid; grid-template-columns: 18px minmax(0, 1fr) 25px; gap: 8px; align-items: center; width: 100%; min-height: 35px; padding: 6px 11px; border: 0; border-radius: 0; border-bottom: 1px solid #f0f3f0; background: #fff; color: #2d4940; font-size: 11px; text-align: left; }
.cnigs-main .cnigs-layer-toolbar button:nth-child(2).active,
.cnigs-main .cnigs-layer-toolbar button.active { background: #f0f7f2; color: #164e3c; }
.cnigs-main .cnigs-layer-toolbar button::before { content: ""; width: 14px; height: 14px; border: 1px solid #a9bbb0; border-radius: 2px; background: #fff; }
.cnigs-main .cnigs-layer-toolbar button.active::before { content: "✓"; border-color: #1d6d50; background: #1d6d50; color: #fff; font-size: 11px; line-height: 13px; text-align: center; }
.cnigs-main .cnigs-layer-toolbar button > span { grid-column: 2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cnigs-main .cnigs-layer-toolbar button a { grid-column: 3; justify-self: end; }

.cnigs-basemap-switch { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.cnigs-basemap-switch button { min-height: 30px; padding: 5px 9px; border: 1px solid #d8e4dc; border-radius: 5px; background: #fff; color: #466258; font: inherit; font-size: 10px; cursor: pointer; }
.cnigs-basemap-switch button.active { border-color: #155c42; background: #155c42; color: #fff; }
.cnigs-basemap-switch button[hidden] { display: none; }
.cnigs-main .cnigs-map-tools { position: relative; z-index: 700; display: flex; flex-wrap: wrap; gap: 5px; min-height: 42px; padding: 7px 12px; border-top: 0; background: #fbfdfb; }
.cnigs-main .cnigs-map-tools > button { height: 29px; border-radius: 5px; background: #fff; font-size: 10px; }
.cnigs-main .cnigs-map-tools > button.active { background: #155c42; color: #fff; }
.cnigs-main .cnigs-map-tools > span { margin-left: auto; border-radius: 5px; }
.cnigs-more-tools { position: relative; }
.cnigs-more-tools summary { display: grid; min-height: 29px; place-items: center; padding: 0 9px; border: 1px solid #d4e1d8; border-radius: 5px; background: #fff; color: #38534a; font-size: 10px; cursor: pointer; list-style: none; }
.cnigs-more-tools summary::-webkit-details-marker { display: none; }
.cnigs-more-tools summary::after { content: " ▾"; }
.cnigs-more-tools > div { position: absolute; top: 34px; right: 0; z-index: 900; display: grid; gap: 6px; width: 245px; max-height: 65vh; overflow: auto; padding: 10px; border: 1px solid #d5e2da; border-radius: 6px; background: #fff; box-shadow: 0 12px 28px rgba(14,49,37,.18); }
.cnigs-more-tools > div > button { min-height: 31px; border: 1px solid #e0e9e3; border-radius: 4px; background: #fff; color: #36534a; font: inherit; font-size: 10px; text-align: left; cursor: pointer; }
.cnigs-more-tools .cnigs-type-filter,
.cnigs-more-tools .cnigs-opacity-control { justify-content: space-between; margin-left: 0; }

.cnigs-map-stage { position: relative; }
.cnigs-main .cnigs-map { height: clamp(430px, 57vh, 620px); border: 0; box-shadow: none; background: #a9d5ee; }
.cnigs-map-legend { position: absolute; bottom: 15px; left: 15px; z-index: 650; max-width: min(235px, calc(100% - 30px)); max-height: 190px; overflow: auto; padding: 10px 11px; border: 1px solid #dae5e0; border-radius: 5px; background: rgba(255,255,255,.96); box-shadow: 0 6px 18px rgba(20,51,48,.15); }
.cnigs-map-legend > strong { display: block; margin-bottom: 6px; color: #203e3b; font-size: 11px; font-weight: 600; }
.cnigs-main .cnigs-active-legend { display: grid; justify-content: start; gap: 4px; }
.cnigs-main .cnigs-active-legend span { justify-content: start; padding: 2px 0; border: 0; border-radius: 0; background: transparent; color: #3d5751; font-size: 10px; }
.cnigs-main .cnigs-map-footer { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 12px; min-height: 36px; padding: 10px 13px; }
.cnigs-map-footer > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cnigs-map-footer strong { font-weight: 600; }

.cnigs-main .cnigs-map-card:fullscreen { display: flex; flex-direction: column; padding: 0; }
.cnigs-main .cnigs-map-card:fullscreen .cnigs-map-stage { flex: 1; min-height: 0; }
.cnigs-main .cnigs-map-card:fullscreen .cnigs-map { height: 100%; }

@media (max-width: 1100px) {
    .cnigs-main .cnigs-layout { grid-template-columns: 1fr; }
    .cnigs-main .cnigs-layer-toolbar { max-height: 260px; }
}

@media (max-width: 700px) {
    .cnigs-main .cnigs-studio-hero { min-height: 126px; padding: 18px; background-position: 62% center; }
    .cnigs-studio-hero h1 { font-size: 27px; }
    .cnigs-studio-hero p { font-size: 12px; }
    .cnigs-studio-hero > small { display: none; }
    .cnigs-main .cnigs-map-card .sia-card-head { align-items: flex-start; flex-direction: column; }
    .cnigs-basemap-switch { justify-content: flex-start; }
    .cnigs-main .cnigs-map-tools > span { margin-left: 0; }
    .cnigs-main .cnigs-map { height: 390px; }
    .cnigs-main .cnigs-map-footer { grid-template-columns: 1fr; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
    .cnigs-main *, .cnigs-main *::before, .cnigs-main *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
