/* ==========================================================================
   SpaceWeb - Unified Design System (Public Site + Role-Based Dashboards)
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #070714;
    color: #f3f4f6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   SFONDO STELLATO ANIMATO & IL PIANETA COSMICO (STILE CLAUDE)
   ========================================================================== */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}
.star {
    position: absolute;
    background: #ffffff;
    border-radius: 50%;
    animation: twinkle var(--duration, 3s) infinite ease-in-out;
}
@keyframes twinkle {
    0%, 100% { opacity: 0.18; transform: scale(0.8); }
    50% { opacity: 0.9; transform: scale(1.25); box-shadow: 0 0 4px #ffffff; }
}

.bg-grid-pattern {
    background-image: radial-gradient(rgba(139, 92, 246, 0.12) 1px, transparent 1px);
    background-size: 32px 32px;
}

/* SFONDO COSMICO: UNIVERSO INTERATTIVO 60FPS + PIANETA SFERICO 3D FOTOREALISTICO */
.cosmic-universe-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    background:
        radial-gradient(ellipse 90% 60% at 50% -10%, rgba(109, 40, 217, 0.22) 0%, transparent 65%),
        radial-gradient(ellipse 75% 55% at 95% 20%, rgba(0, 210, 255, 0.14) 0%, transparent 60%),
        radial-gradient(ellipse 70% 50% at 10% 85%, rgba(168, 85, 247, 0.14) 0%, transparent 65%),
        linear-gradient(180deg, #050511 0%, #070716 45%, #09091d 100%);
}

.cosmic-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.cosmic-aurora {
    position: absolute;
    inset: -20%;
    background:
        conic-gradient(from 180deg at 50% 50%,
            rgba(168, 85, 247, 0.08) 0deg,
            rgba(0, 210, 255, 0.09) 90deg,
            rgba(16, 185, 129, 0.05) 180deg,
            rgba(99, 102, 241, 0.09) 270deg,
            rgba(168, 85, 247, 0.08) 360deg);
    filter: blur(95px);
    animation: auroraRotate 38s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes auroraRotate {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.08); }
    100% { transform: rotate(360deg) scale(1); }
}

.cosmic-nebula {
    position: absolute;
    border-radius: 50%;
    filter: blur(95px);
    pointer-events: none;
    z-index: 1;
}
.nebula-purple {
    width: 780px;
    height: 780px;
    top: -150px;
    right: -100px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.34) 0%, rgba(99, 102, 241, 0.18) 48%, transparent 72%);
    animation: nebulaPulse 14s ease-in-out infinite alternate;
}
.nebula-cyan {
    width: 620px;
    height: 620px;
    bottom: 2%;
    left: -130px;
    background: radial-gradient(circle, rgba(0, 210, 255, 0.26) 0%, rgba(59, 130, 246, 0.12) 50%, transparent 72%);
    animation: nebulaPulse 18s ease-in-out infinite alternate-reverse;
}
.nebula-emerald {
    width: 480px;
    height: 480px;
    top: 42%;
    left: 28%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.11) 0%, rgba(0, 210, 255, 0.06) 45%, transparent 70%);
    animation: nebulaPulse 22s ease-in-out infinite alternate;
}

@keyframes nebulaPulse {
    0% { transform: scale(1) translate(0, 0); opacity: 0.85; }
    100% { transform: scale(1.12) translate(18px, -14px); opacity: 1; }
}

/* ==========================================================================
   PIANETA COSMICO 3D FOTOREALISTICO CON OCCLUSIONE REALE DEGLI ANELLI
   ========================================================================== */
.celestial-planet.main-planet {
    position: absolute;
    width: 560px;
    height: 560px;
    top: 28px;
    right: 3%;
    z-index: 2;
    pointer-events: none;
    animation: planetFloat 22s ease-in-out infinite alternate;
    will-change: transform;
}

/* Corona Solare / Bagliore Atmosferico Viola-Blu (Stile Pianeta SpaceWeb) */
.celestial-planet.main-planet .planet-corona {
    position: absolute;
    inset: -55px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 66% 28%,
            rgba(168, 85, 247, 0.48) 0%,
            rgba(99, 102, 241, 0.36) 36%,
            rgba(56, 189, 248, 0.18) 58%,
            transparent 74%);
    filter: blur(28px);
    animation: coronaPulse 8s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes coronaPulse {
    0% { transform: scale(0.96); opacity: 0.78; }
    100% { transform: scale(1.06); opacity: 1; }
}

/* Sfera 3D Galattica del Pianeta SpaceWeb (identica al pianeta del nuovo logo: galassia blu-viola profonda con nebulosa e stelle interne) */
.celestial-planet.main-planet .planet-sphere {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    overflow: hidden;
    z-index: 2;
    background:
        radial-gradient(circle at 72% 24%,
            #e0e7ff 0%,
            #a855f7 14%,
            #6366f1 30%,
            #3b0764 52%,
            #140736 74%,
            #050214 94%);
    box-shadow:
        inset -80px -70px 130px rgba(2, 1, 12, 0.96),
        inset 24px 20px 55px rgba(168, 85, 247, 0.82),
        inset -16px 20px 44px rgba(56, 189, 248, 0.65),
        0 0 65px rgba(139, 92, 246, 0.52),
        0 0 130px rgba(99, 102, 241, 0.42);
}

/* Nebulosa Galattica Interna (Viola / Magenta / Indaco / Ciano come nel logo SpaceWeb) */
.planet-galaxy-nebula {
    position: absolute;
    inset: -10%;
    background:
        radial-gradient(ellipse 55% 42% at 62% 38%, rgba(192, 132, 252, 0.62) 0%, rgba(126, 34, 206, 0.32) 48%, transparent 75%),
        radial-gradient(ellipse 48% 36% at 35% 64%, rgba(99, 102, 241, 0.55) 0%, rgba(56, 189, 248, 0.25) 52%, transparent 78%),
        radial-gradient(ellipse 60% 30% at 50% 50%, rgba(217, 70, 239, 0.38) 0%, transparent 70%);
    mix-blend-mode: screen;
    filter: blur(6px);
    animation: bandsDrift 26s ease-in-out infinite alternate;
}

/* Costellazioni e Polvere Stellare Interna alla Sfera del Pianeta */
.planet-galaxy-stars {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(2px 2px at 22% 32%, #ffffff 90%, transparent),
        radial-gradient(1.5px 1.5px at 38% 24%, #e0e7ff 90%, transparent),
        radial-gradient(2.5px 2.5px at 66% 30%, #ffffff 90%, transparent),
        radial-gradient(1.5px 1.5px at 74% 48%, #f5d0fe 90%, transparent),
        radial-gradient(2px 2px at 52% 44%, #ffffff 90%, transparent),
        radial-gradient(1.5px 1.5px at 28% 58%, #bae6fd 90%, transparent),
        radial-gradient(2px 2px at 46% 72%, #ffffff 90%, transparent),
        radial-gradient(1.5px 1.5px at 64% 66%, #e9d5ff 90%, transparent),
        radial-gradient(2.2px 2.2px at 34% 42%, #ffffff 90%, transparent),
        radial-gradient(1.2px 1.2px at 58% 22%, #ffffff 90%, transparent),
        radial-gradient(1.8px 1.8px at 42% 54%, #f0abfc 90%, transparent),
        radial-gradient(1.4px 1.4px at 70% 60%, #ffffff 90%, transparent);
    opacity: 0.92;
    mix-blend-mode: screen;
    animation: twinkle 4s ease-in-out infinite alternate;
}

/* Stella Brillante a 4 Punte sul bordo superiore destro (identica al bagliore del pianeta nel logo) */
.planet-star-flare {
    position: absolute;
    top: 15%;
    right: 11%;
    width: 38px;
    height: 38px;
    z-index: 4;
    pointer-events: none;
    transform: translate(50%, -50%);
    animation: starFlarePulse 2.8s ease-in-out infinite alternate;
}
.planet-star-flare::before,
.planet-star-flare::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 9999px;
    background: radial-gradient(circle, #ffffff 0%, #e0e7ff 35%, rgba(168, 85, 247, 0.8) 70%, transparent 100%);
    box-shadow: 0 0 18px 4px #ffffff, 0 0 34px 8px rgba(168, 85, 247, 0.95);
}
.planet-star-flare::before {
    width: 44px;
    height: 3.5px;
}
.planet-star-flare::after {
    width: 3.5px;
    height: 44px;
}
.main-star-flare {
    top: 16%;
    right: 12%;
    transform: translate(50%, -50%) scale(1.35);
}
.intro-star-flare {
    top: 16%;
    right: 12%;
    transform: translate(50%, -50%) scale(0.95);
}

@keyframes starFlarePulse {
    0% { opacity: 0.82; filter: drop-shadow(0 0 8px #ffffff) brightness(1); }
    100% { opacity: 1; filter: drop-shadow(0 0 18px #c084fc) brightness(1.35); }
}

/* Fasce atmosferiche gassose e correnti equatoriali */
.celestial-planet.main-planet .planet-surface-bands {
    position: absolute;
    inset: -15%;
    background:
        repeating-linear-gradient(
            -20deg,
            transparent 0px,
            transparent 18px,
            rgba(168, 85, 247, 0.18) 22px,
            rgba(99, 102, 241, 0.24) 34px,
            transparent 44px,
            rgba(56, 189, 248, 0.14) 54px,
            transparent 68px
        ),
        radial-gradient(ellipse 65% 22% at 55% 44%, rgba(168, 85, 247, 0.38) 0%, transparent 70%),
        radial-gradient(ellipse 50% 16% at 42% 62%, rgba(99, 102, 241, 0.32) 0%, transparent 70%);
    mix-blend-mode: screen;
    filter: blur(3px);
    opacity: 0.88;
    animation: bandsDrift 32s ease-in-out infinite alternate;
}

@keyframes bandsDrift {
    0% { transform: translateX(-12px) rotate(-2deg) scale(1.04); }
    100% { transform: translateX(14px) rotate(1deg) scale(1.08); }
}

/* Grande tempesta ciclonica luminosa sulla superficie */
.celestial-planet.main-planet .planet-storm-eye {
    position: absolute;
    width: 115px;
    height: 58px;
    top: 38%;
    left: 54%;
    border-radius: 50%;
    background: radial-gradient(ellipse at center,
        #ffffff 0%,
        rgba(192, 132, 252, 0.9) 28%,
        rgba(99, 102, 241, 0.65) 62%,
        transparent 100%);
    transform: rotate(-20deg);
    filter: blur(2px);
    box-shadow: 0 0 28px rgba(168, 85, 247, 0.85);
    mix-blend-mode: screen;
    opacity: 0.85;
}

/* Luci bioluminescenti / Galassia sul lato notturno del pianeta */
.celestial-planet.main-planet .planet-night-lights {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 26% 68%, rgba(168, 85, 247, 0.34) 0%, transparent 25%),
        radial-gradient(circle at 35% 78%, rgba(99, 102, 241, 0.36) 0%, transparent 22%),
        radial-gradient(circle at 18% 54%, rgba(56, 189, 248, 0.25) 0%, transparent 18%);
    filter: blur(8px);
    opacity: 0.8;
}

/* Falce luminosa atmosferica (Limb Glow) + Ombra dell'anello */
.celestial-planet.main-planet .planet-atmosphere-rim {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow:
        inset -12px 12px 24px rgba(255, 255, 255, 0.9),
        inset -24px 26px 50px rgba(168, 85, 247, 0.82),
        inset 75px -70px 110px rgba(2, 1, 10, 0.96);
}

/* Sistema di Doppi Anelli Ellittici Swoosh 3D (come nel logo SpaceWeb: inclinazione -20deg, viola elettrico e blu cosmico) */
.celestial-planet.main-planet .planet-rings-system {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1020px;
    height: 320px;
    margin-left: -510px;
    margin-top: -160px;
    transform: rotate(-20deg);
    pointer-events: none;
}

.celestial-planet.main-planet .planet-rings-system.rings-back {
    z-index: 1;
    clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%);
    opacity: 0.78;
}

.celestial-planet.main-planet .planet-rings-system.rings-front {
    z-index: 3;
    clip-path: polygon(0 50%, 100% 50%, 100% 100%, 0 100%);
    filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.82));
}

.celestial-planet.main-planet .ring-band {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* Anello esterno swoosh viola-indaco (seconda ellisse del logo SpaceWeb) */
.celestial-planet.main-planet .ring-band.ring-outer {
    width: 1010px;
    height: 295px;
    border: 3px solid rgba(168, 85, 247, 0.55);
    border-top: 6px solid rgba(192, 132, 252, 0.82);
    border-bottom: 10px solid rgba(139, 92, 246, 0.92);
    border-left: 14px solid rgba(168, 85, 247, 0.95);
    border-right: 12px solid rgba(99, 102, 241, 0.9);
    box-shadow:
        0 0 42px rgba(168, 85, 247, 0.65),
        inset 0 0 28px rgba(99, 102, 241, 0.45);
}

/* Anello principale swoosh viola-blu brillante (ellisse primaria del logo SpaceWeb) */
.celestial-planet.main-planet .ring-band.ring-main {
    width: 850px;
    height: 242px;
    border: 14px solid rgba(139, 92, 246, 0.32);
    border-top: 10px solid rgba(168, 85, 247, 0.92);
    border-bottom: 18px solid rgba(99, 102, 241, 0.98);
    border-left: 18px solid rgba(192, 132, 252, 0.98);
    border-right: 16px solid rgba(56, 189, 248, 0.92);
    box-shadow:
        0 0 55px rgba(168, 85, 247, 0.78),
        0 0 90px rgba(99, 102, 241, 0.55),
        inset 0 0 35px rgba(192, 132, 252, 0.65);
}

/* Anello interno bianco-ghiaccio luminoso vicino all'atmosfera */
.celestial-planet.main-planet .ring-band.ring-inner {
    width: 710px;
    height: 195px;
    border: 3px solid rgba(255, 255, 255, 0.45);
    border-bottom: 6px solid rgba(255, 255, 255, 0.95);
    border-left: 5px solid rgba(224, 231, 255, 0.9);
    box-shadow: 0 0 28px rgba(255, 255, 255, 0.7);
}

/* Micro-satellite luminoso incastonato nell'anello anteriore */
.celestial-planet.main-planet .ring-orbiting-moon {
    position: absolute;
    bottom: 22px;
    left: 24%;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow:
        0 0 16px 4px #c084fc,
        0 0 32px 8px rgba(99, 102, 241, 0.95);
    animation: ringMoonPulse 3s ease-in-out infinite alternate;
}

@keyframes ringMoonPulse {
    0% { transform: scale(0.9); opacity: 0.85; }
    100% { transform: scale(1.25); opacity: 1; }
}

/* Luna Orbitale con Crateri 3D */
.celestial-planet.moon-planet {
    position: absolute;
    width: 112px;
    height: 112px;
    top: 495px;
    right: 32%;
    border-radius: 50%;
    overflow: hidden;
    background: radial-gradient(circle at 70% 28%,
        #ffffff 0%,
        #7dd3fc 22%,
        #0284c7 48%,
        #1e1b4b 74%,
        #020617 95%);
    box-shadow: 
        inset -22px -20px 36px rgba(0, 0, 0, 0.96),
        inset 6px 6px 14px rgba(255, 255, 255, 0.7),
        0 0 45px rgba(56, 189, 248, 0.55);
    animation: moonFloat 15s ease-in-out infinite alternate;
    will-change: transform;
    z-index: 2;
}

.celestial-planet.moon-planet .moon-craters {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 42% 38%, rgba(15, 23, 42, 0.42) 0%, rgba(255, 255, 255, 0.15) 8%, transparent 11%),
        radial-gradient(circle at 62% 58%, rgba(15, 23, 42, 0.38) 0%, rgba(255, 255, 255, 0.12) 6%, transparent 9%),
        radial-gradient(circle at 30% 64%, rgba(15, 23, 42, 0.45) 0%, transparent 7%);
}

.celestial-planet.distant-planet {
    position: absolute;
    width: 64px;
    height: 64px;
    bottom: 18%;
    left: 7%;
    border-radius: 50%;
    background: radial-gradient(circle at 65% 28%, #fae8ff 0%, #c084fc 32%, #581c87 68%, #030014 95%);
    box-shadow:
        inset -12px -12px 22px rgba(0, 0, 0, 0.94),
        0 0 34px rgba(168, 85, 247, 0.55);
    animation: moonFloat 19s ease-in-out infinite alternate-reverse;
    z-index: 2;
}

@keyframes planetFloat {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-24px) rotate(2.5deg); }
}

@keyframes moonFloat {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(18px) scale(1.05); }
}

/* ==========================================================================
   STILE GLASSIS (ULTRA-FROSTED GLASSMORPHISM)
   ========================================================================== */
.glass-panel, .glass-card {
    background: rgba(11, 11, 30, 0.78) !important;
    backdrop-filter: blur(18px) saturate(165%) !important;
    -webkit-backdrop-filter: blur(18px) saturate(165%) !important;
    border: 1px solid rgba(168, 85, 247, 0.28) !important;
    box-shadow: 0 10px 36px 0 rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
    position: relative;
    z-index: 10;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover, .glass-card:hover {
    border-color: rgba(192, 132, 252, 0.48) !important;
    box-shadow: 0 16px 46px 0 rgba(109, 40, 217, 0.34), inset 0 1px 1px 0 rgba(255, 255, 255, 0.22) !important;
}

.glass-dropdown {
    background: rgba(12, 12, 32, 0.90) !important;
    backdrop-filter: blur(28px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(200%) !important;
    border: 1px solid rgba(168, 85, 247, 0.38) !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.68) !important;
}

/* ==========================================================================
   SLIDER PACCHETTI SITO PUBBLICO & ANIMAZIONI 3D IMMERSIVE
   ========================================================================== */
.packages-viewport {
    position: relative;
    overflow: hidden;
    width: 100%;
    border-radius: 1.75rem;
    padding: 22px 6px 18px;
    margin: -14px 0;
}
.packages-track {
    display: flex;
    width: 200%;
    transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
    align-items: stretch;
}
.packages-panel {
    width: 50%;
    flex-shrink: 0;
    padding: 4px 10px;
}

/* Card Pacchetto con Prospettiva 3D, Spotlight Radiale e Fascio Laser */
.pkg-card {
    --mouse-x: 50%;
    --mouse-y: 0%;
    --tilt-x: 0deg;
    --tilt-y: 0deg;
    position: relative;
    isolation: isolate;
    transform: perspective(1100px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateZ(0);
    transition:
        transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.35s ease,
        box-shadow 0.35s ease;
    will-change: transform, box-shadow;
    overflow: visible !important;
}

/* Spotlight radiale che segue il cursore dentro la card */
.pkg-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
        480px circle at var(--mouse-x, 50%) var(--mouse-y, 0%),
        rgba(0, 210, 255, 0.16),
        rgba(168, 85, 247, 0.12) 38%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 0;
}

/* Bordo luminoso cangiante su hover e sul pacchetto Più Scelto */
.pkg-card::after {
    content: "";
    position: absolute;
    inset: -1.5px;
    border-radius: inherit;
    padding: 1.5px;
    background: linear-gradient(
        135deg,
        rgba(0, 210, 255, 0.85) 0%,
        rgba(168, 85, 247, 0.9) 50%,
        rgba(16, 185, 129, 0.75) 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 1;
}

.pkg-card > * {
    position: relative;
    z-index: 2;
}

.pkg-card:hover {
    transform: translateY(-8px);
    box-shadow:
        0 24px 55px -12px rgba(109, 40, 217, 0.45),
        0 0 35px rgba(0, 210, 255, 0.22),
        inset 0 1px 1px rgba(255, 255, 255, 0.25) !important;
}

.pkg-card:hover::before,
.pkg-card:hover::after {
    opacity: 1;
}

.pkg-card.pkg-popular {
    background: linear-gradient(165deg, rgba(24, 18, 54, 0.88) 0%, rgba(11, 11, 30, 0.85) 100%) !important;
    box-shadow:
        0 20px 50px -10px rgba(168, 85, 247, 0.42),
        0 0 30px rgba(0, 210, 255, 0.18),
        inset 0 1px 1px rgba(255, 255, 255, 0.22) !important;
}

.pkg-card.pkg-popular::after {
    opacity: 0.85;
}

/* Badge coroncina Più Scelto */
.pkg-popular-badge {
    animation: popularBadgePulse 3s ease-in-out infinite;
    z-index: 5 !important;
}
@keyframes popularBadgePulse {
    0%, 100% { transform: translate(-50%, 0) scale(1); box-shadow: 0 0 18px rgba(168, 85, 247, 0.65); }
    50% { transform: translate(-50%, -2px) scale(1.05); box-shadow: 0 0 28px rgba(0, 210, 255, 0.85); }
}

/* Prezzo con bagliore dinamico */
.pkg-price {
    background: linear-gradient(90deg, #ffffff 0%, #e0f2fe 50%, #f3e8ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: transform 0.3s ease, filter 0.3s ease;
    display: inline-block;
}
.pkg-card:hover .pkg-price {
    transform: scale(1.04);
    filter: drop-shadow(0 0 14px rgba(0, 210, 255, 0.45));
}

/* Singole voci della lista feature animate */
.pkg-feature-item {
    padding: 5px 8px;
    margin: 0 -8px;
    border-radius: 10px;
    transition: background-color 0.22s ease, transform 0.22s ease, color 0.22s ease;
}
.pkg-feature-item:hover {
    background: rgba(168, 85, 247, 0.13);
    transform: translateX(5px);
    color: #ffffff;
}
.pkg-feature-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(168, 85, 247, 0.16);
    border: 1px solid rgba(168, 85, 247, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}
.pkg-card:hover .pkg-feature-icon {
    background: rgba(0, 210, 255, 0.2);
    border-color: rgba(0, 210, 255, 0.65);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.4);
}
.pkg-feature-item:hover .pkg-feature-icon {
    transform: scale(1.18) rotate(8deg);
}

/* Bottone CTA dentro i pacchetti */
.pkg-cta-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.pkg-cta-btn .pkg-cta-arrow {
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.pkg-card:hover .pkg-cta-btn .pkg-cta-arrow {
    transform: translateX(5px);
}

/* Animazione Staggered quando si cambia tab Web <-> Social */
@keyframes pkgCardStageIn {
    0% {
        opacity: 0;
        transform: perspective(1100px) translateY(26px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: perspective(1100px) translateY(0) scale(1);
    }
}
.pkg-card-animate {
    animation: pkgCardStageIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.pkg-card:nth-child(1) { animation-delay: 0.04s; }
.pkg-card:nth-child(2) { animation-delay: 0.14s; }
.pkg-card:nth-child(3) { animation-delay: 0.24s; }
.delivery-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.delivery-badge-green { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.4); color: #34d399; }
.delivery-badge-purple { background: rgba(168, 85, 247, 0.18); border: 1px solid rgba(168, 85, 247, 0.4); color: #c084fc; }
.delivery-badge-cyan { background: rgba(6, 182, 212, 0.18); border: 1px solid rgba(6, 182, 212, 0.4); color: #22d3ee; }
.delivery-badge-pink { background: rgba(236, 72, 153, 0.18); border: 1px solid rgba(236, 72, 153, 0.4); color: #f472b6; }

/* ==========================================================================
   DASHBOARD ARCHITECTURE (ADMIN, PROGRAMMATORI, TELEFONISTI)
   ========================================================================== */
.dashboard-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
    position: relative;
    z-index: 10;
}

/* Sidebar a comparsa */
.sidebar {
    width: 265px;
    background: linear-gradient(180deg, rgba(16, 16, 36, 0.96) 0%, rgba(11, 11, 24, 0.98) 100%);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    padding: 22px 16px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(168, 85, 247, 0.22);
    box-shadow: 6px 0 32px rgba(0, 0, 0, 0.45);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s ease;
    z-index: 30;
}

.sidebar.collapsed {
    width: 75px;
    padding: 20px 10px;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 0 4px;
}

.sidebar-header h2 {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, #ffffff 0%, #00d2ff 65%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar.collapsed .sidebar-header h2,
.sidebar.collapsed .user-role,
.sidebar.collapsed .nav-links span.text {
    display: none;
}

.toggle-btn {
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.28);
    color: #00d2ff;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 5px 9px;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.toggle-btn:hover {
    background: rgba(0, 210, 255, 0.18);
    border-color: #00d2ff;
}

.user-role {
    font-size: 0.8rem;
    font-weight: 600;
    color: #cbd5e1;
    background: rgba(25, 25, 50, 0.85);
    border: 1px solid rgba(168, 85, 247, 0.25);
    padding: 8px 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-links {
    list-style: none;
    overflow-y: auto;
    flex: 1;
}

.nav-links li {
    padding: 10px 12px;
    margin-bottom: 6px;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links li a {
    color: #b0b0d0;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 14px;
    white-space: nowrap;
    font-size: 0.9rem;
}

.nav-icon {
    color: #a855f7;
    flex-shrink: 0;
    transition: transform 0.2s ease, color 0.2s ease;
}

.nav-links li:hover {
    background: rgba(168, 85, 247, 0.12);
    border-color: rgba(168, 85, 247, 0.25);
    transform: translateX(2px);
}

.nav-links li.active {
    background: linear-gradient(90deg, rgba(0, 210, 255, 0.16) 0%, rgba(168, 85, 247, 0.14) 100%);
    border-color: rgba(0, 210, 255, 0.45);
    box-shadow: 0 4px 16px rgba(0, 210, 255, 0.12);
}

.nav-links li.active a {
    color: #00d2ff;
    font-weight: 700;
}

.nav-links li.active .nav-icon {
    color: #00d2ff;
    transform: scale(1.06);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 28px 32px;
    overflow-y: auto;
    background: radial-gradient(circle at top right, rgba(168, 85, 247, 0.08), transparent 45%), rgba(9, 9, 20, 0.84);
}

.view-section {
    display: none;
    animation: fadeSlideUp 0.25s ease;
}

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.view-section.active {
    display: block;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px 22px;
    background: rgba(18, 18, 38, 0.78);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(168, 85, 247, 0.24);
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
    flex-wrap: wrap;
    gap: 12px;
}

.top-bar h1 {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, #ffffff 0%, #c4b5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.operator-badge {
    background: rgba(15, 15, 34, 0.9);
    padding: 8px 14px;
    border-radius: 9999px;
    border: 1px solid rgba(0, 210, 255, 0.32);
    box-shadow: 0 4px 14px rgba(0, 210, 255, 0.1);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.status-pill-select {
    background: #181834;
    color: #00d2ff;
    border: 1px solid rgba(168, 85, 247, 0.45);
    border-radius: 9999px;
    padding: 4px 10px;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.status-pill-select:hover, .status-pill-select:focus {
    border-color: #00d2ff;
    box-shadow: 0 0 0 2px rgba(0, 210, 255, 0.18);
}

.section-card {
    background: linear-gradient(160deg, rgba(20, 20, 42, 0.92) 0%, rgba(14, 14, 30, 0.95) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(168, 85, 247, 0.22);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    margin-bottom: 24px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.section-card:hover {
    border-color: rgba(0, 210, 255, 0.32);
}

.card-header-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.section-card h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
}

.section-desc {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 14px;
    line-height: 1.45;
}

/* Form Nascosto Nuovo Utente */
.hidden-form {
    display: none;
    background: #181830;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #2d2d59;
    margin-bottom: 20px;
}

.hidden-form.show {
    display: block;
}

.hidden-form h3 {
    margin-bottom: 15px;
    color: #00d2ff;
    font-size: 1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: #b0b0d0;
    margin-bottom: 6px;
    font-weight: 600;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    background: #181830;
    border: 1px solid #2d2d59;
    padding: 10px 14px;
    border-radius: 6px;
    color: #fff;
    outline: none;
    font-size: 0.9rem;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: #00d2ff;
}

/* Tables */
.orders-table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid rgba(168, 85, 247, 0.18);
    background: rgba(14, 14, 30, 0.65);
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.88rem;
}

.orders-table th {
    background: linear-gradient(180deg, #1b1b38 0%, #15152c 100%);
    color: #00d2ff;
    padding: 13px 16px;
    border-bottom: 1px solid rgba(0, 210, 255, 0.25);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.orders-table td {
    padding: 13px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
    vertical-align: middle;
}

.orders-table tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.015);
}

.orders-table tbody tr:hover {
    background-color: rgba(0, 210, 255, 0.06);
}

.badge-status {
    padding: 4px 11px;
    border-radius: 9999px;
    font-size: 0.74rem;
    font-weight: 700;
    display: inline-block;
    letter-spacing: 0.02em;
}

.badge-status.attesa { background: #f59e0b; color: #000; }
.badge-status.lavorazione { background: #3b82f6; color: #fff; }
.badge-status.venduto { background: #10b981; color: #fff; }
.badge-status.annullato { background: #ef4444; color: #fff; }

/* Statistiche & Financials */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 25px;
}

.stat-box {
    background: linear-gradient(145deg, rgba(22, 22, 46, 0.92) 0%, rgba(14, 14, 30, 0.96) 100%);
    border: 1px solid rgba(168, 85, 247, 0.22);
    border-top: 3px solid #a855f7;
    padding: 20px;
    border-radius: 14px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.stat-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 210, 255, 0.14);
}

.stat-box.highlight {
    border-color: rgba(16, 185, 129, 0.45);
    border-top: 3px solid #10b981;
}

.stat-box h3 {
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-value {
    font-size: 1.7rem;
    font-weight: 800;
    color: #00d2ff;
    margin-bottom: 4px;
}

.stat-sub {
    font-size: 0.75rem;
    color: #a0a0c0;
}

/* Pacchetti Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.project-card {
    background: #181830;
    border: 1px solid #25254a;
    border-radius: 8px;
    padding: 18px;
    transition: transform 0.2s, border-color 0.2s;
}

.project-card:hover {
    transform: translateY(-3px);
    border-color: #00d2ff;
}

.project-card h3, .project-card h4 {
    color: #00d2ff;
    margin-bottom: 6px;
}

/* Chat */
.chat-section-card {
    display: flex;
    flex-direction: column;
    height: 70vh;
}

.chat-messages-box {
    flex: 1;
    background: #181830;
    border-radius: 8px;
    padding: 15px;
    overflow-y: auto;
    margin-bottom: 15px;
    border: 1px solid #25254a;
}

.chat-input-area {
    display: flex;
    gap: 10px;
}

.chat-input-area input {
    flex: 1;
    background: #181830;
    border: 1px solid #2d2d59;
    padding: 10px 15px;
    border-radius: 8px;
    color: #fff;
    outline: none;
}

/* Account Card Form */
.form-card {
    max-width: 600px;
    margin: 0 auto;
}

.tab-btn {
    background: rgba(27, 27, 54, 0.9);
    border: 1px solid rgba(168, 85, 247, 0.28);
    color: #cbd5e1;
    padding: 8px 16px;
    border-radius: 9999px;
    cursor: pointer;
    font-size: 0.83rem;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tab-btn:hover {
    color: #ffffff;
    border-color: #00d2ff;
    background: rgba(0, 210, 255, 0.12);
    transform: translateY(-1px);
}

.tab-btn.active {
    background: linear-gradient(90deg, #00d2ff 0%, #3b82f6 100%);
    color: #04101f;
    font-weight: 700;
    border-color: #00d2ff;
    box-shadow: 0 4px 16px rgba(0, 210, 255, 0.28);
}

.contact-card {
    background: linear-gradient(155deg, rgba(24, 24, 48, 0.95) 0%, rgba(16, 16, 34, 0.95) 100%);
    border: 1px solid rgba(168, 85, 247, 0.22);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.contact-card:hover {
    border-color: rgba(0, 210, 255, 0.4);
    transform: translateY(-1px);
}

.btn-submit {
    padding: 10px 20px;
    margin-top: 10px;
    font-weight: 700;
    width: 100%;
}

.filter-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.action-dropdown {
    background-color: #1a1a38;
    color: #00d2ff;
    border: 1px solid #3b82f6;
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    font-size: 0.8rem;
}

/* Developer & Telefonisti Grid & Tasks */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-weight: 700;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
}

.calendar-header button {
    background: #1b1b36;
    border: 1px solid rgba(0, 210, 255, 0.35);
    color: #00d2ff;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s ease;
}
.calendar-header button:hover {
    background: #00d2ff;
    color: #000;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.calendar-day-header {
    text-align: center;
    font-size: 0.72rem;
    color: #a855f7;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 6px 0;
}

/* Celle Calendario Classico Interattivo */
.calendar-cell {
    background: rgba(20, 20, 42, 0.85);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 10px;
    min-height: 68px;
    padding: 6px 5px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    font-size: 0.82rem;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.18s ease;
    position: relative;
    overflow: hidden;
}

.calendar-cell:hover:not(.empty) {
    border-color: #00d2ff;
    background: rgba(0, 210, 255, 0.08);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 210, 255, 0.15);
}

.calendar-cell.empty {
    background: rgba(12, 12, 24, 0.35);
    border-color: rgba(255, 255, 255, 0.03);
    cursor: default;
}

.calendar-cell.today {
    border-color: #a855f7;
    box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.4);
}

.calendar-cell.selected {
    background: linear-gradient(155deg, rgba(0, 210, 255, 0.22) 0%, rgba(168, 85, 247, 0.18) 100%);
    border: 2px solid #00d2ff;
    color: #ffffff;
    box-shadow: 0 0 18px rgba(0, 210, 255, 0.25);
}

.cal-day-num {
    font-weight: 700;
    font-size: 0.82rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
}

.cal-day-count {
    font-size: 0.62rem;
    font-weight: 800;
    background: rgba(0, 210, 255, 0.2);
    color: #00d2ff;
    padding: 1px 5px;
    border-radius: 9999px;
}

.cal-events-mini {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
}

.cal-mini-pill {
    font-size: 0.62rem;
    font-weight: 600;
    line-height: 1.25;
    padding: 2px 4px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: rgba(0, 210, 255, 0.18);
    color: #7dd3fc;
    border-left: 2px solid #00d2ff;
}
.cal-mini-pill.deadline {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border-left-color: #ef4444;
}
.cal-mini-pill.meeting {
    background: rgba(168, 85, 247, 0.22);
    color: #d8b4fe;
    border-left-color: #a855f7;
}
.cal-mini-pill.done {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border-left-color: #10b981;
}

.calendar-day {
    background: #181830;
    border: 1px solid #25254a;
    border-radius: 6px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: #d0d0e0;
}

.calendar-day.active-day {
    background: rgba(0, 210, 255, 0.2);
    border-color: #00d2ff;
    color: #00d2ff;
    font-weight: bold;
}

.task-input-box {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.task-input-box input {
    flex: 1;
    background: #181830;
    border: 1px solid #2d2d59;
    padding: 8px 12px;
    border-radius: 6px;
    color: #fff;
    outline: none;
}

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
}

.task-item {
    background: #181830;
    border: 1px solid #25254a;
    border-radius: 6px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.snippets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.snippet-card {
    background: #181830;
    border: 1px solid #25254a;
    border-radius: 8px;
    padding: 15px;
}

.snippet-card pre {
    background: #0d0d1a;
    padding: 10px;
    border-radius: 6px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    color: #00d2ff;
}

.chart-box canvas {
    max-height: 280px;
    width: 100%;
}

.shared-calendar-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* WhatsApp-Style Multi-Channel Chat */
.chat-channel-item {
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 6px;
    cursor: pointer;
    color: #b0b0d0;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s, color 0.2s;
}
.chat-channel-item:hover {
    background: #1a1a38;
    color: #fff;
}
.chat-channel-item.active {
    background: #25254a;
    color: #00d2ff;
    font-weight: 600;
    border-left: 3px solid #00d2ff;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #0b0b16;
}
::-webkit-scrollbar-thumb {
    background: #1f1f38;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #00d2ff;
}

/* Responsive Rules for Cosmic Planet */
@media (max-width: 768px) {
    .celestial-planet.main-planet {
        width: 340px;
        height: 340px;
        top: 20px;
        right: -30px;
    }
    .celestial-planet.main-planet .planet-ring {
        width: 500px;
        height: 150px;
        margin-left: -250px;
        margin-top: -75px;
    }
    .celestial-planet.moon-planet {
        display: none;
    }
}

/* ==========================================================================
   BROWSER WINDOW MOCKUP PORTFOLIO CARDS (STILE SCREENSHOT UTENTE)
   Solo la testa è colorata in base alla categoria.
   ========================================================================== */
.browser-card {
    background: rgba(12, 16, 29, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    text-align: left;
}
.browser-card:hover {
    transform: translateY(-4px);
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
}

/* Browser Frame Header: SOLO LA TESTA È COLORATA */
.browser-topbar {
    height: 38px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.browser-topbar.cat-base { background: #00d2ff; }
.browser-topbar.cat-pro { background: #2563eb; }
.browser-topbar.cat-ecommerce { background: #16a34a; }
.browser-topbar.cat-enterprise { background: #ea580c; }
.browser-topbar.cat-custom { background: #db2777; }

/* 3 Round Dots */
.browser-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}
.browser-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
}

/* Category Badge in Top Bar */
.browser-badge {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.85);
    background: rgba(255, 255, 255, 0.25);
    padding: 2px 8px;
    border-radius: 9999px;
}

/* Browser Viewport Preview Area */
.browser-viewport {
    height: 135px;
    background: #090c16;
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.browser-viewport img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.browser-viewport-screen {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
}
.wireframe-bar-long {
    height: 8px;
    width: 70%;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
}
.wireframe-bar-short {
    height: 8px;
    width: 45%;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
}
.wireframe-grid {
    display: flex;
    gap: 8px;
    margin-top: auto;
}
.wireframe-box {
    flex: 1;
    height: 32px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

/* Card Content Body */
.browser-card-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.browser-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 3px;
}
.browser-card-sub {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8b8bb5;
    margin-bottom: 12px;
}
.browser-card-desc {
    font-size: 0.82rem;
    color: #94a3b8;
    line-height: 1.5;
    margin-bottom: 16px;
}
.browser-card-link {
    margin-top: auto;
    font-size: 0.8rem;
    font-weight: 600;
    color: #00d2ff;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: color 0.2s ease;
}
.browser-card-link:hover {
    color: #a855f7;
}

/* ==========================================================================
   ADMIN PACKAGES POLISHED MODERN UI
   ========================================================================== */
.admin-pkg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 15px;
}
.admin-pkg-card {
    background: linear-gradient(145deg, rgba(24, 24, 48, 0.9) 0%, rgba(14, 14, 28, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}
.admin-pkg-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 210, 255, 0.4);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.5);
}
.admin-pkg-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00d2ff, #a855f7);
    opacity: 0.8;
}
.admin-pkg-card.is-popular {
    border-color: rgba(168, 85, 247, 0.45);
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.15);
}
.admin-pkg-card.is-popular::before {
    background: linear-gradient(90deg, #a855f7, #ec4899);
    height: 4px;
    opacity: 1;
}

/* Chat Action Buttons (Edit / Delete) */
.msg-action-btn {
    background: transparent;
    border: none;
    color: #8b8bb5;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 2px 5px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}
.msg-action-btn:hover {
    color: #00d2ff;
    background: rgba(255, 255, 255, 0.08);
}
.msg-action-btn.del:hover {
    color: #ef4444;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS (SMARTPHONE & TABLET)
   ========================================================================== */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }
    .charts-grid {
        grid-template-columns: 1fr !important;
    }
    .card-header-action {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .orders-table-wrapper {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .orders-table th, .orders-table td {
        padding: 8px 10px;
        font-size: 0.75rem;
        white-space: nowrap;
    }
    .chat-sidebar {
        width: 100% !important;
        max-height: 180px;
    }
    .chat-main {
        min-height: 380px;
    }
    .admin-pkg-grid {
        grid-template-columns: 1fr !important;
    }
    .calendar-cell {
        min-height: 48px;
        padding: 4px 3px;
        border-radius: 8px;
    }
    .cal-mini-pill {
        font-size: 0.56rem;
        padding: 1px 3px;
    }
}

/* ==========================================================================
   INTERATTIVITÀ AVANZATA SITO WEB PUBBLICO (STESSI COLORI COSMICI)
   ========================================================================== */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #a855f7 0%, #00d2ff 50%, #10b981 100%);
    z-index: 120;
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.75);
    transition: width 0.1s linear;
}

.mouse-spotlight {
    position: fixed;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.13) 0%, rgba(0, 210, 255, 0.06) 40%, transparent 72%);
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    opacity: 0;
}

.interactive-card {
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.28s ease, box-shadow 0.28s ease;
    will-change: transform;
}
.interactive-card:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(0, 210, 255, 0.55) !important;
    box-shadow: 0 18px 40px rgba(0, 210, 255, 0.16), 0 0 24px rgba(168, 85, 247, 0.2) !important;
}

.cta-shimmer {
    position: relative;
    overflow: hidden;
}
.cta-shimmer::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -75%;
    width: 50%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
    transform: rotate(24deg);
    animation: ctaSweep 4.5s infinite ease-in-out;
}
@keyframes ctaSweep {
    0%, 55% { left: -75%; }
    100% { left: 140%; }
}

.tech-chip.active {
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.18), rgba(168, 85, 247, 0.22)) !important;
    border-color: #00d2ff !important;
    color: #ffffff !important;
    box-shadow: 0 0 18px rgba(0, 210, 255, 0.25);
}

.reveal-section {
    opacity: 1;
    transform: none;
}
.reveal-section.revealed {
    opacity: 1;
    transform: none;
}

/* Hero Badge & Titolo con Shimmer Cosmico */
.hero-cosmic-title-accent {
    background: linear-gradient(90deg, #c084fc 0%, #00d2ff 45%, #34d399 75%, #c084fc 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: heroGradientFlow 6s linear infinite;
}
@keyframes heroGradientFlow {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.hero-trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.85rem;
    border-radius: 9999px;
    background: rgba(15, 15, 38, 0.72);
    border: 1px solid rgba(168, 85, 247, 0.3);
    font-size: 0.72rem;
    font-weight: 600;
    color: #e2e8f0;
    backdrop-filter: blur(12px);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.hero-trust-pill:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 210, 255, 0.6);
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.18);
}

/* ==========================================================================
   OTTIMIZZAZIONE RESPONSIVE MULTIDISPOSITIVO: PC, TABLET E TELEFONO
   ========================================================================== */

/* Pannello Pacchetti Inattivo: collassa l'altezza per evitare spazi vuoti su mobile */
.packages-panel.panel-inactive {
    height: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    opacity: 0;
    pointer-events: none;
}

/* Tablet (641px - 1024px) */
@media (max-width: 1024px) {
    .celestial-planet.main-planet {
        top: -20px;
        right: -95px;
        transform-origin: top right;
        animation: planetFloatTablet 22s ease-in-out infinite alternate;
    }
    @keyframes planetFloatTablet {
        0% { transform: scale(0.72) translateY(0) rotate(0deg); }
        100% { transform: scale(0.72) translateY(-20px) rotate(2deg); }
    }
    .celestial-planet.moon-planet {
        width: 82px;
        height: 82px;
        top: 390px;
        right: 16%;
    }
    .packages-viewport {
        padding: 18px 4px 16px;
    }
    .packages-panel {
        padding: 4px 6px;
    }
}

/* Smartphone (<= 640px) - Adattamento Completo Su Misura per Telefoni */
@media (max-width: 640px) {
    html, body {
        overflow-x: hidden;
        width: 100%;
    }

    /* Pianeta 3D scalato proporzionalmente con tutti gli anelli 3D ben visibili sul telefono */
    .celestial-planet.main-planet {
        top: 18px;
        right: -135px;
        transform-origin: top right;
        animation: planetFloatMobile 18s ease-in-out infinite alternate;
        opacity: 0.92;
    }
    @keyframes planetFloatMobile {
        0% { transform: scale(0.46) translateY(0) rotate(0deg); }
        100% { transform: scale(0.46) translateY(-18px) rotate(2deg); }
    }

    .celestial-planet.moon-planet {
        width: 54px;
        height: 54px;
        top: 310px;
        left: 7%;
        right: auto;
        opacity: 0.85;
    }

    .celestial-planet.distant-planet {
        width: 38px;
        height: 38px;
        bottom: 14%;
        right: 6%;
        left: auto;
        opacity: 0.75;
    }

    .nebula-purple {
        width: 340px;
        height: 340px;
        top: -60px;
        right: -70px;
    }
    .nebula-cyan {
        width: 300px;
        height: 300px;
        left: -80px;
    }

    /* Tipografia e spaziature Hero su telefono */
    .hero-main-heading {
        font-size: clamp(1.75rem, 7.5vw, 2.35rem) !important;
        line-height: 1.18 !important;
    }
    .hero-trust-pill {
        font-size: 0.65rem;
        padding: 0.32rem 0.68rem;
        gap: 0.35rem;
    }

    /* Sezioni più compatte e armoniose su schermo verticale */
    #chisiamo, #portfolio, #pacchetti, #contatti, #supporto {
        padding-top: 2.75rem !important;
        padding-bottom: 2.75rem !important;
        padding-left: 0.875rem !important;
        padding-right: 0.875rem !important;
    }

    #chisiamo h2, #portfolio h2, #pacchetti h2, #contatti h2, #supporto h2 {
        font-size: 1.55rem !important;
        line-height: 1.25 !important;
    }

    /* Barra filtri Portfolio scorrevole orizzontalmente con tocco fluido su telefono */
    #portfolio .flex.flex-wrap.gap-2 {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        padding-bottom: 6px;
        margin-left: -4px;
        padding-left: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    #portfolio .flex.flex-wrap.gap-2::-webkit-scrollbar {
        display: none;
    }
    .port-filter-btn {
        flex-shrink: 0;
        white-space: nowrap;
        padding: 0.45rem 0.85rem !important;
        font-size: 0.72rem !important;
    }

    /* Card Portfolio su telefono */
    .browser-viewport {
        height: 155px;
    }
    .browser-card-body {
        padding: 16px 16px 18px;
    }

    /* Slider Pacchetti e Card su telefono */
    .packages-viewport {
        padding: 16px 0 10px;
        margin: -6px 0;
        border-radius: 1.25rem;
    }
    .packages-panel {
        padding: 2px 4px !important;
    }
    #webPackagesContainer, #socialPackagesContainer {
        gap: 1.25rem !important;
    }
    .pkg-card {
        padding: 1.35rem 1.2rem !important;
        border-radius: 1.35rem !important;
        transform: none !important;
    }
    .pkg-card:hover {
        transform: translateY(-3px) !important;
    }
    .pkg-price {
        font-size: 1.85rem !important;
    }

    /* Moduli Contatti, Call, Lavora con Noi e Supporto ottimizzati per telefono */
    #contatti .glass-panel,
    #supporto .glass-panel,
    #chisiamo .glass-panel {
        padding: 1.25rem !important;
        border-radius: 1.25rem !important;
    }

    /* Input con font-size 16px su mobile per evitare lo zoom automatico fastidioso di iOS Safari */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="url"],
    input[type="password"],
    input[type="date"],
    select,
    textarea {
        font-size: 16px !important;
    }

    /* Bottone Torna Su più compatto su mobile */
    #scrollTopBtn {
        bottom: 1rem;
        right: 1rem;
        width: 2.5rem;
        height: 2.5rem;
    }
}

/* Telefoni molto compatti (<= 380px) */
@media (max-width: 380px) {
    .celestial-planet.main-planet {
        right: -160px;
    }
    .hero-main-heading {
        font-size: 1.6rem !important;
    }
    #home .grid-cols-3 {
        gap: 0.4rem !important;
    }
    #home .grid-cols-3 .glass-panel {
        padding: 0.55rem 0.35rem !important;
    }
}

/* ==========================================================================
   ANIMAZIONE INTRO 3D CINEMATOGRAFICA & PROFONDITÀ 3D STILE TIKTOK SHOWREEL
   ========================================================================== */
.cosmic-intro-stage {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background:
        radial-gradient(ellipse 80% 60% at 50% 45%, rgba(109, 40, 217, 0.28) 0%, rgba(7, 7, 20, 0.96) 65%, #04040e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    perspective: 1400px;
    transition: background-color 0.85s ease, backdrop-filter 0.85s ease, opacity 0.75s ease;
}

.cosmic-intro-stage.intro-transparent-bg {
    background: rgba(7, 7, 20, 0.0) !important;
    pointer-events: none;
}

.cosmic-intro-stage.intro-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    display: none;
}

.intro-fluid-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.intro-skip-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 20;
    padding: 0.45rem 0.95rem;
    border-radius: 9999px;
    background: rgba(15, 15, 38, 0.75);
    border: 1px solid rgba(0, 210, 255, 0.4);
    color: #e2e8f0;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    backdrop-filter: blur(12px);
    cursor: pointer;
    transition: all 0.25s ease;
}
.intro-skip-btn:hover {
    background: rgba(168, 85, 247, 0.35);
    border-color: #00d2ff;
    color: #ffffff;
    transform: scale(1.05);
}

.intro-3d-centerpiece {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 920px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    padding: 1.5rem;
}

.intro-text-block {
    position: absolute;
    text-align: center;
    padding: 0 1rem;
    pointer-events: none;
    transform-style: preserve-3d;
    transition:
        opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        filter 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.intro-eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #00d2ff;
    margin-bottom: 0.75rem;
    text-shadow: 0 0 18px rgba(0, 210, 255, 0.75);
}

.intro-headline-3d {
    font-size: clamp(2rem, 6vw, 4.25rem);
    font-weight: 900;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: #ffffff;
    text-shadow:
        0 4px 0 rgba(109, 40, 217, 0.6),
        0 10px 30px rgba(0, 210, 255, 0.45),
        0 0 60px rgba(168, 85, 247, 0.55);
}

.intro-fluid-gradient {
    background: linear-gradient(90deg, #00d2ff 0%, #c084fc 45%, #34d399 80%, #00d2ff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: heroGradientFlow 3.5s linear infinite;
}

/* Stati Fase 1 ("La tua idea, il tuo sito. Qui e ora.") */
.intro-text-block.phase-1 {
    opacity: 0;
    transform: perspective(1000px) translateZ(-140px) rotateX(22deg) scale(0.88);
    filter: blur(12px);
}
.intro-text-block.phase-1.active {
    opacity: 1;
    transform: perspective(1000px) translateZ(40px) rotateX(0deg) scale(1);
    filter: blur(0px);
}
/* Scioglimento nel fluido che diventa l'ellisse */
.intro-text-block.phase-1.morph-to-fluid {
    opacity: 0;
    transform: perspective(1000px) rotateZ(-18deg) scaleX(1.55) scaleY(0.18) translateZ(80px);
    filter: blur(16px) brightness(2);
}

/* Stati Fase 3 ("SpaceWeb, qui per te.") */
.intro-text-block.phase-3 {
    opacity: 0;
    margin-top: 250px;
    transform: perspective(1000px) translateY(35px) translateZ(-80px) rotateX(18deg) scale(0.9);
    filter: blur(10px);
}
.intro-text-block.phase-3.active {
    opacity: 1;
    transform: perspective(1000px) translateY(0) translateZ(50px) rotateX(0deg) scale(1);
    filter: blur(0px);
}
.intro-text-block.phase-3.fade-out {
    opacity: 0;
    transform: perspective(1000px) translateY(-20px) scale(1.06);
    filter: blur(8px);
}

/* Contenitore di volo del Pianeta 3D dall'Intro alla posizione reale nel sito */
.intro-planet-flight-box {
    position: absolute;
    width: 240px;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    opacity: 0;
    transform: scale(0.35) rotateY(-35deg);
    transition:
        opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
        transform 1.05s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform, opacity;
}

.intro-planet-flight-box.forming {
    opacity: 1;
    transform: translate3d(0, -30px, 0) scale(1) rotateY(0deg);
}

.intro-planet-flight-box.flying-to-hero {
    opacity: 1;
    transform: translate3d(var(--fly-x, 320px), var(--fly-y, -140px), 0) scale(var(--fly-scale, 1.8));
}

.intro-3d-planet-core {
    position: relative;
    width: 210px;
    height: 210px;
    transform-style: preserve-3d;
}

.intro-planet-halo {
    position: absolute;
    inset: -35px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.58) 0%, rgba(99, 102, 241, 0.44) 45%, transparent 72%);
    filter: blur(22px);
    animation: coronaPulse 3s ease-in-out infinite alternate;
}

.intro-planet-sphere {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    overflow: hidden;
    z-index: 2;
    background:
        radial-gradient(circle at 72% 24%,
            #e0e7ff 0%,
            #a855f7 15%,
            #6366f1 32%,
            #3b0764 54%,
            #140736 76%,
            #050214 95%);
    box-shadow:
        inset -36px -32px 65px rgba(2, 1, 12, 0.96),
        inset 14px 14px 30px rgba(168, 85, 247, 0.85),
        0 0 50px rgba(168, 85, 247, 0.6),
        0 0 95px rgba(99, 102, 241, 0.52);
}

/* Sistema di Anelli Ellittici Fluidi dell'Intro (Stile Doppia Ellisse Viola-Blu del Logo SpaceWeb) */
.intro-ellipse-system {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 420px;
    height: 138px;
    margin-left: -210px;
    margin-top: -69px;
    transform: rotate(-20deg);
    pointer-events: none;
}

.intro-ellipse-system.ellipse-back {
    z-index: 1;
    clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%);
    opacity: 0.8;
}

.intro-ellipse-system.ellipse-front {
    z-index: 3;
    clip-path: polygon(0 50%, 100% 50%, 100% 100%, 0 100%);
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.85));
}

.intro-fluid-ellipse {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.intro-fluid-ellipse.main {
    width: 370px;
    height: 110px;
    border: 7px solid rgba(139, 92, 246, 0.32);
    border-top: 6px solid rgba(168, 85, 247, 0.92);
    border-bottom: 11px solid rgba(99, 102, 241, 0.98);
    border-left: 10px solid rgba(192, 132, 252, 0.98);
    border-right: 9px solid rgba(56, 189, 248, 0.92);
    box-shadow:
        0 0 38px rgba(168, 85, 247, 0.88),
        inset 0 0 24px rgba(99, 102, 241, 0.75);
}

.intro-fluid-ellipse.outer {
    width: 420px;
    height: 132px;
    border: 2px solid rgba(168, 85, 247, 0.58);
    border-bottom: 5px solid rgba(192, 132, 252, 0.95);
    border-left: 7px solid rgba(168, 85, 247, 0.92);
    border-right: 6px solid rgba(99, 102, 241, 0.88);
    box-shadow: 0 0 28px rgba(168, 85, 247, 0.72);
}

.intro-ellipse-comet {
    position: absolute;
    bottom: 6px;
    left: 28%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow:
        0 0 16px 5px #c084fc,
        0 0 32px 10px #6366f1;
}

/* ==========================================================================
   COMPARSA DELLE SCRITTE DEL SITO QUANDO IL PIANETA SI METTE A POSTO
   (Senza preserve-3d o transform persistenti su header/sezioni per evitare qualsiasi lampeggiamento al click)
   ========================================================================== */
body.intro-active header,
body.intro-active #siteMobileBottomDock,
body.intro-active .hero-reveal-item,
body.intro-active main > section:not(#home) {
    opacity: 0 !important;
    pointer-events: none !important;
}

body.intro-active .hero-reveal-item {
    transform: translateY(24px);
}

body.intro-revealing header,
body.intro-revealing #siteMobileBottomDock,
body.intro-revealing .hero-reveal-item,
body.intro-revealing main > section:not(#home) {
    transition:
        opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 1;
    transform: none;
}

body.intro-revealing .hero-reveal-item.reveal-step-1 { transition-delay: 0.04s; }
body.intro-revealing .hero-reveal-item.reveal-step-2 { transition-delay: 0.12s; }
body.intro-revealing .hero-reveal-item.reveal-step-3 { transition-delay: 0.20s; }
body.intro-revealing .hero-reveal-item.reveal-step-4 { transition-delay: 0.28s; }
body.intro-revealing .hero-reveal-item.reveal-step-5 { transition-delay: 0.36s; }

/* ==========================================================================
   PROFONDITÀ 3D SULLE CARD (SENZA CONFLITTI GPU BACKDROP-FILTER)
   ========================================================================== */
.glass-panel.interactive-card,
.browser-card,
.pkg-card {
    box-shadow:
        0 8px 0 -2px rgba(49, 46, 129, 0.42),
        0 18px 38px -6px rgba(0, 0, 0, 0.65),
        0 0 24px rgba(139, 92, 246, 0.14),
        inset 0 1px 1px rgba(255, 255, 255, 0.22) !important;
}

.glass-panel.interactive-card:hover,
.browser-card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 12px 0 -2px rgba(0, 210, 255, 0.35),
        0 24px 48px -8px rgba(109, 40, 217, 0.5),
        0 0 32px rgba(0, 210, 255, 0.25),
        inset 0 1px 2px rgba(255, 255, 255, 0.32) !important;
}

/* Titolo Hero con rilievo 3D */
.hero-main-heading {
    text-shadow:
        0 4px 18px rgba(0, 0, 0, 0.65),
        0 0 38px rgba(139, 92, 246, 0.28);
}

/* Adattamento Intro 3D su Telefono */
@media (max-width: 640px) {
    .intro-planet-flight-box {
        width: 180px;
        height: 180px;
    }
    .intro-3d-planet-core {
        width: 155px;
        height: 155px;
    }
    .intro-ellipse-system {
        width: 300px;
        height: 100px;
        margin-left: -150px;
        margin-top: -50px;
    }
    .intro-fluid-ellipse.main {
        width: 265px;
        height: 82px;
        border-width: 5px;
    }
    .intro-fluid-ellipse.outer {
        width: 300px;
        height: 98px;
    }
    .intro-text-block.phase-3 {
        margin-top: 195px;
    }
    .intro-headline-3d {
        font-size: clamp(1.65rem, 7.5vw, 2.4rem);
    }
}

/* ==========================================================================
   MAPPA ATTIVITÀ ATTIVE & NOTE PRIVATE GESTIONALE (TELEFONISTI & ADMIN)
   ========================================================================== */
.maps-crm-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 1024px) {
    .maps-crm-grid {
        grid-template-columns: 1fr;
    }
}

.maps-viewport-card {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(0, 210, 255, 0.35);
    background: #0a0d1d;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
}

.live-leaflet-map {
    width: 100%;
    height: 520px;
    background: #e5e3df;
    z-index: 1;
}

.gmaps-embed-frame {
    width: 100%;
    height: 520px;
    border: 0;
    display: none;
    background: #e5e3df;
}

@media (max-width: 640px) {
    .live-leaflet-map,
    .gmaps-embed-frame {
        height: 360px;
    }
}

.gmaps-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(23, 23, 52, 0.98));
    border-bottom: 1px solid rgba(0, 210, 255, 0.25);
    align-items: center;
    justify-content: space-between;
}

.gmaps-mode-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.gmaps-layer-btn {
    background: rgba(30, 41, 59, 0.85);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gmaps-layer-btn:hover,
.gmaps-layer-btn.active {
    background: linear-gradient(135deg, #2563eb, #00d2ff);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(0, 210, 255, 0.3);
}

.gmaps-live-search-bar {
    display: flex;
    gap: 6px;
    align-items: center;
    flex: 1;
    min-width: 240px;
    max-width: 440px;
}

.gmaps-live-search-bar input {
    flex: 1;
    background: #0f172a;
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 8px;
    padding: 6px 10px;
    color: #fff;
    font-size: 0.78rem;
}

.map-legend-bar,
.maps-legend-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 11px 16px;
    background: rgba(13, 13, 32, 0.96);
    border-top: 1px solid rgba(168, 85, 247, 0.25);
    font-size: 0.76rem;
    color: #cbd5e1;
    align-items: center;
}

.maps-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.maps-legend-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px currentColor;
}

/* Pin personalizzati stile Google Maps */
.custom-spaceweb-pin,
.sw-map-pin {
    background: transparent;
    border: none;
}

.sw-pin-bubble {
    width: 34px;
    height: 34px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2.5px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.65);
    transition: transform 0.2s ease;
}

.sw-pin-bubble span,
.sw-pin-bubble i {
    transform: rotate(45deg);
    font-size: 14px;
    line-height: 1;
    color: #ffffff;
}

.sw-pin-bubble.pin-to-contact,
.sw-pin-bubble.status-da_contattare {
    background: linear-gradient(135deg, #ea4335, #b91c1c);
    color: #ea4335;
}

.sw-pin-bubble.pin-contacted,
.sw-pin-bubble.status-contattato {
    background: linear-gradient(135deg, #4285f4, #1d4ed8);
    color: #4285f4;
}

.sw-pin-bubble.pin-potential-buyer,
.sw-pin-bubble.status-futuro_acquirente {
    background: linear-gradient(135deg, #34a853, #059669);
    color: #34a853;
}

.sw-pin-bubble.pin-not-interested,
.sw-pin-bubble.status-non_interessato {
    background: linear-gradient(135deg, #64748b, #334155);
    color: #64748b;
}

.sw-pin-bubble.pin-callback,
.sw-pin-bubble.status-da_richiamare {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #f97316;
}

.sw-pin-bubble.pin-no-answer,
.sw-pin-bubble.status-non_risponde {
    background: linear-gradient(135deg, #eab308, #ca8a04);
    color: #eab308;
}

/* Card Singola Attività con Note Private nel Pannello Laterale */
.map-business-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 580px;
    overflow-y: auto;
    padding-right: 4px;
}

.map-business-card {
    background: linear-gradient(145deg, rgba(22, 22, 46, 0.92) 0%, rgba(14, 14, 30, 0.96) 100%);
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 14px;
    padding: 14px 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.map-business-card:hover,
.map-business-card.selected-biz,
.map-business-card.active-pin {
    border-color: #00d2ff;
    box-shadow: 0 8px 25px rgba(0, 210, 255, 0.22);
}

.private-note-box {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(9, 9, 22, 0.85);
    border-left: 3px solid #a855f7;
    font-size: 0.8rem;
    color: #e2e8f0;
}

.private-note-box textarea,
.private-note-textarea {
    width: 100%;
    background: #0d0d1f;
    border: 1px solid rgba(168, 85, 247, 0.4);
    border-radius: 8px;
    padding: 8px 10px;
    color: #ffffff;
    font-size: 0.8rem;
    margin-top: 4px;
    resize: vertical;
}

.leaflet-popup-content-wrapper {
    background: #12122a !important;
    color: #f8fafc !important;
    border: 1px solid rgba(0, 210, 255, 0.45);
    border-radius: 14px !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.75) !important;
}

.leaflet-popup-tip {
    background: #12122a !important;
}

/* ==========================================================================
   PIANETA 3D FOTOREALISTICO SU CANVAS AD ALTA DEFINIZIONE & ANTI-FLICKER
   ========================================================================== */
.cosmic-universe-bg,
.stars {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    contain: paint;
}

.planet-3d-webgl-canvas {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.celestial-planet.main-planet {
    width: 640px;
    height: 640px;
    top: -10px;
    right: 0%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.intro-planet-flight-box {
    width: 380px;
    height: 380px;
}

/* Dock Mobile sul Sito Pubblico: nascosto su PC, attivo su Telefono/Tablet */
.mobile-bottom-pill-dock {
    display: none;
}

/* ==========================================================================
   PC & TABLET: MENU DOCK PILLOLA COSMICA LATERALE (SINISTRA) CON "ESTENDI MENU"
   (Sia nel Gestionale .sidebar sia nel Site Web #siteMobileBottomDock)
   ========================================================================== */
@media (min-width: 768px) {
    /* 1. Contenitore Pillola Laterale Flottante (Gestionale & Site Web) */
    .sidebar {
        width: 248px !important;
        margin: 14px 0 14px 14px !important;
        height: calc(100vh - 28px) !important;
        padding: 14px 12px !important;
        background: linear-gradient(180deg, rgba(11, 9, 32, 0.95) 0%, rgba(20, 14, 52, 0.96) 50%, rgba(9, 11, 30, 0.96) 100%) !important;
        backdrop-filter: blur(22px) saturate(190%) !important;
        -webkit-backdrop-filter: blur(22px) saturate(190%) !important;
        border: 1px solid rgba(168, 85, 247, 0.44) !important;
        border-radius: 28px !important;
        box-shadow:
            0 14px 36px rgba(3, 2, 15, 0.88),
            0 0 24px rgba(109, 40, 217, 0.34),
            inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
        display: flex !important;
        flex-direction: column !important;
        z-index: 9990 !important;
        transition: width 0.28s cubic-bezier(0.16, 1, 0.3, 1), padding 0.28s ease, border-radius 0.28s ease !important;
        overflow: hidden !important;
        flex-shrink: 0 !important;
    }

    /* Stato Compresso di Default nel Gestionale (mostra solo icone + pulsante Estendi) */
    .sidebar.collapsed {
        width: 68px !important;
        padding: 12px 8px !important;
        border-radius: 9999px !important;
        align-items: center !important;
    }

    .sidebar .sidebar-header {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        margin-bottom: 10px !important;
        padding: 0 2px 10px 2px !important;
        border-bottom: 1px solid rgba(168, 85, 247, 0.24) !important;
    }

    .sidebar.collapsed .sidebar-header {
        justify-content: center !important;
        padding: 0 0 10px 0 !important;
    }

    .sidebar.collapsed .sidebar-header h2,
    .sidebar.collapsed .user-role,
    .sidebar.collapsed .nav-links li.nav-item a .text,
    .sidebar.collapsed .toggle-btn .toggle-btn-label {
        display: none !important;
    }

    /* Quando il menu Gestionale è ESTESO */
    .sidebar:not(.collapsed) .toggle-btn .toggle-btn-caption {
        display: none !important;
    }
    .sidebar:not(.collapsed) .toggle-btn .toggle-btn-label {
        display: inline-block !important;
        font-size: 0.72rem !important;
        font-weight: 700 !important;
        color: #e0f2fe !important;
        white-space: nowrap !important;
    }
    .sidebar:not(.collapsed) .toggle-btn .toggle-chevron {
        transform: rotate(180deg);
        transform-origin: center;
    }

    /* Pulsante "Estendi menu" / "Riduci menu" nel Gestionale */
    .sidebar .toggle-btn {
        display: inline-flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 3px !important;
        width: 48px !important;
        min-height: 46px !important;
        padding: 6px 4px !important;
        border-radius: 18px !important;
        background: linear-gradient(145deg, rgba(109, 40, 217, 0.28) 0%, rgba(0, 210, 255, 0.14) 100%) !important;
        border: 1px solid rgba(0, 210, 255, 0.42) !important;
        color: #00d2ff !important;
        cursor: pointer !important;
        transition: all 0.22s ease !important;
        box-shadow: 0 4px 12px rgba(0, 210, 255, 0.14) !important;
    }

    .sidebar:not(.collapsed) .toggle-btn {
        flex-direction: row !important;
        width: auto !important;
        min-height: 34px !important;
        padding: 5px 11px !important;
        border-radius: 9999px !important;
        gap: 6px !important;
    }

    .sidebar .toggle-btn:hover {
        background: linear-gradient(135deg, #6d28d9 0%, #4f46e5 100%) !important;
        border-color: #00d2ff !important;
        color: #ffffff !important;
        transform: translateY(-1px);
    }

    .sidebar .toggle-btn svg {
        width: 17px !important;
        height: 17px !important;
        min-width: 17px !important;
        max-width: 17px !important;
        min-height: 17px !important;
        max-height: 17px !important;
        color: #00d2ff !important;
        flex-shrink: 0 !important;
    }

    .sidebar .toggle-btn .toggle-btn-caption {
        font-size: 0.56rem !important;
        font-weight: 800 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.04em !important;
        color: #c4b5fd !important;
        line-height: 1 !important;
    }

    /* Lista Voci nel Gestionale su PC/Tablet */
    .sidebar .nav-links {
        display: flex !important;
        flex-direction: column !important;
        gap: 5px !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        scrollbar-width: none !important;
    }
    .sidebar .nav-links::-webkit-scrollbar {
        display: none !important;
    }

    .sidebar .nav-links li.nav-item,
    .sidebar .nav-links li.nav-item.active,
    .sidebar .nav-links li.nav-item:hover {
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        transform: none !important;
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
    }

    .sidebar .nav-links li.nav-item a {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        width: 100% !important;
        height: 42px !important;
        padding: 0 13px !important;
        border-radius: 9999px !important;
        gap: 12px !important;
        color: #a5b4fc !important;
        background: transparent !important;
        border: 1px solid transparent !important;
        font-size: 0.84rem !important;
        font-weight: 600 !important;
        transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
        text-decoration: none !important;
    }

    .sidebar.collapsed .nav-links li.nav-item a {
        width: 44px !important;
        height: 44px !important;
        padding: 0 !important;
        justify-content: center !important;
    }

    .sidebar .nav-links li.nav-item a:hover {
        background: rgba(168, 85, 247, 0.16) !important;
        border-color: rgba(168, 85, 247, 0.32) !important;
        color: #ffffff !important;
    }

    .sidebar .nav-links li.nav-item a svg,
    .sidebar .nav-links li.nav-item a .nav-icon {
        width: 18px !important;
        height: 18px !important;
        min-width: 18px !important;
        max-width: 18px !important;
        min-height: 18px !important;
        max-height: 18px !important;
        color: #a5b4fc !important;
        flex-shrink: 0 !important;
    }

    /* Voce Attiva nel Gestionale (Pillola Cosmica SpaceWeb) */
    .sidebar .nav-links li.nav-item.active a {
        background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 52%, #4f46e5 100%) !important;
        border: 1px solid rgba(192, 132, 252, 0.62) !important;
        color: #ffffff !important;
        font-weight: 700 !important;
        box-shadow:
            0 4px 16px rgba(109, 40, 217, 0.55),
            0 0 12px rgba(0, 210, 255, 0.24),
            inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
    }

    .sidebar .nav-links li.nav-item.active a svg,
    .sidebar .nav-links li.nav-item.active a .nav-icon {
        color: #00d2ff !important;
        filter: drop-shadow(0 0 6px rgba(0, 210, 255, 0.55)) !important;
    }

    /* 2. SITE WEB (#siteMobileBottomDock): Dock Pillola Cosmica Laterale su PC & Tablet */
    #siteMobileBottomDock.mobile-bottom-pill-dock {
        position: fixed !important;
        left: 16px !important;
        top: 50% !important;
        bottom: auto !important;
        right: auto !important;
        transform: translateY(-50%) !important;
        width: 62px !important;
        max-width: none !important;
        height: auto !important;
        padding: 10px 8px !important;
        margin: 0 !important;
        background: linear-gradient(180deg, rgba(11, 9, 32, 0.94) 0%, rgba(20, 14, 52, 0.96) 50%, rgba(9, 11, 30, 0.96) 100%) !important;
        backdrop-filter: blur(22px) saturate(190%) !important;
        -webkit-backdrop-filter: blur(22px) saturate(190%) !important;
        border: 1px solid rgba(168, 85, 247, 0.44) !important;
        border-radius: 9999px !important;
        box-shadow:
            0 14px 36px rgba(3, 2, 15, 0.88),
            0 0 24px rgba(109, 40, 217, 0.34),
            inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
        z-index: 9990 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        transition: width 0.28s cubic-bezier(0.16, 1, 0.3, 1), padding 0.28s ease, border-radius 0.28s ease !important;
    }

    /* Stato ESTESO su Site Web quando si clicca l'icona "Estendi menu" */
    #siteMobileBottomDock.mobile-bottom-pill-dock.dock-expanded {
        width: 210px !important;
        padding: 12px 10px !important;
        border-radius: 26px !important;
        align-items: stretch !important;
    }

    /* Pulsante "Estendi menu" nella Dock del Site Web */
    #siteMobileBottomDock .dock-expand-toggle {
        display: inline-flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 2px !important;
        width: 44px !important;
        min-height: 44px !important;
        padding: 5px 3px !important;
        margin-bottom: 4px !important;
        border-radius: 18px !important;
        background: linear-gradient(145deg, rgba(109, 40, 217, 0.28) 0%, rgba(0, 210, 255, 0.14) 100%) !important;
        border: 1px solid rgba(0, 210, 255, 0.42) !important;
        color: #00d2ff !important;
        cursor: pointer !important;
        transition: all 0.22s ease !important;
        box-shadow: 0 4px 12px rgba(0, 210, 255, 0.14) !important;
    }

    #siteMobileBottomDock .dock-expand-toggle:hover {
        background: linear-gradient(135deg, #6d28d9 0%, #4f46e5 100%) !important;
        border-color: #00d2ff !important;
        color: #ffffff !important;
    }

    #siteMobileBottomDock .dock-expand-toggle svg {
        width: 17px !important;
        height: 17px !important;
        min-width: 17px !important;
        max-width: 17px !important;
        min-height: 17px !important;
        max-height: 17px !important;
        color: #00d2ff !important;
        flex-shrink: 0 !important;
    }

    #siteMobileBottomDock .dock-expand-caption {
        font-size: 0.54rem !important;
        font-weight: 800 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.04em !important;
        color: #c4b5fd !important;
        line-height: 1 !important;
    }

    #siteMobileBottomDock .dock-expand-label {
        display: none !important;
    }

    #siteMobileBottomDock.dock-expanded .dock-expand-toggle {
        flex-direction: row !important;
        width: 100% !important;
        min-height: 38px !important;
        padding: 0 12px !important;
        border-radius: 9999px !important;
        justify-content: flex-start !important;
        gap: 10px !important;
    }

    #siteMobileBottomDock.dock-expanded .dock-expand-caption {
        display: none !important;
    }

    #siteMobileBottomDock.dock-expanded .dock-expand-label {
        display: inline-block !important;
        font-size: 0.76rem !important;
        font-weight: 700 !important;
        color: #e0f2fe !important;
        white-space: nowrap !important;
    }

    #siteMobileBottomDock.dock-expanded .dock-chevron-path {
        transform: rotate(180deg);
        transform-origin: center;
    }

    /* Singole voci della Dock Laterale su Site Web (PC & Tablet) */
    #siteMobileBottomDock .dock-pill-item,
    #siteMobileBottomDock .mobile-dock-item {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        width: 42px !important;
        height: 42px !important;
        padding: 0 !important;
        border-radius: 9999px !important;
        color: #a5b4fc !important;
        background: transparent !important;
        border: 1px solid transparent !important;
        text-decoration: none !important;
        transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
        gap: 11px !important;
        cursor: pointer !important;
    }

    #siteMobileBottomDock .dock-pill-item:hover,
    #siteMobileBottomDock .mobile-dock-item:hover {
        background: rgba(168, 85, 247, 0.16) !important;
        border-color: rgba(168, 85, 247, 0.32) !important;
        color: #ffffff !important;
    }

    #siteMobileBottomDock .dock-pill-item svg,
    #siteMobileBottomDock .mobile-dock-item svg {
        width: 17px !important;
        height: 17px !important;
        min-width: 17px !important;
        max-width: 17px !important;
        min-height: 17px !important;
        max-height: 17px !important;
        color: #a5b4fc !important;
        flex-shrink: 0 !important;
    }

    /* Di default (non esteso) nasconde tutte le scritte: si vedono SOLO cliccando "Estendi menu" */
    #siteMobileBottomDock:not(.dock-expanded) .dock-label,
    #siteMobileBottomDock:not(.dock-expanded) .mobile-dock-label {
        display: none !important;
    }

    /* Quando è ESTESO (.dock-expanded), mostra l'icona + la scritta su tutte le voci */
    #siteMobileBottomDock.dock-expanded .dock-pill-item,
    #siteMobileBottomDock.dock-expanded .mobile-dock-item {
        width: 100% !important;
        height: 40px !important;
        padding: 0 13px !important;
        justify-content: flex-start !important;
    }

    #siteMobileBottomDock.dock-expanded .dock-label,
    #siteMobileBottomDock.dock-expanded .mobile-dock-label {
        display: inline-block !important;
        font-size: 0.8rem !important;
        font-weight: 600 !important;
        color: #e2e8f0 !important;
        white-space: nowrap !important;
    }

    /* Voce Attiva nella Dock Laterale del Site Web */
    #siteMobileBottomDock .dock-pill-item.active,
    #siteMobileBottomDock .mobile-dock-item.active {
        background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 52%, #4f46e5 100%) !important;
        border: 1px solid rgba(192, 132, 252, 0.62) !important;
        color: #ffffff !important;
        box-shadow:
            0 4px 16px rgba(109, 40, 217, 0.55),
            0 0 12px rgba(0, 210, 255, 0.24),
            inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
    }

    #siteMobileBottomDock .dock-pill-item.active svg,
    #siteMobileBottomDock .mobile-dock-item.active svg {
        color: #00d2ff !important;
        filter: drop-shadow(0 0 6px rgba(0, 210, 255, 0.55)) !important;
    }

    #siteMobileBottomDock.dock-expanded .dock-pill-item.active .dock-label,
    #siteMobileBottomDock.dock-expanded .mobile-dock-item.active .mobile-dock-label {
        color: #ffffff !important;
        font-weight: 700 !important;
    }
}

@media (min-width: 768px) and (max-width: 1480px) {
    body.site-3d-stage main,
    body.site-3d-stage footer {
        padding-left: 88px !important;
    }
}

@media (max-width: 1120px) {
    .admin-tel-calendar-layout {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================================
   TELEFONO / SMARTPHONE (max-width: 767px):
   MOBILE BOTTOM PILL SIDEBAR DOCK IN FONDO ALLO SCHERMO
   ========================================================================== */
@media (max-width: 767px) {
    /* Nasconde il pulsante Estendi laterale su telefono (la barra in basso mostra già la pillola attiva) */
    #siteMobileBottomDock .dock-expand-toggle {
        display: none !important;
    }

    /* 1. Contenitore Dashboard Mobile: Scorrimento verticale fluido con spazio per la Pill Sidebar in basso */
    .dashboard-container {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        min-height: 100vh !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
    }

    /* 2. Sidebar & Mobile Bottom Dock con la Palette Ufficiale SpaceWeb (Viola Cosmico, Indaco Profondo e Ciano) */
    .sidebar,
    .sidebar.collapsed,
    .sidebar:not(.collapsed),
    .mobile-bottom-pill-dock {
        position: fixed !important;
        bottom: 12px !important;
        left: 12px !important;
        right: 12px !important;
        top: auto !important;
        width: auto !important;
        max-width: 460px !important;
        margin: 0 auto !important;
        min-width: 0 !important;
        height: 54px !important;
        padding: 5px 7px !important;
        background: linear-gradient(135deg, rgba(11, 9, 32, 0.94) 0%, rgba(20, 14, 52, 0.95) 50%, rgba(9, 11, 30, 0.95) 100%) !important;
        backdrop-filter: blur(22px) saturate(190%) !important;
        -webkit-backdrop-filter: blur(22px) saturate(190%) !important;
        border: 1px solid rgba(168, 85, 247, 0.42) !important;
        border-radius: 9999px !important;
        box-shadow:
            0 12px 32px rgba(3, 2, 15, 0.88),
            0 0 22px rgba(109, 40, 217, 0.34),
            inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
        z-index: 9990 !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    /* Nasconde l'intestazione testuale della vecchia sidebar su telefono */
    .sidebar .sidebar-header,
    .sidebar .user-role,
    .sidebar .toggle-btn {
        display: none !important;
    }

    /* Lista icone orizzontale dentro la Pill Bar */
    .sidebar .nav-links {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 2px !important;
        gap: 3px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }
    .sidebar .nav-links::-webkit-scrollbar,
    .mobile-bottom-pill-dock::-webkit-scrollbar {
        display: none !important;
    }

    /* Reset completo degli item li per evitare doppi sfondi o bordi ereditati dal desktop */
    .sidebar .nav-links li.nav-item,
    .sidebar .nav-links li.nav-item.active,
    .sidebar .nav-links li.nav-item:hover {
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        transform: none !important;
        flex-shrink: 0 !important;
        height: 42px !important;
        display: flex !important;
        align-items: center !important;
    }

    /* Voci NON attive: pulsanti circolari/pillola compatti con sola icona 17px proporzionata */
    .sidebar .nav-links li.nav-item a,
    .dock-pill-item,
    .mobile-dock-item {
        display: inline-flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        height: 40px !important;
        min-width: 38px !important;
        padding: 0 9px !important;
        border-radius: 9999px !important;
        color: #a5b4fc !important;
        background: transparent !important;
        border: 1px solid transparent !important;
        text-decoration: none !important;
        transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1) !important;
        gap: 6px !important;
        cursor: pointer !important;
        flex-shrink: 0 !important;
    }

    /* Dimensione rigorosa e raffinata per TUTTE le icone SVG della barra mobile (mai più grandi della barra) */
    .sidebar .nav-links li.nav-item a svg,
    .sidebar .nav-links li.nav-item a .nav-icon,
    .dock-pill-item svg,
    .dock-pill-item .dock-icon,
    .mobile-dock-item svg {
        width: 17px !important;
        height: 17px !important;
        min-width: 17px !important;
        max-width: 17px !important;
        min-height: 17px !important;
        max-height: 17px !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
        color: #a5b4fc !important;
        transform: none !important;
    }

    .sidebar .nav-links li.nav-item a .text,
    .dock-pill-item .dock-label,
    .mobile-dock-item .mobile-dock-label {
        display: none !important;
    }

    /* Voce ATTIVA: Pillola Cosmica SpaceWeb (Viola -> Indaco -> Bagliore Ciano) con Icona 17px + Testo compatto */
    .sidebar .nav-links li.nav-item.active a,
    .dock-pill-item.active,
    .mobile-dock-item.active {
        background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 52%, #4f46e5 100%) !important;
        border: 1px solid rgba(192, 132, 252, 0.6) !important;
        color: #ffffff !important;
        padding: 0 13px !important;
        height: 40px !important;
        box-shadow:
            0 4px 14px rgba(109, 40, 217, 0.55),
            0 0 10px rgba(0, 210, 255, 0.22),
            inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
        font-weight: 700 !important;
    }

    .sidebar .nav-links li.nav-item.active a svg,
    .sidebar .nav-links li.nav-item.active a .nav-icon,
    .dock-pill-item.active svg,
    .dock-pill-item.active .dock-icon,
    .mobile-dock-item.active svg {
        color: #00d2ff !important;
        filter: drop-shadow(0 0 6px rgba(0, 210, 255, 0.55)) !important;
    }

    .sidebar .nav-links li.nav-item.active a .text,
    .dock-pill-item.active .dock-label,
    .mobile-dock-item.active .mobile-dock-label {
        display: inline-block !important;
        margin: 0 !important;
        font-size: 0.74rem !important;
        font-weight: 700 !important;
        color: #ffffff !important;
        white-space: nowrap !important;
        letter-spacing: 0.01em !important;
        max-width: 112px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    /* Spazio inferiore sul sito pubblico e bottone scroll-top sopra la dock */
    body {
        padding-bottom: 84px !important;
    }
    #scrollTopBtn {
        bottom: 78px !important;
        right: 14px !important;
    }

    /* 4. Contenuto Principale Dashboard riorganizzato con la Palette SpaceWeb */
    .main-content {
        width: 100% !important;
        height: auto !important;
        min-height: 100vh !important;
        padding: 14px 12px 96px 12px !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
    }

    /* Top Bar compatta con stile Glass Cosmico SpaceWeb */
    .top-bar {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 11px 14px !important;
        margin-bottom: 16px !important;
        border-radius: 18px !important;
        background: linear-gradient(145deg, rgba(16, 13, 42, 0.92) 0%, rgba(10, 10, 28, 0.95) 100%) !important;
        border: 1px solid rgba(168, 85, 247, 0.32) !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 16px rgba(139, 92, 246, 0.14) !important;
        gap: 8px !important;
    }

    .top-bar h1 {
        font-size: 1.05rem !important;
        line-height: 1.2 !important;
        margin: 0 !important;
    }

    .operator-badge {
        width: auto !important;
        padding: 5px 10px !important;
        font-size: 0.72rem !important;
        gap: 6px !important;
        background: rgba(12, 10, 32, 0.92) !important;
        border: 1px solid rgba(0, 210, 255, 0.35) !important;
    }

    /* Griglia KPI 2x2 su Telefono con Palette Cosmica SpaceWeb */
    .stats-overview {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
        margin-bottom: 18px !important;
    }

    .stat-box {
        padding: 14px 13px !important;
        border-radius: 20px !important;
        background: linear-gradient(155deg, rgba(18, 14, 46, 0.92) 0%, rgba(10, 10, 26, 0.96) 100%) !important;
        border: 1px solid rgba(139, 92, 246, 0.3) !important;
        border-top: 2px solid #8b5cf6 !important;
        box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45) !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        min-height: 112px !important;
    }

    .stat-box.highlight {
        background: linear-gradient(145deg, rgba(109, 40, 217, 0.9) 0%, rgba(79, 70, 229, 0.86) 65%, rgba(6, 182, 212, 0.68) 100%) !important;
        border: 1px solid rgba(192, 132, 252, 0.55) !important;
        box-shadow: 0 10px 26px rgba(109, 40, 217, 0.4) !important;
    }

    .stat-box.highlight h3,
    .stat-box.highlight .stat-value,
    .stat-box.highlight .stat-sub {
        color: #ffffff !important;
    }

    .stat-box h3 {
        font-size: 0.66rem !important;
        letter-spacing: 0.05em !important;
        margin-bottom: 6px !important;
        color: #c4b5fd !important;
    }

    .stat-value {
        font-size: 1.3rem !important;
        line-height: 1.15 !important;
        margin-bottom: 4px !important;
        word-break: break-word !important;
    }

    .stat-sub {
        font-size: 0.67rem !important;
        line-height: 1.25 !important;
        color: #94a3b8 !important;
    }

    /* Card Sezioni arrotondate con Palette Cosmica SpaceWeb */
    .section-card {
        padding: 16px 14px !important;
        border-radius: 20px !important;
        margin-bottom: 16px !important;
        background: linear-gradient(160deg, rgba(16, 13, 42, 0.92) 0%, rgba(9, 9, 25, 0.96) 100%) !important;
        border: 1px solid rgba(168, 85, 247, 0.28) !important;
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45) !important;
    }

    .section-card h2 {
        font-size: 1.06rem !important;
    }

    /* Form e Griglie su singola colonna pulita su Telefono */
    .form-grid,
    .dashboard-grid,
    .maps-crm-grid,
    .admin-tel-calendar-layout {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    /* Chat Aziendale ottimizzata per Telefono */
    #section-chat > .section-card {
        flex-direction: column !important;
        height: calc(100vh - 165px) !important;
        min-height: 480px !important;
    }

    .chat-sidebar {
        width: 100% !important;
        max-height: 145px !important;
        border-right: none !important;
        border-bottom: 1px solid #1f1f38 !important;
    }

    /* Toolbar Mappa su Telefono */
    .gmaps-toolbar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

    .gmaps-live-search-bar {
        min-width: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Pianeta 3D su Telefono */
    .celestial-planet.main-planet {
        width: 440px !important;
        height: 440px !important;
        top: 10px !important;
        right: -110px !important;
        transform: scale(0.68) !important;
        transform-origin: top right !important;
    }

    .intro-planet-flight-box {
        width: 260px !important;
        height: 260px !important;
    }
}

/* ========================================================
   SPACEWEB GESTIONALE 2.0 - FULL SAAS REDESIGN (SAME COLORS)
   Palette: #070714 | #0b0e21 | #10142d | #151a3a | #a855f7 | #00d2ff | #10b981
   ======================================================== */

body:has(.dashboard-container) {
    background:
        radial-gradient(ellipse 75% 45% at 88% -5%, rgba(168, 85, 247, 0.14), transparent 60%),
        radial-gradient(ellipse 60% 45% at 15% 105%, rgba(0, 210, 255, 0.10), transparent 60%),
        #070714 !important;
    color: #e2e8f0;
}

body:has(.dashboard-container) .celestial-planet,
body:has(.dashboard-container) .cosmic-nebula,
body:has(.dashboard-container) .cosmic-universe-bg {
    display: none !important;
}

/* Main Shell & Scrollable Canvas */
.dashboard-container {
    background: transparent !important;
    gap: 0 !important;
}

.dashboard-container .main-content {
    flex: 1;
    padding: 24px 32px 48px 32px !important;
    background: transparent !important;
    overflow-y: auto;
}

/* Headings Clean & Crisp (Zero weird gradient clipping/wrapping) */
.dashboard-container h1,
.dashboard-container h2,
.dashboard-container h3,
.dashboard-container h4,
.dashboard-container .section-header-flex h3,
.dashboard-container .top-bar h2 {
    background: none !important;
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
    -webkit-text-fill-color: #f8fafc !important;
    color: #f8fafc !important;
    text-shadow: none !important;
    letter-spacing: -0.015em;
    line-height: 1.3;
    word-break: normal;
    overflow-wrap: break-word;
}

/* Desktop Full-Height Docked SaaS Sidebar */
@media (min-width: 768px) {
    .dashboard-container .sidebar {
        width: 260px !important;
        min-width: 260px !important;
        margin: 0 !important;
        height: 100vh !important;
        padding: 20px 14px 18px 14px !important;
        background: linear-gradient(180deg, #0b0e21 0%, #070815 100%) !important;
        border: none !important;
        border-right: 1px solid rgba(168, 85, 247, 0.22) !important;
        border-radius: 0 !important;
        box-shadow: 4px 0 28px rgba(0, 0, 0, 0.45) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        align-items: stretch !important;
    }

    .dashboard-container .sidebar.collapsed {
        width: 76px !important;
        min-width: 76px !important;
        padding: 18px 10px !important;
        border-radius: 0 !important;
        align-items: center !important;
    }

    .dashboard-container .sidebar .sidebar-header {
        margin-bottom: 14px !important;
        padding: 0 4px 14px 4px !important;
        border-bottom: 1px solid rgba(148, 163, 184, 0.14) !important;
        gap: 8px !important;
    }

    .dashboard-container .sidebar .sidebar-header h2 {
        font-size: 1.32rem !important;
        font-weight: 800 !important;
        color: #ffffff !important;
        letter-spacing: -0.02em !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }

    .dashboard-container .sidebar .sidebar-header h2::before {
        content: "";
        display: inline-block;
        width: 10px;
        height: 10px;
        border-radius: 3px;
        background: linear-gradient(135deg, #00d2ff 0%, #a855f7 100%);
        box-shadow: 0 0 12px rgba(0, 210, 255, 0.65);
        flex-shrink: 0;
    }

    .dashboard-container .sidebar.collapsed .sidebar-header h2 {
        display: none !important;
    }

    .dashboard-container .sidebar .toggle-btn,
    .dashboard-container .sidebar:not(.collapsed) .toggle-btn {
        width: 34px !important;
        min-width: 34px !important;
        height: 34px !important;
        min-height: 34px !important;
        padding: 0 !important;
        border-radius: 10px !important;
        background: rgba(21, 26, 58, 0.9) !important;
        border: 1px solid rgba(168, 85, 247, 0.35) !important;
        color: #00d2ff !important;
        box-shadow: none !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .dashboard-container .sidebar .toggle-btn:hover {
        background: rgba(168, 85, 247, 0.25) !important;
        border-color: #00d2ff !important;
        transform: none !important;
    }

    .dashboard-container .sidebar .toggle-btn-caption,
    .dashboard-container .sidebar .toggle-btn-label {
        display: none !important;
    }

    .dashboard-container .sidebar .user-role {
        background: rgba(21, 26, 58, 0.72) !important;
        border: 1px solid rgba(0, 210, 255, 0.24) !important;
        border-radius: 10px !important;
        padding: 9px 12px !important;
        margin-bottom: 14px !important;
        color: #e2e8f0 !important;
        font-size: 0.78rem !important;
        font-weight: 700 !important;
        letter-spacing: 0.01em !important;
    }

    .dashboard-container .sidebar .nav-links {
        gap: 4px !important;
    }

    .dashboard-container .sidebar .nav-links li.nav-item a {
        height: 42px !important;
        padding: 0 12px !important;
        border-radius: 10px !important;
        gap: 11px !important;
        color: #94a3b8 !important;
        font-size: 0.87rem !important;
        font-weight: 600 !important;
        border: 1px solid transparent !important;
        background: transparent !important;
        position: relative !important;
    }

    .dashboard-container .sidebar.collapsed .nav-links li.nav-item a {
        width: 44px !important;
        height: 44px !important;
        padding: 0 !important;
        justify-content: center !important;
        border-radius: 10px !important;
    }

    .dashboard-container .sidebar .nav-links li.nav-item a:hover {
        background: rgba(168, 85, 247, 0.12) !important;
        border-color: rgba(168, 85, 247, 0.28) !important;
        color: #f8fafc !important;
    }

    .dashboard-container .sidebar .nav-links li.nav-item a .nav-icon,
    .dashboard-container .sidebar .nav-links li.nav-item a svg {
        color: #94a3b8 !important;
        transition: color 0.18s ease !important;
    }

    .dashboard-container .sidebar .nav-links li.nav-item a:hover .nav-icon {
        color: #c084fc !important;
    }

    .dashboard-container .sidebar .nav-links li.nav-item.active a {
        background: linear-gradient(90deg, rgba(124, 58, 237, 0.28) 0%, rgba(0, 210, 255, 0.12) 100%) !important;
        border: 1px solid rgba(168, 85, 247, 0.5) !important;
        color: #ffffff !important;
        font-weight: 700 !important;
        box-shadow: 0 4px 14px rgba(124, 58, 237, 0.18) !important;
    }

    .dashboard-container .sidebar .nav-links li.nav-item.active a::before {
        content: "";
        position: absolute;
        left: 0;
        top: 8px;
        bottom: 8px;
        width: 3px;
        border-radius: 0 3px 3px 0;
        background: #00d2ff;
        box-shadow: 0 0 8px rgba(0, 210, 255, 0.85);
    }

    .dashboard-container .sidebar.collapsed .nav-links li.nav-item.active a::before {
        display: none;
    }

    .dashboard-container .sidebar .nav-links li.nav-item.active a .nav-icon,
    .dashboard-container .sidebar .nav-links li.nav-item.active a svg {
        color: #00d2ff !important;
        filter: none !important;
    }
}

/* Command Top Bar */
.dashboard-container .top-bar {
    background: rgba(13, 16, 36, 0.92) !important;
    border: 1px solid rgba(168, 85, 247, 0.24) !important;
    border-radius: 16px !important;
    padding: 16px 24px !important;
    margin-bottom: 24px !important;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.34) !important;
    backdrop-filter: blur(14px) !important;
}

.dashboard-container .top-bar h1 {
    font-size: 1.45rem !important;
    font-weight: 800 !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-container .top-bar h1::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 22px;
    border-radius: 4px;
    background: linear-gradient(180deg, #00d2ff 0%, #a855f7 100%);
    flex-shrink: 0;
}

.dashboard-container .operator-badge {
    background: #121631 !important;
    border: 1px solid rgba(0, 210, 255, 0.32) !important;
    border-radius: 12px !important;
    padding: 7px 12px !important;
    box-shadow: none !important;
    color: #e2e8f0 !important;
    font-size: 0.84rem !important;
}

.dashboard-container .status-pill-select {
    background: #0b0e21 !important;
    border: 1px solid rgba(168, 85, 247, 0.42) !important;
    border-radius: 8px !important;
    color: #00d2ff !important;
    padding: 4px 9px !important;
}

/* KPI Stat Cards */
.dashboard-container .stats-overview {
    gap: 16px !important;
    margin-bottom: 22px !important;
}

.dashboard-container .stat-box {
    background: linear-gradient(180deg, #10142d 0%, #0b0e21 100%) !important;
    border: 1px solid rgba(168, 85, 247, 0.22) !important;
    border-top: 2px solid #a855f7 !important;
    border-radius: 16px !important;
    padding: 18px 20px !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28) !important;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease !important;
}

.dashboard-container .stat-box:hover {
    transform: translateY(-2px) !important;
    border-color: rgba(0, 210, 255, 0.42) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.36) !important;
}

.dashboard-container .stat-box.highlight {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.24) 0%, rgba(16, 185, 129, 0.14) 100%) !important;
    border: 1px solid rgba(16, 185, 129, 0.45) !important;
    border-top: 2px solid #10b981 !important;
}

.dashboard-container .stat-box h3 {
    font-size: 0.74rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    color: #94a3b8 !important;
    -webkit-text-fill-color: #94a3b8 !important;
    margin-bottom: 8px !important;
}

.dashboard-container .stat-box .stat-value {
    font-size: 1.75rem !important;
    font-weight: 800 !important;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    color: #00d2ff !important;
    margin-bottom: 4px !important;
}

.dashboard-container .stat-box.highlight .stat-value {
    color: #34d399 !important;
}

.dashboard-container .stat-box .stat-sub {
    font-size: 0.76rem !important;
    color: #94a3b8 !important;
}

/* Main Section Cards & Subcards */
.dashboard-container .section-card {
    background: rgba(13, 16, 36, 0.94) !important;
    border: 1px solid rgba(168, 85, 247, 0.22) !important;
    border-radius: 16px !important;
    padding: 24px !important;
    margin-bottom: 22px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.32) !important;
    backdrop-filter: blur(10px) !important;
}

.dashboard-container .section-card:hover {
    border-color: rgba(168, 85, 247, 0.36) !important;
}

.dashboard-container .card-header-action {
    padding-bottom: 14px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.dashboard-container .section-card h2 {
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    margin-bottom: 4px !important;
}

.dashboard-container .section-desc {
    color: #94a3b8 !important;
    font-size: 0.85rem !important;
    line-height: 1.5 !important;
    margin-bottom: 12px !important;
}

/* Buttons, Pills & Controls */
.dashboard-container .tab-btn,
.dashboard-container .btn-primary,
.dashboard-container .btn-secondary {
    background: #121631 !important;
    border: 1px solid rgba(168, 85, 247, 0.32) !important;
    color: #cbd5e1 !important;
    border-radius: 10px !important;
    padding: 8px 14px !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    box-shadow: none !important;
}

.dashboard-container .tab-btn:hover {
    background: rgba(168, 85, 247, 0.18) !important;
    border-color: #a855f7 !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}

.dashboard-container .tab-btn.active {
    background: linear-gradient(135deg, #7c3aed 0%, #2563eb 55%, #00d2ff 100%) !important;
    border-color: rgba(0, 210, 255, 0.65) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.32) !important;
}

.dashboard-container .action-dropdown,
.dashboard-container .form-group input,
.dashboard-container .form-group select,
.dashboard-container .form-group textarea,
.dashboard-container input[type="text"],
.dashboard-container input[type="email"],
.dashboard-container input[type="tel"],
.dashboard-container input[type="password"],
.dashboard-container input[type="number"],
.dashboard-container input[type="date"],
.dashboard-container input[type="time"],
.dashboard-container select,
.dashboard-container textarea {
    background: #0b0e21 !important;
    border: 1px solid rgba(148, 163, 184, 0.25) !important;
    border-radius: 10px !important;
    color: #f8fafc !important;
    font-size: 0.85rem;
}

.dashboard-container .form-group input:focus,
.dashboard-container .form-group select:focus,
.dashboard-container .form-group textarea:focus,
.dashboard-container .action-dropdown:focus,
.dashboard-container input:focus,
.dashboard-container select:focus,
.dashboard-container textarea:focus {
    border-color: #00d2ff !important;
    box-shadow: 0 0 0 2px rgba(0, 210, 255, 0.16) !important;
    outline: none !important;
}

/* Tables & Hidden Modals */
.dashboard-container .orders-table-wrapper {
    background: #0b0e21 !important;
    border: 1px solid rgba(168, 85, 247, 0.22) !important;
    border-radius: 14px !important;
    overflow-x: auto;
}

.dashboard-container .orders-table th {
    background: #121631 !important;
    color: #00d2ff !important;
    border-bottom: 1px solid rgba(168, 85, 247, 0.25) !important;
    padding: 13px 16px !important;
    font-size: 0.74rem !important;
    letter-spacing: 0.06em !important;
}

.dashboard-container .orders-table td {
    padding: 13px 16px !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08) !important;
    color: #e2e8f0 !important;
    font-size: 0.85rem;
}

.dashboard-container .orders-table tbody tr:hover {
    background: rgba(168, 85, 247, 0.08) !important;
}

.dashboard-container .hidden-form {
    background: #10142d !important;
    border: 1px solid rgba(0, 210, 255, 0.3) !important;
    border-radius: 14px !important;
    padding: 20px !important;
}

/* Cards: Calls, Leads, Maps, Tasks */
.dashboard-container .contact-card,
.dashboard-container .map-business-card,
.dashboard-container .task-item,
.dashboard-container .project-card,
.dashboard-container .snippet-card {
    background: #10142d !important;
    border: 1px solid rgba(148, 163, 184, 0.18) !important;
    border-radius: 14px !important;
    padding: 16px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22) !important;
}

.dashboard-container .contact-card:hover,
.dashboard-container .map-business-card:hover,
.dashboard-container .task-item:hover {
    border-color: rgba(0, 210, 255, 0.45) !important;
}

.dashboard-container .private-note-box {
    background: #0b0e21 !important;
    border: 1px solid rgba(168, 85, 247, 0.22) !important;
    border-left: 3px solid #a855f7 !important;
    border-radius: 12px !important;
    padding: 12px !important;
}

/* Interactive Calendar Overhaul */
.dashboard-container .calendar-grid {
    gap: 8px !important;
}

.dashboard-container .calendar-day-header {
    color: #c084fc !important;
    font-size: 0.72rem !important;
    padding: 8px 0 !important;
}

.dashboard-container .calendar-cell {
    background: #10142d !important;
    border: 1px solid rgba(148, 163, 184, 0.16) !important;
    border-radius: 12px !important;
    min-height: 82px !important;
    padding: 8px !important;
}

.dashboard-container .calendar-cell:hover:not(.empty) {
    background: #151a3a !important;
    border-color: #00d2ff !important;
    box-shadow: 0 4px 14px rgba(0, 210, 255, 0.16) !important;
}

.dashboard-container .calendar-cell.empty {
    background: rgba(11, 14, 33, 0.45) !important;
    border-color: rgba(255, 255, 255, 0.03) !important;
}

.dashboard-container .calendar-cell.today {
    border-color: #a855f7 !important;
    background: rgba(168, 85, 247, 0.12) !important;
}

.dashboard-container .calendar-cell.selected {
    background: linear-gradient(155deg, rgba(0, 210, 255, 0.22) 0%, rgba(124, 58, 237, 0.22) 100%) !important;
    border: 2px solid #00d2ff !important;
}

/* Chat Aziendale Panels */
.dashboard-container #section-chat > .section-card {
    padding: 0 !important;
    overflow: hidden;
    border: 1px solid rgba(168, 85, 247, 0.28) !important;
}

.dashboard-container .chat-sidebar {
    background: #0b0e21 !important;
    border-right: 1px solid rgba(148, 163, 184, 0.14) !important;
}

.dashboard-container .chat-main {
    background: #0d1024 !important;
}

.dashboard-container .chat-header {
    background: #10142d !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14) !important;
}

.dashboard-container .chat-messages-box {
    background: #090b1a !important;
    border: none !important;
    border-radius: 0 !important;
}

.dashboard-container .chat-input-area {
    background: #10142d !important;
    border-top: 1px solid rgba(148, 163, 184, 0.14) !important;
}

.dashboard-container .chat-channel-item {
    border-radius: 10px !important;
    padding: 10px 12px !important;
}

.dashboard-container .chat-channel-item.active {
    background: rgba(0, 210, 255, 0.14) !important;
    border-left: 3px solid #00d2ff !important;
    color: #ffffff !important;
}

/* Google Maps Toolbar & Live Search Results Box */
.maps-viewport-card {
    border-radius: 16px !important;
    border: 1px solid rgba(0, 210, 255, 0.28) !important;
    background: #0b0e21 !important;
}

.gmaps-toolbar {
    background: #10142d !important;
    border-bottom: 1px solid rgba(0, 210, 255, 0.2) !important;
    padding: 12px 14px !important;
    gap: 10px !important;
}

.gmaps-live-search-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    max-width: none !important;
}

.gmaps-cat-select {
    background: #0b0e21 !important;
    border: 1px solid rgba(168, 85, 247, 0.35) !important;
    color: #f8fafc !important;
    padding: 7px 11px !important;
    border-radius: 10px !important;
    font-size: 0.82rem !important;
    min-width: 190px;
    outline: none;
}

.gmaps-cat-select:focus {
    border-color: #00d2ff !important;
}

.live-search-results-box {
    margin: 12px 14px 16px 14px;
    background: #0b0e21;
    border: 1px solid rgba(0, 210, 255, 0.32);
    border-radius: 14px;
    padding: 14px 16px;
}

.live-search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.live-search-header strong {
    color: #f8fafc;
    font-size: 0.95rem;
    display: block;
}

.live-search-sub {
    color: #94a3b8;
    font-size: 0.78rem;
    display: block;
    margin-top: 2px;
}

.live-search-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 12px;
}

.live-search-card {
    background: #10142d;
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.live-search-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.live-search-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #00d2ff;
    background: rgba(0, 210, 255, 0.12);
    border: 1px solid rgba(0, 210, 255, 0.28);
    border-radius: 6px;
    padding: 2px 7px;
    margin-bottom: 4px;
}

.live-search-title {
    display: block;
    color: #ffffff;
    font-size: 0.94rem;
}

.live-search-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.live-search-grid label,
.live-search-note-row label {
    display: block;
    font-size: 0.7rem;
    color: #cbd5e1;
    margin-bottom: 3px;
}

.live-search-grid input,
.live-search-grid select,
.live-search-note-row textarea {
    width: 100%;
    background: #0b0e21 !important;
    border: 1px solid rgba(148, 163, 184, 0.26) !important;
    color: #f8fafc !important;
    padding: 6px 9px !important;
    border-radius: 8px !important;
    font-size: 0.8rem !important;
    font-family: inherit;
    outline: none;
}

.live-search-grid input:focus,
.live-search-grid select:focus,
.live-search-note-row textarea:focus {
    border-color: #a855f7 !important;
}

.live-search-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

@media (max-width: 767px) {
    .dashboard-container .main-content {
        padding: 14px 12px 96px 12px !important;
    }
    .dashboard-container .top-bar {
        border-radius: 14px !important;
        padding: 12px 14px !important;
    }
    .dashboard-container .top-bar h1 {
        font-size: 1.05rem !important;
    }
    .dashboard-container .top-bar h1::before {
        height: 16px;
    }
    .dashboard-container .section-card {
        padding: 16px 14px !important;
        border-radius: 14px !important;
    }
    .dashboard-container .calendar-cell {
        min-height: 60px !important;
        padding: 4px !important;
        border-radius: 8px !important;
    }
    .live-search-grid {
        grid-template-columns: 1fr;
    }
}










