/* MGIS Maps — стили карты (витрина v13.4) */
.mgis-app .mgis-public-selection{display:flex;align-items:center;gap:7px;padding:8px 9px;border:1px solid #dce2f4;border-radius:8px;background:#f4f6ff;color:#35498d;font-size:12px;line-height:1.4;cursor:pointer;flex-wrap:wrap;margin:0}
.mgis-app .mgis-public-selection input{appearance:auto;width:15px;height:15px;margin:0;accent-color:#5b52b8;min-height:0;padding:0}
.mgis-app .mgis-public-selection small{font-size:10px;color:#64748b;margin-left:auto}
.mgis-app.mgis-curated-filter .mk-curated{outline:3px solid #a855f7;outline-offset:2px}
.mgis-app .mgis-public-curated-tag{display:inline-block;margin-top:5px;padding:2px 5px;border-radius:4px;background:#f1eaff;color:#7152a9;font-size:10px}

.mgis-private-page{margin:0;background:#eef2f7;font-family:Arial,sans-serif}
.mgis-private-page #main{margin:0;padding:0;max-width:none}
.mgis-app .map-heading .mgis-mode-link{display:inline-block;margin-top:4px;padding:4px 8px;font-size:11px;line-height:1.3}
.mgis-access{box-sizing:border-box;max-width:680px;margin:8vh auto;padding:36px;border:1px solid #dbe3ee;border-radius:20px;background:#fff;color:#1e293b;font:16px/1.6 Arial,sans-serif}
.mgis-access .mgis-access-brand{color:#1e40af;font-weight:800;letter-spacing:.04em;text-decoration:none}
.mgis-access h1{font-size:30px;line-height:1.2;margin:28px 0 20px}
.mgis-access-actions{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin-top:24px}
.mgis-access-actions a{padding:10px 14px;border-radius:8px;color:#1e40af;text-decoration:none;border:1px solid #dbe3ee}
.mgis-access-actions .mgis-access-primary{background:#1e40af;border-color:#1e40af;color:#fff}
@media(max-width:700px){.mgis-access{margin:24px 12px;padding:24px}.mgis-access h1{font-size:25px}}

.mgis-app{--bg:#eef2f7;--bg2:#e2e8f0;--panel:#fff;--line:#dbe3ee;--tx:#1e293b;--tx2:#64748b;--blue:#1e40af;--blue2:#2563eb}
.mgis-app *{box-sizing:border-box}
.mgis-app header{background:var(--blue);color:#fff;padding:9px 14px;display:flex;align-items:center;gap:12px;flex-wrap:nowrap;z-index:1200}
.mgis-app .badge{display:inline-flex;align-items:center;min-height:44px;background:#fff;color:var(--blue);font-size:20px;font-weight:800;line-height:1.1;letter-spacing:.3px;padding:10px 14px;border-radius:999px;white-space:nowrap}
.mgis-app .hbtn{background:rgba(255,255,255,.15);border:1px solid rgba(255,255,255,.45);color:#fff;border-radius:8px;padding:6px 10px;font-size:12px;font-weight:700;text-decoration:none;white-space:nowrap}
.mgis-app [data-mgis="toggleList"]{display:none!important;background:rgba(255,255,255,.15);border:1px solid rgba(255,255,255,.4);color:#fff;border-radius:8px;padding:6px 10px;font-size:13px;cursor:pointer}
.mgis-app h1{font-size:16px;margin:0;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:700}
.mgis-app h1 .sub{font-size:11px;font-weight:500;opacity:.85}
.mgis-app .stats{display:flex;gap:10px;margin-left:auto;flex-shrink:0}
.mgis-app .stat{font-size:9px;color:#c7d5f2;text-transform:uppercase;letter-spacing:.4px;display:flex;flex-direction:column;align-items:center;line-height:1.15}
.mgis-app .stat b{font-size:15px;color:#fff}
.mgis-app .layout{display:flex;flex:1;min-height:0;position:relative}
.mgis-app aside{width:370px;flex:0 0 370px;background:var(--panel);border-right:1px solid var(--line);display:flex;flex-direction:column;min-height:0;z-index:1100}
.mgis-app aside.hide{display:none}
.mgis-app .controls{padding:10px 12px;border-bottom:1px solid var(--line);display:flex;flex-direction:column;gap:8px;flex-shrink:0}
.mgis-app .controls input[type=text]{width:100%;padding:8px 10px;border:1px solid var(--line);border-radius:8px;font-size:13px}
.mgis-app [data-mgis="cats"]{display:flex;flex-wrap:wrap;gap:4px}
.mgis-app [data-mgis="cats"] label{display:inline-flex;align-items:center;gap:4px;font-size:11px;padding:5px 8px;border:1px solid var(--line);border-radius:999px;cursor:pointer;background:#f8fafc;color:var(--tx);white-space:nowrap;user-select:none}
.mgis-app [data-mgis="cats"] input{display:none}
.mgis-app [data-mgis="cats"] label.on{background:var(--blue);color:#fff;border-color:var(--blue)}
.mgis-app .frow{display:flex;flex-wrap:wrap;gap:8px;font-size:12px;color:var(--tx2)}
.mgis-app .frow label{display:flex;align-items:center;gap:4px;cursor:pointer}
.mgis-app .srow{display:flex;gap:6px;flex-wrap:wrap}
.mgis-app .srow select{flex:1 1 110px;min-width:0;padding:6px 6px;border:1px solid var(--line);border-radius:8px;font-size:12px;background:#fff;color:var(--tx)}
.mgis-app .small{font-size:11px;color:var(--tx2)}
.mgis-app [data-mgis="list"]{flex:1;overflow-y:auto;min-height:0}
.mgis-app .item{padding:9px 12px;border-bottom:1px solid var(--line);cursor:pointer}
.mgis-app .item:hover{background:#f1f5f9}
.mgis-app .item .nm{font-size:13px;font-weight:600;display:flex;align-items:flex-start;gap:6px}
.mgis-app .item .dot{width:9px;height:9px;border-radius:50%;flex-shrink:0;margin-top:3px}
.mgis-app .item .mt{font-size:11px;color:var(--tx2);margin-top:2px;display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.mgis-app .fb{font-size:9px;font-weight:700;padding:1px 5px;border-radius:4px;background:#eef2ff;color:var(--blue)}
.mgis-app .legend{padding:7px 12px;border-top:1px solid var(--line);font-size:10px;color:var(--tx2);display:flex;gap:10px;flex-wrap:wrap}
.mgis-app .legend .li{display:flex;align-items:center;gap:4px}
.mgis-app .legend .d{width:8px;height:8px;border-radius:50%}
.mgis-app [data-mgis="map"]{flex:1;min-height:0;position:relative}
.mgis-app .dpanel{position:static;width:390px;flex:0 0 390px;min-width:0;min-height:0;background:var(--panel);overflow-y:auto;padding:16px 18px;display:none;border-right:1px solid var(--line);user-select:text;overflow-wrap:anywhere}
.mgis-app .dpanel.open{display:block}
.mgis-app .dpanel h2{font-size:16px;font-weight:700;margin:0;line-height:1.3;white-space:normal;min-width:0;flex:1;color:var(--tx);letter-spacing:normal;text-transform:none}
.mgis-app .dp-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;margin-bottom:12px}
.mgis-app .dpanel .xbtn{display:inline-flex;align-items:center;justify-content:center;appearance:none;background:transparent;border:1px solid var(--line);border-radius:8px;width:32px;height:32px;min-width:32px;min-height:32px;max-width:32px;padding:0;margin:0;line-height:1;cursor:pointer;color:var(--tx2);flex:0 0 32px;box-shadow:none}
.mgis-app .dpanel .xbtn svg{display:block;width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.5;pointer-events:none}
.mgis-app .dpanel .xbtn:hover{background:var(--bg2);color:var(--tx)}
.mgis-app button:focus-visible,.mgis-app [role=button]:focus-visible,.mgis-app a:focus-visible{outline:2px solid var(--blue2);outline-offset:2px}
.mgis-app .chip{display:inline-block;font-size:10px;padding:2px 8px;border-radius:999px;color:#fff;margin:0 4px 4px 0}
.mgis-app .fbig{display:inline-block;font-size:11px;font-weight:700;padding:3px 9px;border-radius:6px;background:#eef2ff;color:var(--blue);margin:0 6px 6px 0}
.mgis-app .blk{font-size:12px;margin-top:8px;color:#1e293b;background:#f1f5f9;border-radius:6px;padding:7px 9px}
.mgis-app .blk b{color:var(--blue)}
.mgis-app .slugline{font-size:11px;color:var(--tx2);margin-top:8px;word-break:break-all}
.mgis-app .mk{width:22px;height:22px;border-radius:50% 50% 50% 0;transform:rotate(-45deg);display:flex;align-items:center;justify-content:center;border:1.5px solid #fff;box-shadow:0 2px 6px rgba(0,0,0,.35)}
.mgis-app .mk span{transform:rotate(45deg);font-size:9px;color:#fff;font-weight:700}
.mgis-app .cpie{border-radius:50%;box-shadow:0 2px 6px rgba(0,0,0,.35),inset 0 0 0 2px rgba(255,255,255,.75);display:flex;align-items:center;justify-content:center}
.mgis-app .cpie span{background:rgba(255,255,255,.93);color:#1e293b;border-radius:50%;width:62%;height:62%;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:800}
.mgis-app .mk-hl{background:#facc15!important;box-shadow:0 0 0 3px rgba(250,204,21,.6),0 3px 10px rgba(0,0,0,.5);animation:mkpulse 1.1s ease-in-out infinite;z-index:10000}
@keyframes mkpulse{0%,100%{box-shadow:0 0 0 3px rgba(250,204,21,.6),0 3px 10px rgba(0,0,0,.5)}50%{box-shadow:0 0 0 9px rgba(250,204,21,.12),0 3px 10px rgba(0,0,0,.5)}}
.mgis-app [data-mgis="cats"]{display:flex;flex-wrap:wrap;gap:4px}
.mgis-app [data-mgis="cats"] button{display:inline-flex;align-items:center;gap:5px;padding:3px 9px;border-radius:999px;border:1px solid #cbd5e1;background:#f1f5f9;color:#334155;font-size:11.5px;line-height:1.25;cursor:pointer;font-family:inherit}
.mgis-app [data-mgis="cats"] button .dot{width:8px;height:8px;border-radius:50%;flex:none;display:inline-block}
.mgis-app [data-mgis="cats"] button.on{background:#1d4ed8;border-color:#1d4ed8;color:#fff}
.mgis-app [data-mgis="hotBtn"]{width:100%;margin:6px 0 0;padding:7px 8px;border:1px solid #ea580c;background:#fff7ed;color:#c2410c;border-radius:8px;cursor:pointer;font-size:12px;font-weight:700;font-family:inherit}
.mgis-app [data-mgis="hotBtn"].on{background:#ea580c;border-color:#ea580c;color:#fff}
.mgis-app [data-mgis="hotBtn"]:hover{filter:brightness(.96)}
.mgis-app .sumbox summary{cursor:pointer;font-weight:700;font-size:12px;color:var(--blue)}
.mgis-app [data-mgis="sumBody"]{margin-top:6px;line-height:1.6;font-size:12px;color:var(--tx)}
.mgis-app [data-mgis="sumBody"] .fb{font-size:9.5px;padding:2px 7px}
.mgis-app .fold{border:1px solid var(--line);border-radius:8px;padding:6px 8px;background:#f8fafc}
.mgis-app .fold summary{cursor:pointer;font-weight:700;font-size:12px;color:var(--blue);user-select:none}
.mgis-app .cta{display:inline-block;margin:2px 0;padding:9px 16px;background:#2563eb;color:#fff;border-radius:9px;font-weight:700;text-decoration:none;font-size:14px}.mgis-app .cta:hover{background:#1d4ed8}/* ===== Ночная тема v1.3 (палитра витрины v13.5) ===== */
.mgis-app [data-mgis="themeBtn"]{cursor:pointer;font-family:inherit}
.mgis-app{transition:background-color .25s ease,color .25s ease}
.mgis-app.night{--bg:#0b1220;--bg2:#0e1728;--panel:#141e33;--line:#25334e;--tx:#e6eefc;--tx2:#8fa3c4;--blue:#93c5fd;--blue2:#60a5fa;background:#0b1220;color:#e6eefc;color-scheme:dark}
.mgis-app.night header{background:linear-gradient(180deg,#0d1830,#13234c)}
.mgis-app.night .badge{background:linear-gradient(135deg,#1b2a4a,#2a3d66);color:#bfdbfe}
.mgis-app.night .hbtn,.mgis-app.night [data-mgis="toggleList"]{background:rgba(255,255,255,.07);border-color:rgba(255,255,255,.28)}
.mgis-app.night .stat{color:#8fa3c4}
.mgis-app.night .stat b{color:#e6eefc}
.mgis-app.night .fb{background:#16264c;color:#93c5fd}
.mgis-app.night .fbig{filter:saturate(.92) brightness(.93)}
.mgis-app.night .controls input[type=text],.mgis-app.night .srow select{background:#0d1526;color:#e6eefc;border-color:#25334e}
.mgis-app.night [data-mgis="cats"] label{background:#17233c;border-color:#25334e;color:#dbe6f7}
.mgis-app.night [data-mgis="cats"] label.on{background:#1d4ed8;border-color:#1d4ed8;color:#fff}
.mgis-app.night [data-mgis="hotBtn"]{background:#2b1608;border-color:#c2410c;color:#fdba74}
.mgis-app.night [data-mgis="hotBtn"].on{background:#ea580c;border-color:#ea580c;color:#fff}
.mgis-app.night [data-mgis="expBtn"]{background:#17233c;border-color:#25334e;color:#dbe6f7}
.mgis-app.night .item:hover{background:#182544}
.mgis-app.night .dpanel{background:#141e33}
.mgis-app.night .blk{background:#0d1526;color:#dbe6f7}
.mgis-app.night .blk[style*="fff7ed"]{background:#2b1608!important;color:#fde8d2!important}
.mgis-app.night .fold{background:#17233c}
.mgis-app.night .slugline{color:#8fa3c4}
.mgis-app.night .leaflet-container{background:#0b1220}
.mgis-app.night .leaflet-tile{filter:brightness(.62) invert(1) contrast(2.7) hue-rotate(195deg) saturate(.35)}
.mgis-app.night .leaflet-control-attribution{background:rgba(11,18,32,.85);color:#8fa3c4}
.mgis-app.night .leaflet-control-attribution a{color:#93c5fd}

.mgis-app{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;font-size:14px;font-weight:400;font-style:normal;line-height:1.4;letter-spacing:normal;text-transform:none;background:var(--bg);color:var(--tx);display:flex;flex-direction:column;position:relative;width:100%;min-height:240px;overflow:hidden;isolation:isolate;container:mgis-map / inline-size}
.mgis-app button,.mgis-app input,.mgis-app select,.mgis-app h1,.mgis-app h2{font-family:inherit;font-style:normal;letter-spacing:normal;text-transform:none}
.mgis-app header{flex-wrap:wrap;flex:none;padding:10px;gap:8px}
.mgis-app header .map-actions{display:flex;align-items:center;gap:8px;flex:none;margin:0;padding:0;background:transparent;border:0;box-shadow:none}
.mgis-app header .map-actions :is(button,a){display:flex!important;align-items:center;justify-content:center;flex:none;width:44px;height:44px;min-width:44px;min-height:44px;margin:0;padding:10px;line-height:1;border-radius:10px;cursor:pointer;transition:background-color .15s,border-color .15s,color .15s}
.mgis-app header .map-actions svg{display:block;flex:none;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.mgis-app header .map-action-label{display:none}
@container mgis-map (min-width:1101px){
 .mgis-app header .map-actions :is(button,a){width:auto;gap:8px;padding:10px 12px;font-size:13px;font-weight:600;white-space:nowrap;text-decoration:none}
 .mgis-app header .map-action-label{display:inline;pointer-events:none}
}
.mgis-app header .map-actions [hidden]{display:none!important}
.mgis-app header :is(button,a):focus-visible{outline-color:#fff}
.mgis-app .map-heading{flex:1;min-width:240px}
.mgis-app h1{font-size:16px;color:inherit;line-height:1.35;min-width:0;white-space:normal;overflow:visible;text-overflow:clip}
.mgis-app .map-services{margin:3px 0 0;color:inherit;font-size:11px;font-weight:500;line-height:1.4;opacity:.85}
.mgis-app .map-service{white-space:nowrap}
.mgis-app .layout{flex:1;min-height:0;overflow:hidden}
.mgis-app [data-mgis="map"]{flex:1;min-width:0;min-height:200px;height:100%}
.mgis-app [data-mgis="side"]{max-width:90%;flex-shrink:0}
.mgis-app .dpanel{max-width:100%}
.mgis-app .leaflet-container{font-family:"Helvetica Neue",Arial,Helvetica,sans-serif;font-weight:400;line-height:1.5}
.mgis-app .mgis-error{padding:14px;color:#b91c1c;background:#fff}
.mgis-app [hidden]{display:none!important}
.mgis-app button{line-height:1.3}
.mgis-app .mgis-empty{padding:16px}
.mgis-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px}
.mgis-card{border:1px solid #dbe3ee;border-radius:8px;padding:14px;background:#fff;color:#1e293b}
.mgis-card .mgis-c-h{display:flex;justify-content:space-between;gap:8px}
.mgis-card .mgis-c-b{margin-top:8px;font-size:14px}
.mgis-card .mgis-cta{display:inline-block;background:#2563eb;color:#fff;padding:8px 12px;border-radius:6px;text-decoration:none}
.mgis-rows{width:100%;border-collapse:collapse}.mgis-rows td,.mgis-rows th{padding:8px;border:1px solid #dbe3ee;text-align:left}
.mgis-message{padding:14px;border:1px solid #dbe3ee}
.mgis-app.mgis-auto-height{height:calc(100vh - var(--mgis-top,0px));height:calc(100dvh - var(--mgis-top,0px));max-height:none;min-height:240px}
.mgis-app[data-mgis-state="loading"] [data-mgis="map"]::after{content:"Загрузка компаний…";position:absolute;left:56px;top:12px;z-index:900;background:var(--panel);color:var(--tx);padding:8px 12px;border-radius:6px;pointer-events:none;font-size:13px}
.mgis-app .controls input[type=text]{background:var(--panel);color:var(--tx)}
.mgis-app .controls input[type=text]::placeholder{color:var(--tx2);opacity:1}
.mgis-app .leaflet-control-layers-toggle{background-image:url("../images/layers.svg")!important;background-size:28px 28px;background-repeat:no-repeat;background-position:center;display:block;text-decoration:none}
.mgis-app .leaflet-control-layers-toggle::before{content:none}
.mgis-app .leaflet-control-layers label{font:12px/1.5 "Helvetica Neue",Arial,Helvetica,sans-serif;font-weight:400;text-transform:none;letter-spacing:normal;margin:0}
.mgis-app .leaflet-control-layers input{appearance:auto;width:auto;height:auto;padding:0;margin:0 5px 0 0;vertical-align:middle}
.mgis-app .leaflet-control-layers input:checked{accent-color:#2563eb}
.mgis-app .leaflet-control-layers label span{vertical-align:middle}
.mgis-app .leaflet-control-attribution{font-size:11px;line-height:1.5}
.mgis-app.night .leaflet-control-layers,.mgis-app.night .leaflet-bar a{background:var(--panel);color:var(--tx);border-color:var(--line)}
.mgis-app.night .leaflet-control-layers-toggle{filter:invert(1) brightness(.85)}
.mgis-rowlist{display:flex;flex-direction:column;gap:8px}.mgis-rowlist .mgis-card{display:flex;flex-wrap:wrap;align-items:center;gap:12px}.mgis-rowlist .mgis-c-h{min-width:180px}.mgis-rowlist .mgis-c-b{margin:0}
.mgis-app [data-mgis="toggleList"]{display:block!important}
@container mgis-map (max-width:1100px){
 .mgis-app aside{width:280px;flex-basis:280px}
 .mgis-app .dpanel{width:320px;flex-basis:320px;padding:14px}
 .mgis-app header .stats{display:none}
}
@container mgis-map (min-width:821px) and (max-width:1100px){
 .mgis-app header{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"brand actions" "heading heading"}
 .mgis-app header .badge{grid-area:brand;justify-self:start}
 .mgis-app header .map-actions{grid-area:actions;justify-self:end}
 .mgis-app .map-heading{grid-area:heading;min-width:0}
}
@container mgis-map (max-width:820px){
 .mgis-app header{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"brand actions" "heading heading";align-items:center;gap:10px;padding:12px}
 .mgis-app header .badge{grid-area:brand;justify-self:start;max-width:100%;padding:8px 10px;font-size:18px;line-height:1.1;letter-spacing:.3px}
 .mgis-app header .map-actions{grid-area:actions;justify-self:end;gap:6px}
 .mgis-app .map-heading{grid-area:heading;min-width:0}
 .mgis-app .map-heading h1{font-size:18px;line-height:1.3}
 .mgis-app .map-title-separator{display:none}
 .mgis-app .map-heading h1 .sub{display:block;margin-top:4px;font-size:12px;line-height:1.5;font-weight:400;opacity:.9}
 .mgis-app .map-services{margin-top:8px;padding-top:8px;border-top:1px solid rgba(255,255,255,.2);font-size:11px;line-height:1.6;opacity:.9}
 .mgis-app .map-services-label{display:block;font-size:11px;font-weight:700}
 .mgis-app .layout{flex-direction:column}
 .mgis-app aside,.mgis-app .dpanel{position:static;flex:0 1 auto;width:100%;max-width:100%;max-height:55%;border-right:0;border-bottom:1px solid var(--line);overflow-y:auto}
 .mgis-app [data-mgis="list"]{flex:1 0 120px}
 .mgis-app [data-mgis="map"]{height:auto;min-height:180px}
}
@container mgis-map (max-width:370px){
 .mgis-app header{grid-template-areas:"brand brand" "actions actions" "heading heading"}
 .mgis-app header .map-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));justify-self:stretch;width:100%}
 .mgis-app header .map-actions :is(button,a){width:100%}
}
