/* NexusDpp depth layer v1 — Area riservata, chat, CRM, ERP */
:root{
  --nxd-ring:rgba(7,174,202,.30);
  --nxd-ring-hover:rgba(7,174,202,.60);
  --nxd-panel:0 1px 0 rgba(255,255,255,.9) inset,0 0 0 1px var(--nxd-ring),0 2px 6px rgba(9,52,82,.07),0 16px 32px -12px rgba(9,52,82,.24),0 36px 72px -30px rgba(8,120,207,.34);
  --nxd-hover:0 1px 0 rgba(255,255,255,.95) inset,0 0 0 1px var(--nxd-ring-hover),0 4px 10px rgba(9,52,82,.10),0 24px 44px -14px rgba(9,52,82,.30),0 44px 84px -28px rgba(8,170,150,.42);
  --nxd-window:0 1px 0 rgba(255,255,255,.9) inset,0 0 0 1px rgba(7,174,202,.40),0 30px 80px -20px rgba(6,40,66,.45),0 0 60px -20px rgba(7,174,202,.45);
  --nxd-bar:0 1px 0 rgba(255,255,255,.8) inset,0 -1px 0 rgba(7,174,202,.35) inset,0 14px 34px -16px rgba(8,120,207,.45);
  --nxd-side:-1px 0 0 rgba(255,255,255,.7) inset,14px 0 34px -22px rgba(8,120,207,.50);
  --nxd-btn:0 1px 0 rgba(255,255,255,.40) inset,0 10px 22px -8px rgba(7,150,200,.60);
  --nxd-btn-hover:0 1px 0 rgba(255,255,255,.50) inset,0 14px 28px -8px rgba(7,170,180,.70);
  --nxd-active:0 0 0 1px rgba(7,174,202,.45),0 8px 20px -8px rgba(7,150,200,.55);
}
html[data-theme="dark"],html:not(.light-theme) body.nx-premium{
  --nxd-ring:rgba(56,190,211,.26);
  --nxd-ring-hover:rgba(56,190,211,.55);
  --nxd-panel:0 1px 0 rgba(255,255,255,.07) inset,0 0 0 1px var(--nxd-ring),0 18px 40px -14px rgba(0,0,0,.65),0 0 40px -16px rgba(7,174,202,.40);
  --nxd-hover:0 1px 0 rgba(255,255,255,.10) inset,0 0 0 1px var(--nxd-ring-hover),0 24px 48px -14px rgba(0,0,0,.70),0 0 52px -14px rgba(7,190,200,.55);
  --nxd-window:0 1px 0 rgba(255,255,255,.08) inset,0 0 0 1px rgba(56,190,211,.40),0 30px 90px -20px rgba(0,0,0,.80),0 0 70px -20px rgba(7,174,202,.50);
  --nxd-bar:0 1px 0 rgba(255,255,255,.06) inset,0 -1px 0 rgba(56,190,211,.35) inset,0 14px 34px -16px rgba(0,0,0,.70);
  --nxd-side:-1px 0 0 rgba(56,190,211,.22) inset,14px 0 34px -22px rgba(0,0,0,.70);
  --nxd-active:0 0 0 1px rgba(56,190,211,.55),0 0 22px -6px rgba(7,190,200,.65);
}

/* Barre in alto e barre laterali */
html body .nx-topbar,
html body header.topbar.crm-suite-bar{box-shadow:var(--nxd-bar)!important}
html body .nx-shell .nx-sidebar,
html body .enterprise-sidebar,
html body aside.sidebar{box-shadow:var(--nxd-side)!important}

/* Pannelli e schede: Area riservata (home, documenti, calendario, impostazioni) */
html body#nx-area-root #mainContent .nh-panel,
html body#nx-area-root #mainContent .nh-kpi,
html body#nx-area-root #mainContent .docs-home-kpi,
html body#nx-area-root #mainContent .docs-home-operational-panel,
html body#nx-area-root #mainContent .docs-folder-card,
html body#nx-area-root #mainContent .docs-document-card,
html body#nx-area-root #mainContent .docs-upload-panel,
html body#nx-area-root #mainContent .docs-settings-card,
html body#nx-area-root #mainContent .docs-presentation-card,
html body#nx-area-root #mainContent .docs-uploaded-card,
html body#nx-area-root #mainContent .calendar-surface,
html body#nx-area-root #mainContent .calendar-side-card,
html body#nx-area-root #mainContent .nx-user-panel,
/* Chat */
html body#nx-area-root.chat-page .chat-panel,
html body#nx-area-root.chat-page .nx-chat-contact-rail,
html body#nx-area-root.chat-page .nx-chat-details,
/* CRM */
html body .crm-suite-bar ~ main .card,
html body .crm-suite-bar ~ main .hero-card,
html body .crm-suite-bar ~ main .metric,
/* ERP */
html body .nx-shell .nx-card,
html body .nx-shell .nx-panel,
html body .nx-shell .nx-kpi,
html body .nx-shell .nx-table-wrap,
html body .nx-shell .nx-hero{
  box-shadow:var(--nxd-panel)!important;
  transition:box-shadow .22s ease,transform .22s ease!important;
}

/* Finestre che si aprono */
html body .nxun-panel,
html body dialog[open],
html body#nx-area-root .calendar-day-view-dialog{box-shadow:var(--nxd-window)!important}

/* Schede cliccabili: si sollevano al passaggio del mouse */
@media (hover:hover) and (prefers-reduced-motion:no-preference){
  html body#nx-area-root #mainContent .nh-kpi:hover,
  html body#nx-area-root #mainContent .docs-home-kpi:hover,
  html body#nx-area-root #mainContent .docs-folder-card:hover,
  html body .crm-suite-bar ~ main .metric:hover,
  html body .nx-shell .nx-kpi:hover,
  html body .nx-shell .nx-module-link:hover{
    transform:translateY(-3px)!important;
    box-shadow:var(--nxd-hover)!important;
  }
  html body .nxun-root:not([hidden]) .nxun-panel{animation:nxd-slide .24s cubic-bezier(.2,.8,.2,1)}
  html body dialog[open]{animation:nxd-pop .2s cubic-bezier(.2,.8,.2,1)}
}
@keyframes nxd-slide{from{transform:translateX(24px);opacity:.6}to{transform:none;opacity:1}}
@keyframes nxd-pop{from{transform:scale(.97);opacity:.6}to{transform:none;opacity:1}}

/* Pulsanti principali con luce del marchio */
html body .nx-suite-shortcut,
html body#nx-area-root #mainContent .nh-primary,
html body .crm-suite-link,
html body .nx-shell .nx-crm-link,
html body .nx-shell .nx-btn.primary{
  box-shadow:var(--nxd-btn)!important;
  transition:box-shadow .2s ease,filter .2s ease,transform .2s ease!important;
}
@media (hover:hover){
  html body .nx-suite-shortcut:hover,
  html body#nx-area-root #mainContent .nh-primary:hover,
  html body .crm-suite-link:hover,
  html body .nx-shell .nx-crm-link:hover,
  html body .nx-shell .nx-btn.primary:hover{
    box-shadow:var(--nxd-btn-hover)!important;
    filter:brightness(1.06) saturate(1.08);
  }
}

/* Voce di menu attiva */
html body .nx-primary-nav a[aria-current="page"],
html body .sidebar nav a.active,
html body .nav-submenu a.active,
html body .nx-shell .nx-nav-group nav a.active{box-shadow:var(--nxd-active)!important}

/* Telefono e tablet: ombre più corte, nessun sollevamento */
@media (max-width:850px){
  :root,html[data-theme="dark"],html:not(.light-theme) body.nx-premium{
    --nxd-panel:0 1px 0 rgba(255,255,255,.85) inset,0 0 0 1px var(--nxd-ring),0 10px 22px -12px rgba(9,52,82,.30);
    --nxd-side:none;
  }
  html[data-theme="dark"],html:not(.light-theme) body.nx-premium{
    --nxd-panel:0 1px 0 rgba(255,255,255,.06) inset,0 0 0 1px var(--nxd-ring),0 12px 26px -12px rgba(0,0,0,.65);
  }
}
@media (prefers-reduced-motion:reduce){
  html body .nxun-panel,html body dialog[open]{animation:none!important}
}
@media print{
  html body *{box-shadow:none!important}
}
