/* ATLAS MAP 6.0 — DESKTOP PICCHETTAMENTO UI rebuilt from zero.
   Functional DOM/IDs remain untouched; this file owns desktop presentation only. */
@media (min-width:901px){
  body.atlas-shell-staking main{position:relative;overflow:hidden!important;background:#eef3f7}
  body.atlas-shell-staking .mac-window-dot,
  body.atlas-shell-staking .window-dots,
  body.atlas-shell-staking .module-info-strip,
  body.atlas-shell-staking .field-actions-card,
  body.atlas-shell-staking .mobile-quick-hint,
  body.atlas-shell-staking .livecard,
  body.atlas-shell-staking #traceCard,
  body.atlas-shell-staking .open-workspace-btn,
  body.atlas-shell-staking .open-layers-btn,
  body.atlas-shell-staking .maptools{display:none!important}

  /* Left sidebar: same visual grammar as MAPPA */
  body.atlas-shell-staking #layercard{
    display:block!important;position:absolute!important;inset:0 auto 0 0!important;
    width:350px!important;max-width:350px!important;max-height:none!important;margin:0!important;
    padding:18px 16px 24px!important;overflow-y:auto!important;overflow-x:hidden!important;
    transform:none!important;opacity:1!important;visibility:visible!important;
    border:0!important;border-right:1px solid #dce6ee!important;border-radius:0!important;
    background:#f7fafc!important;box-shadow:4px 0 18px rgba(23,47,80,.05)!important;
    z-index:700!important;scrollbar-gutter:stable;
  }
  body.atlas-shell-staking #layercard .layercard-head{
    display:flex!important;align-items:center!important;gap:10px!important;
    padding:0 0 14px!important;margin:0 0 12px!important;border:0!important;
  }
  body.atlas-shell-staking #layercard .layercard-head:before{
    content:"▱";display:grid;place-items:center;width:42px;height:42px;flex:0 0 42px;border-radius:11px;
    background:#0891b2;color:#fff;font-size:25px;font-weight:900;
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.35);
  }
  body.atlas-shell-staking #layercard .layercard-head:after{
    content:"CATasto";content:"Catasto";font-size:16px;font-weight:900;color:#173a60;letter-spacing:-.01em;
  }
  body.atlas-shell-staking #layercard .layercard-head .cardtitle,
  body.atlas-shell-staking #layercard .layercard-head-actions{display:none!important}
  body.atlas-shell-staking #layercard>.cardtitle{font-size:11px!important;text-transform:uppercase;letter-spacing:.06em;color:#173a60!important;margin:14px 0 8px!important}
  body.atlas-shell-staking #layercard .basemap-switch{
    display:grid!important;grid-template-columns:1fr 1fr;gap:0;padding:4px!important;margin:0 0 18px!important;
    border-radius:12px!important;background:#e9f0f5!important
  }
  body.atlas-shell-staking #layercard .basemap-switch button{height:42px!important;border:0!important;border-radius:9px!important;font-weight:850!important;color:#536b82!important;background:transparent!important}
  body.atlas-shell-staking #layercard .basemap-switch button.active{background:#173f67!important;color:#fff!important;box-shadow:0 3px 9px rgba(23,63,103,.18)!important}
  body.atlas-shell-staking #layercard details{
    margin:9px 0!important;padding:0!important;border:1px solid #dce6ee!important;border-left:5px solid #0891b2!important;
    border-radius:12px!important;background:#fff!important;overflow:hidden!important
  }
  body.atlas-shell-staking #layercard details summary{padding:15px 14px!important;font-size:13px!important;font-weight:900!important;color:#173a60!important;cursor:pointer!important;list-style:none!important}
  body.atlas-shell-staking #layercard details summary::-webkit-details-marker{display:none}
  body.atlas-shell-staking #layercard details summary:before{
    content:"▱";display:inline-grid;place-items:center;width:28px;height:28px;margin-right:9px;border-radius:7px;
    background:#0891b2;color:#fff;font-size:16px;vertical-align:middle
  }
  body.atlas-shell-staking #layercard details[open] summary{border-bottom:1px solid #edf2f6!important}
  body.atlas-shell-staking #layercard details label{display:flex!important;align-items:center!important;justify-content:space-between!important;min-height:46px!important;padding:0 15px 0 18px!important;color:#51677d!important;font-size:12px!important;border:0!important}
  body.atlas-shell-staking #layercard details label:hover{background:#f6fafc!important}
  body.atlas-shell-staking #layercard details input[type=checkbox]{width:17px!important;height:17px!important;accent-color:#0891b2}

  /* MAPPA-like right rail */
  body.atlas-shell-staking #desktopModuleRail{
    display:flex!important;position:absolute!important;right:12px!important;top:50%!important;bottom:auto!important;
    transform:translateY(-50%)!important;flex-direction:column!important;width:54px!important;padding:6px!important;gap:5px!important;
    border:1px solid #d8e3eb!important;border-radius:15px!important;background:rgba(255,255,255,.97)!important;
    box-shadow:0 10px 28px rgba(23,47,80,.16)!important;z-index:1600!important
  }
  body.atlas-shell-staking #desktopModuleRail button{
    display:grid!important;place-items:center!important;width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;
    padding:0!important;border:0!important;border-radius:10px!important;background:#173f67!important;color:#fff!important;cursor:pointer!important;
    transition:transform .14s ease,filter .14s ease!important
  }
  body.atlas-shell-staking #desktopModuleRail button:hover{transform:translateY(-1px)!important;filter:brightness(1.08)}
  body.atlas-shell-staking #desktopModuleRail button.active{box-shadow:0 0 0 2px #fff,0 0 0 4px #0891b2!important}
  body.atlas-shell-staking #desktopModuleRail button b{display:none!important}
  body.atlas-shell-staking #desktopModuleRail button span{font-size:19px!important;line-height:1!important}
  body.atlas-shell-staking #desktopModuleRail [data-desktop-module=trace]{display:none!important}
  body.atlas-shell-staking #desktopModuleRail .desktop-rail-separator{display:block!important;width:30px;height:1px;margin:2px auto!important;background:#dce6ee!important}
  body.atlas-shell-staking #desktopModuleRail #railZoomIn{font-size:22px!important}
  body.atlas-shell-staking #desktopModuleRail #railZoomOut{font-size:22px!important;background:#0891b2!important}
  body.atlas-shell-staking #desktopModuleRail #railLocate{margin-top:4px!important;background:#47c27a!important}

  /* Right slide: clean, independently scrollable */
  body.atlas-shell-staking #workspace{
    display:block!important;position:absolute!important;right:76px!important;top:12px!important;bottom:12px!important;
    width:min(500px,38vw)!important;height:auto!important;max-height:none!important;margin:0!important;padding:0!important;
    border:1px solid #dce6ee!important;border-radius:16px!important;background:#fff!important;
    box-shadow:0 16px 42px rgba(23,47,80,.18)!important;z-index:1500!important;
    transform:translateX(calc(100% + 100px))!important;opacity:0!important;visibility:hidden!important;pointer-events:none!important;
    overflow:hidden!important;transition:transform .2s ease,opacity .16s ease!important
  }
  body.atlas-shell-staking #workspace.desktop-open{
    transform:translateX(0)!important;opacity:1!important;visibility:visible!important;pointer-events:auto!important
  }
  body.atlas-shell-staking #workspace .workspace-head{
    display:flex!important;min-height:68px!important;padding:14px 17px!important;margin:0!important;border-bottom:1px solid #e7eef4!important;background:#fff!important
  }
  body.atlas-shell-staking #workspace .workspace-head strong{font-size:15px!important;color:#173a60!important}
  body.atlas-shell-staking #workspace .workspace-head span{font-size:10px!important;color:#73869a!important}
  body.atlas-shell-staking #workspace .workspace-head-actions,
  body.atlas-shell-staking #workspace .grab{display:none!important}
  body.atlas-shell-staking #workspace .tab{
    display:none!important;height:calc(100% - 68px)!important;max-height:none!important;padding:16px!important;overflow-y:auto!important;overflow-x:hidden!important;scrollbar-gutter:stable!important
  }
  body.atlas-shell-staking #workspace .tab.active{display:block!important}
  body.atlas-shell-staking #workspace .tab::-webkit-scrollbar,
  body.atlas-shell-staking #layercard::-webkit-scrollbar{width:8px}
  body.atlas-shell-staking #workspace .tab::-webkit-scrollbar-thumb,
  body.atlas-shell-staking #layercard::-webkit-scrollbar-thumb{background:#c5d2dd;border-radius:20px;border:2px solid transparent;background-clip:padding-box}
  body.atlas-shell-staking #workspace .hint{margin:10px 0!important;padding:10px 12px!important;border-radius:10px!important;background:#f4f8fb!important;color:#657b8f!important;font-size:10px!important;line-height:1.45!important}
  body.atlas-shell-staking #workspace .addrow{display:grid!important;grid-template-columns:1fr auto!important;gap:8px!important;margin:0 0 10px!important}
  body.atlas-shell-staking #workspace .addrow input{min-width:0!important}
  body.atlas-shell-staking #workspace .polybar,
  body.atlas-shell-staking #workspace .exportbar{display:flex!important;flex-wrap:wrap!important;gap:7px!important}
  body.atlas-shell-staking #workspace button{min-height:38px;border-radius:9px!important}
  body.atlas-shell-staking #workspace .colorpick{height:38px!important;padding:5px 8px!important;border:1px solid #dce6ee!important;border-radius:9px!important;background:#fff!important}
  body.atlas-shell-staking #workspace .colorpick input[type=color]{width:24px!important;height:24px!important;margin:0 0 0 5px!important}
  body.atlas-shell-staking #workspace .triggrid{display:grid!important;grid-template-columns:1fr!important;gap:10px!important}
  body.atlas-shell-staking #workspace .triggrid article{padding:14px!important;border:1px solid #dce6ee!important;border-radius:12px!important;background:#fff!important}
  body.atlas-shell-staking #workspace .triggrid h3{margin:0 0 10px!important;color:#173a60!important;font-size:13px!important}
}

/* 6.0.5 desktop-only cleanup */
@media(min-width:901px){
 body.atlas-shell-staking #desktopModuleRail [data-desktop-module="trace"]{display:none!important}
 body.atlas-shell-staking #tab-points .field-actions-card,
 body.atlas-shell-staking #tab-points .altitude-notice,
 body.atlas-shell-staking #tab-points .data-altitude-notice,
 body.atlas-shell-staking #tab-points [class*="altitude-notice"]{display:none!important}
 body.atlas-shell-staking #tab-points>.hint{display:none!important}
 body.atlas-shell-staking #tab-points .livecard{display:none!important}
}

/* 6.0.7 exact MAPPA Catasto icon language */
@media(min-width:901px){
 body.atlas-shell-staking #layercard .layercard-head:before{
  content:""!important;display:block!important;width:42px!important;height:42px!important;flex:0 0 42px!important;
  border-radius:11px!important;background-color:#0891b2!important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='%23fff' stroke-width='3' stroke-linejoin='round'%3E%3Cpath d='M24 5 7 14l17 9 17-9-17-9Z'/%3E%3Cpath d='m7 22 17 9 17-9M7 30l17 9 17-9'/%3E%3C/g%3E%3C/svg%3E")!important;
  background-repeat:no-repeat!important;background-position:center!important;background-size:30px 30px!important;
 }
}

/* 6.1 — Catasto identical language to MAPPA reference + VisualTAF BOOST */
@media(min-width:901px){
 body.atlas-shell-staking #layercard .atlas-catasto-card{border:1px solid #b8d2e6!important;border-left:7px solid #0797b7!important;border-radius:0 20px 20px 20px!important;background:#fff!important;overflow:hidden!important}
 body.atlas-shell-staking #layercard .atlas-catasto-card summary{display:flex!important;align-items:center!important;gap:12px!important;min-height:78px!important;padding:10px 16px!important;background:#f7fafc!important;border-bottom:1px solid #e3ebf2!important}
 body.atlas-shell-staking #layercard .atlas-catasto-card summary:before{display:none!important}
 .atlas-catasto-summary-icon{display:grid!important;place-items:center!important;width:46px!important;height:46px!important;border-radius:14px!important;background:#0797b7!important;color:#fff!important;font-size:27px!important;font-weight:900!important}
 body.atlas-shell-staking #layercard .atlas-catasto-card summary b{font-size:16px!important;color:#213b61!important}
 body.atlas-shell-staking #layercard .atlas-catasto-card summary em{font-style:normal!important;font-size:13px!important;color:#9aaac0!important;margin-left:5px!important}
 body.atlas-shell-staking #layercard .atlas-catasto-card label{min-height:47px!important;padding:0 18px 0 34px!important;font-size:15px!important;color:#3c506d!important}
 .atlas-layer-swatch{display:inline-block;width:19px;height:19px;border-radius:5px;margin-right:13px;vertical-align:-4px}
 .sw-buildings{background:#d69a25}.sw-sheets{background:#9a7a1c}.sw-parcels{background:#f0b63d}.sw-dress{background:#4d6d7b}
 body.atlas-shell-staking #desktopModuleRail #railZoomOut{background:#223A5E!important}
 body.atlas-shell-staking #desktopModuleRail .desktop-rail-maplink{display:grid!important;place-items:center!important;width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;border-radius:10px!important;background:#223A5E!important;color:#fff!important;text-decoration:none!important}
 body.atlas-shell-staking #desktopModuleRail .desktop-rail-maplink b{display:none!important}
 body.atlas-shell-staking #desktopModuleRail .desktop-rail-maplink span{font-size:18px!important}
}
.atlas-staking-taf{margin-top:12px;border:1px solid #dbe5ee;border-radius:14px;background:#fff;overflow:hidden}
.atlas-staking-taf summary{display:flex;align-items:center;gap:10px;padding:12px 14px;cursor:pointer;color:#223A5E}
.atlas-staking-taf summary:before{display:none!important}.atlas-taf-icon{display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:#223A5E;color:#fff}
.atlas-staking-taf summary span:last-child{display:flex;align-items:center;gap:7px}.atlas-staking-taf summary em{font-style:normal;font-size:9px;font-weight:900;color:#7c3aed}
.atlas-taf-body{padding:0 12px 12px}.atlas-taf-body p,.atlas-taf-results{font-size:11px;color:#60758a;line-height:1.4}.atlas-taf-controls{display:flex;gap:7px;margin:8px 0}.atlas-taf-controls select{flex:1;min-width:0}.atlas-taf-controls button{background:#223A5E;color:#fff;border:0;border-radius:8px;padding:7px 9px;font-weight:800}

.atlas-taf-results button{display:flex;width:100%;align-items:center;justify-content:space-between;gap:8px;margin-top:5px;padding:7px 8px;border:1px solid #e1e9ef;border-radius:8px;background:#f8fbfd;color:#314a66;text-align:left;cursor:pointer}.atlas-taf-results button span{font-size:10px;color:#73869a}

.atlas-catasto-summary-icon svg{width:27px;height:27px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round}


/* 6.1.20 — desktop icon parity with MAPPA */
@media (min-width:901px){
  body.atlas-shell-staking .atlas-catasto-summary-icon,
  body.atlas-shell-staking .atlas-taf-icon{
    width:38px!important;
    height:38px!important;
    min-width:38px!important;
    min-height:38px!important;
    flex-basis:38px!important;
    border-radius:11px!important;
  }
  body.atlas-shell-staking .atlas-catasto-summary-icon svg{
    width:23px!important;
    height:23px!important;
  }
  body.atlas-shell-staking .atlas-taf-icon{
    font-size:22px!important;
  }
}


/* ATLAS PICCHETTAMENTO — DESKTOP SIDE PANEL TOGGLES 6.1.16 */
@media (min-width:901px){
  body.atlas-shell-staking .staking-side-toggle--left{
    position:fixed!important;z-index:1710!important;left:349px!important;top:50%!important;
    transform:translateY(-50%)!important;width:24px!important;min-width:24px!important;height:50px!important;min-height:50px!important;
    margin:0!important;padding:0!important;border:1px solid rgba(34,58,94,.18)!important;border-left:0!important;
    border-radius:0 10px 10px 0!important;background:#fff!important;color:#223A5E!important;
    box-shadow:4px 4px 14px rgba(26,47,77,.12)!important;display:flex!important;align-items:center!important;justify-content:center!important;
    cursor:pointer!important;transition:left .2s ease!important;
  }
  body.atlas-shell-staking .staking-side-toggle--left svg,
  body.atlas-shell-staking .staking-right-rail-toggle svg{width:19px!important;height:19px!important;display:block!important;transition:transform .2s ease!important}
  body.atlas-shell-staking.staking-left-panel-collapsed #layercard{display:none!important}
  body.atlas-shell-staking.staking-left-panel-collapsed .staking-side-toggle--left{left:0!important}
  body.atlas-shell-staking.staking-left-panel-collapsed .staking-side-toggle--left svg{transform:rotate(180deg)!important}

  body.atlas-shell-staking #desktopModuleRail .staking-right-rail-toggle{
    display:flex!important;align-items:center!important;justify-content:center!important;
    width:40px!important;min-width:40px!important;height:28px!important;min-height:28px!important;
    margin:5px 0 0!important;padding:4px 0 0!important;border:0!important;border-top:1px solid #dfe6ee!important;
    border-radius:0 0 9px 9px!important;background:transparent!important;color:#60758c!important;box-shadow:none!important;cursor:pointer!important;
  }
  body.atlas-shell-staking #desktopModuleRail.is-collapsed{
    right:-48px!important;background:transparent!important;border-color:transparent!important;box-shadow:none!important;
  }
  body.atlas-shell-staking #desktopModuleRail.is-collapsed>:not(.staking-right-rail-toggle){visibility:hidden!important;pointer-events:none!important}
  body.atlas-shell-staking #desktopModuleRail.is-collapsed .staking-right-rail-toggle{
    position:absolute!important;right:46px!important;top:50%!important;transform:translateY(-50%)!important;
    width:24px!important;min-width:24px!important;height:50px!important;min-height:50px!important;margin:0!important;padding:0!important;
    border:1px solid rgba(34,58,94,.18)!important;border-right:0!important;border-radius:10px 0 0 10px!important;
    background:#fff!important;color:#223A5E!important;box-shadow:-4px 4px 14px rgba(26,47,77,.12)!important;
  }
  body.atlas-shell-staking #desktopModuleRail.is-collapsed .staking-right-rail-toggle svg{transform:rotate(180deg)!important}
  body.atlas-shell-staking #desktopModuleRail .desktop-rail-map-icon,
  body.atlas-shell-staking #desktopModuleRail .desktop-rail-map-icon svg{
    width:21px!important;height:21px!important;display:block!important;color:currentColor!important;
  }
}
@media (max-width:900px){
  .staking-side-toggle,.staking-right-rail-toggle{display:none!important}
}
