/* R3.4.7 final desktop refinement: coherent VI/EN, restored left panel, Google-Earth-like bottom-right dock */
:root{
  --vg-green-1:#0a6c45;
  --vg-green-2:#14573a;
  --vg-green-3:#0f4330;
  --vg-green-4:#1f7a53;
  --vg-soft-1:#f4faf6;
  --vg-soft-2:#e6f1eb;
  --vg-soft-3:#d5e6dc;
  --vg-border:#b8d2c3;
  --vg-shadow:0 8px 24px rgba(12,67,48,.14);
  --status-bar-h:40px;
}
html,body{background:#edf6ef;color:var(--vg-green-3)}
body{font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif}
#footer{display:none!important}
.workspace{height:calc(100dvh - var(--header))!important;background:linear-gradient(180deg,#f6fbf8 0%,#edf6f0 100%)}
.topbar{
  background:linear-gradient(90deg,#fdfefe 0%,#f7fcf8 42%,#edf7f1 100%)!important;
  border-bottom:1px solid #bdd8c8!important;
  box-shadow:0 3px 14px rgba(12,67,48,.08);
  padding:8px 18px;
}
.topbar::after{
  content:'';
  position:absolute;
  inset:auto 0 0 0;
  height:2px;
  background:linear-gradient(90deg,rgba(10,108,69,.18),rgba(55,158,111,.34),rgba(10,108,69,.12));
}
.brand{gap:12px}
.brand-symbol{
  width:44px;height:44px;border-radius:14px;
  background:linear-gradient(160deg,#0f6f46,#1a7b52)!important;
  color:#fff!important;
  box-shadow:0 8px 16px rgba(15,110,69,.18);
}
.brand strong{font-size:20px;line-height:1.1;font-weight:850;color:#0f6d45!important;letter-spacing:-.02em}
.brand small{display:block;font-size:12px!important;line-height:1.35;font-weight:700;color:#285c44!important;letter-spacing:.055em!important;text-transform:uppercase}
.header-actions{gap:8px;align-items:center}
.header-actions button,.atlas-admin-entry{
  min-height:42px;border-radius:12px!important;font-size:13px;font-weight:800;box-shadow:0 4px 10px rgba(16,73,47,.06)
}
.atlas-admin-entry{padding-inline:14px}
.lang-switch{
  display:inline-flex;align-items:center;gap:4px;padding:4px;border-radius:14px;
  background:#edf5f0;border:1px solid #c4dacc;box-shadow:0 4px 10px rgba(16,73,47,.06)
}
.lang-switch button{
  min-width:56px;min-height:34px;border:0!important;border-radius:10px!important;background:transparent!important;color:#245941!important;
  font-size:13px;font-weight:850;letter-spacing:.03em;box-shadow:none!important
}
.lang-switch button.active{background:#0e6440!important;color:#fff!important}
#homeBtn{padding-inline:14px}
#settingsBtn{display:none!important}

.side{
  background:rgba(251,254,252,.98);
  backdrop-filter:blur(8px);
  box-shadow:0 10px 26px rgba(12,67,48,.08);
}
.layer-panel,.info-panel{background:linear-gradient(180deg,#fcfefd 0%,#f6fbf8 100%)}
.panel-heading{
  min-height:58px;padding:14px 16px;background:linear-gradient(180deg,#eef6f1 0%,#e6f1eb 100%)!important;border-bottom:1px solid #d6e7dd
}
.panel-heading h2{font-size:15px;font-weight:850;letter-spacing:.01em;color:#154e36}
.panel-heading .desktop-close{font-size:24px;line-height:1;color:#35614c}
.small{font-size:12px;line-height:1.52;color:#476654}
.layer-panel .small{padding:12px 14px 8px}
.layers-list{padding:0 10px 10px}
.group-title{font-size:12px;font-weight:850;letter-spacing:.065em;color:#0f4e33;margin-top:10px;padding:12px 4px 8px;border-top:1px solid #deebe4}
.group-title:first-child{border-top:0;margin-top:6px;padding-top:8px}
.layer-row{display:grid;grid-template-columns:auto auto auto 1fr auto;align-items:center;gap:8px;padding:8px 4px;min-height:40px}
.layer-row label{font-size:13px;line-height:1.35;color:#194734;cursor:pointer}
.layer-row input[type=checkbox]{width:15px;height:15px}
.layer-row .swatch{width:13px;height:13px;border-radius:50%;border:1px solid rgba(0,0,0,.08)}
.layer-row .icon-mini{width:18px;text-align:center;font-size:14px;color:#35614c}
.layer-row .edit{font-size:12px;padding:4px 6px}
.panel-foot{padding:10px 14px 14px;border-top:1px solid #e1ece6;background:rgba(246,251,248,.96)}

.mapwrap{background:#dce8df}
#map{filter:saturate(1.02)}
.atlas-map-search{
  top:16px!important;left:20px!important;display:flex;align-items:center;gap:10px;
  min-height:48px;border:1px solid #bfd8c8;border-radius:15px!important;background:rgba(255,255,255,.97);
  box-shadow:var(--vg-shadow);overflow:hidden
}
body.atlas-layers-visible .atlas-map-search{left:348px!important;width:min(390px,calc(100vw - 770px))!important;min-width:280px}
body:not(.atlas-layers-visible) .atlas-map-search{width:min(430px,calc(100vw - 500px))!important;min-width:280px}
.atlas-map-search>input{font-size:14px;color:#194734;padding:12px 12px}
#desktopLayers{display:none!important}

.map-tools{
  top:76px!important;left:20px!important;border-radius:15px;overflow:hidden;box-shadow:var(--vg-shadow)
}
body.atlas-layers-visible .map-tools{left:348px!important}
.map-tools button{
  width:46px;height:46px;background:rgba(255,255,255,.97);border-color:#c7ddd0;color:#14573a;font-size:22px;font-weight:700
}
.map-tools button:hover{background:#f3faf6}

.map-bottom-right{
  position:absolute;right:16px;bottom:calc(var(--status-bar-h) + 16px);z-index:620;display:flex;flex-direction:column;align-items:flex-end;gap:10px
}
.map-bottom-right .dock-btn,.basemap-switch,.ge-compass{
  box-shadow:var(--vg-shadow)
}
.map-bottom-right .dock-btn{
  display:flex;align-items:center;gap:8px;padding:0 14px;min-height:42px;border:1px solid #bfd7c9;border-radius:14px;background:rgba(255,255,255,.97);color:#164c34;font-weight:800
}
.dock-label{font-size:13px}
.ge-compass{
  position:relative;width:58px;height:58px;border-radius:50%!important;border:1px solid #bfd5c8!important;
  background:radial-gradient(circle at 34% 28%,#ffffff 0%,#f8fcfa 62%,#ecf4ef 100%)!important;padding:0!important
}
.ge-compass .north-letter{
  position:absolute;top:7px;left:50%;transform:translateX(-50%);font-size:16px;font-weight:900;color:#16583a;letter-spacing:.02em
}
.ge-compass .needle{position:absolute;left:50%;transform:translateX(-50%);width:0;height:0}
.ge-compass .needle.north{top:15px;border-left:8px solid transparent;border-right:8px solid transparent;border-bottom:20px solid #cf4c3f;filter:drop-shadow(0 2px 2px rgba(0,0,0,.16))}
.ge-compass .needle.south{top:28px;border-left:7px solid transparent;border-right:7px solid transparent;border-top:16px solid #a8b7af}
.ge-compass .hub{position:absolute;left:50%;top:50%;transform:translate(-50%,-2px);width:8px;height:8px;border-radius:50%;background:#fff;border:2px solid #d5e5dc}

.basemap-switch{
  display:inline-flex;align-items:center;gap:4px;padding:4px;border-radius:16px;border:1px solid #bfd7c9;background:rgba(255,255,255,.97)
}
.basemap-switch button{
  min-height:38px;padding:0 14px;border:0!important;border-radius:12px!important;background:transparent!important;color:#225841;font-size:13px;font-weight:800;box-shadow:none!important
}
.basemap-switch button.active{background:#0e6440!important;color:#fff!important}

.map-bottom{
  position:absolute;left:0;right:0;bottom:0;z-index:610;height:var(--status-bar-h);padding:0 14px;
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  background:rgba(255,255,255,.97);border-top:1px solid #bdd5c7;box-shadow:0 -4px 14px rgba(12,67,48,.07);
  color:#184b34;font-size:12px
}
.map-bottom .status-left,.map-bottom .status-right{display:flex;align-items:center;gap:14px;min-width:0}
.map-bottom .status-left{flex:1;overflow:hidden}
#coordinates{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums;font-size:12px}
#statusScale,#statusZoom{font-size:12px;font-weight:750;white-space:nowrap;font-variant-numeric:tabular-nums}
#coordMode{
  min-width:84px;min-height:30px;padding:0 10px;border:1px solid #bfd7c9;border-radius:10px;background:#f3faf6;color:#14573a;font-size:11px;font-weight:850
}
.map-scale,.leaflet-control-scale{display:none!important}
.leaflet-control-attribution{bottom:44px!important;right:10px!important;font-size:10px;background:rgba(255,255,255,.88)!important}
.atlas-tile-status{bottom:50px!important;right:14px!important}

/* Keep desktop layer panel open by default; restore clean scientific layout */
@media(min-width:801px){
  #layerPanel{width:328px!important}
  body.atlas-layers-visible #layerPanel{transform:none!important}
  .mapwrap{border-left:1px solid #d4e5dc}
}

@media(max-width:800px){
  .topbar{padding:6px 10px;gap:6px}
  .brand strong{font-size:15px}
  .brand small{font-size:10px!important}
  .lang-switch{padding:3px}
  .lang-switch button{min-width:44px;min-height:30px;font-size:12px}
  .atlas-map-search,.map-tools,.map-bottom-right{left:auto!important}
  .atlas-map-search{top:12px!important;left:12px!important;right:12px!important;min-width:0;width:auto!important}
  .map-tools{top:72px!important;left:12px!important}
  .map-bottom-right{right:12px;bottom:calc(var(--status-bar-h) + 12px)}
  .map-bottom{padding:0 10px;font-size:11px}
  .map-bottom .status-right{gap:8px}
  #coordMode{min-width:76px}
}
