/* Stili delle funzioni HUB (hub-*.js): itinerari, zone, ricerca globale, novità, condividi, diario, mappa di calore.
   Stile "State of Leonida" come il resto della mappa. File aggiunto a mano: per toglierlo basta togliere il <link> da index.html. */

/* ---------- Pulsanti nella barra in alto ---------- */
.map-actions .hub-chip { position: relative; }
.map-actions .hub-chip.hub-on { color: #ff50c5; box-shadow: inset 0 0 0 1px rgba(255, 80, 197, .65); }
.hub-badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #ff50c5; color: #fff; font: 800 10px/18px Montserrat, Inter, sans-serif; font-style: normal; text-align: center; box-shadow: 0 0 0 2px #0a0a10, 0 0 12px rgba(255, 80, 197, .6); pointer-events: none; }
.hub-badge[hidden] { display: none; }

/* ---------- Pannello ---------- */
.hub-panel {
  position: fixed; left: 400px; top: 74px; width: 380px; max-height: calc(100dvh - 100px); z-index: 1490;
  display: flex; flex-direction: column; color: #fff; font: 400 13px/1.5 Montserrat, Inter, system-ui, sans-serif;
  background: rgba(18, 12, 32, .9); -webkit-backdrop-filter: blur(26px); backdrop-filter: blur(26px);
  border: 1px solid rgba(255, 255, 255, .16); border-radius: 18px; box-shadow: 0 18px 60px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.hub-panel.hub-wide { width: min(720px, calc(100vw - 440px)); }
.hub-panel.hub-hide { display: none; }
.hub-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 16px 18px 8px; }
.hub-head h3 { margin: 0; font: 500 22px/1.15 Oswald, Montserrat, sans-serif; letter-spacing: .2px; color: #fff; }
.hub-sub { margin: 3px 0 0; color: rgba(255, 255, 255, .62); font-size: 12px; }
.hub-sub:empty { display: none; }
.hub-x { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); color: #fff; cursor: pointer; }
.hub-x:hover { border-color: #ff50c5; color: #ff50c5; }
.hub-body { overflow-y: auto; padding: 4px 18px 18px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 80, 197, .45) transparent; }
.hub-body h4 { margin: 18px 0 6px; font: 700 14px Montserrat, Inter, sans-serif; color: #fff; }
.hub-body h4 small { color: rgba(255, 255, 255, .55); font-weight: 600; }
.hub-muted { color: rgba(255, 255, 255, .6); font-size: 12px; margin: 8px 0; }
.hub-muted b { color: #fff; }
.acc, .hub-body .acc { color: #ff50c5; }
.hub-big { font-size: 14px; margin: 6px 0 8px; color: rgba(255, 255, 255, .75); }
.hub-big b { font: 700 26px Oswald, Montserrat, sans-serif; color: #fff; }

.hub-row { display: flex; gap: 8px; align-items: center; margin: 10px 0; }
.hub-row.wrap { flex-wrap: wrap; }
.hub-row.between { justify-content: space-between; margin: 2px 0; }
.hub-row.foot { margin-top: 14px; }
.hub-row select, .hub-panel select { flex: 1; min-width: 0; height: 36px; padding: 0 10px; color: #fff; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); border-radius: 10px; font: 600 13px Montserrat, Inter, sans-serif; }
.hub-panel select option { background: #1a1230; }
.hub-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 12px; border: 0; cursor: pointer; background: #ff50c5; color: #fff; font: 700 13px Montserrat, Inter, sans-serif; box-shadow: 0 0 0 2px rgba(255, 80, 197, .3), 0 8px 22px rgba(255, 80, 197, .3); white-space: nowrap; text-decoration: none; }
.hub-btn:hover { filter: brightness(1.08); }
.hub-btn.ghost { background: rgba(255, 255, 255, .07); box-shadow: none; border: 1px solid rgba(255, 255, 255, .16); }
.hub-btn.ghost:hover { border-color: #ff50c5; }
.hub-btn.sm { min-height: 32px; padding: 0 12px; font-size: 12px; border-radius: 10px; }
.hub-btn.grow { flex: 1; }
.hub-link { background: none; border: 0; padding: 0; color: #fff; font: inherit; font-weight: 700; cursor: pointer; text-align: left; }
.hub-link:hover { color: #ff50c5; text-decoration: underline; }
.hub-row .hub-link { color: rgba(255, 255, 255, .65); font-size: 12px; font-weight: 600; }
.hub-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.hub-pill { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 99px; cursor: pointer; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); color: #fff; font: 600 12px Montserrat, Inter, sans-serif; text-decoration: none; white-space: nowrap; }
.hub-pill:hover { border-color: #ff50c5; }
.hub-pill.on { background: #ff50c5; border-color: #ff50c5; box-shadow: 0 0 16px rgba(255, 80, 197, .5); }
.hub-check { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: rgba(255, 255, 255, .8); cursor: pointer; }
.hub-check input { accent-color: #ff50c5; width: 15px; height: 15px; }
.hub-bar { display: block; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.hub-bar.big { height: 10px; margin-bottom: 8px; }
.hub-bar > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #7c5cff, #ff50c5); }
.hub-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.hub-kpis.four { grid-template-columns: repeat(4, 1fr); }
.hub-kpi { padding: 11px 13px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); min-width: 0; }
.hub-kpi.acc { background: rgba(255, 80, 197, .14); border-color: rgba(255, 80, 197, .45); }
.hub-kpi > span { display: block; color: rgba(255, 255, 255, .62); font-size: 11px; }
.hub-kpi > b { display: block; font: 700 26px/1.2 Oswald, Montserrat, sans-serif; white-space: nowrap; }
.hub-kpi.acc > b { color: #ff50c5; }
.hub-kpi > b small { font-size: 14px; color: rgba(255, 255, 255, .6); }
.hub-kpi > small { display: block; color: rgba(255, 255, 255, .55); font-size: 11px; }
.hub-toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); z-index: 4000; padding: 10px 18px; border-radius: 99px; background: rgba(16, 10, 30, .95); border: 1px solid rgba(255, 80, 197, .5); color: #fff; font: 600 13px Montserrat, Inter, sans-serif; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); max-width: calc(100vw - 32px); text-align: center; }
.hub-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Pulsanti nella scheda del luogo ---------- */
.hub-scheda { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.hub-scheda .hub-btn svg { flex: none; }

/* ---------- Itinerari ---------- */
.hub-it-list { list-style: none; margin: 4px 0; padding: 0; }
.hub-it-list li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid rgba(255, 255, 255, .08); }
.hub-it-list li > i { flex: none; width: 26px; height: 26px; border-radius: 50%; background: #ff50c5; display: grid; place-items: center; font: 700 13px Oswald, Montserrat, sans-serif; font-style: normal; }
.hub-it-list li.done > i { background: rgba(255, 255, 255, .2); }
.hub-it-list li.now > i { box-shadow: 0 0 0 4px rgba(255, 80, 197, .35); }
.hub-it-list li.done b { opacity: .55; }
.hub-it-list li > div { flex: 1; min-width: 0; }
.hub-it-list b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.hub-it-list small { display: block; color: rgba(255, 255, 255, .6); font-size: 11px; }
.hub-it-tools { display: flex; gap: 2px; }
.hub-it-tools button { width: 26px; height: 26px; border-radius: 8px; border: 0; background: rgba(255, 255, 255, .06); color: #fff; cursor: pointer; font-size: 12px; }
.hub-it-tools button:hover:not(:disabled) { background: rgba(255, 80, 197, .3); }
.hub-it-tools button:disabled { opacity: .25; cursor: default; }
.hub-add { position: relative; margin-top: 8px; }
.hub-add input { width: 100%; height: 38px; padding: 0 12px; color: #fff; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .16); border-radius: 10px; font: 500 13px Montserrat, Inter, sans-serif; box-sizing: border-box; }
.hub-add input:focus { outline: none; border-color: #ff50c5; }
.hub-sug button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 8px; border: 0; border-radius: 8px; background: none; color: #fff; text-align: left; cursor: pointer; font: 600 12px Montserrat, Inter, sans-serif; }
.hub-sug button:hover { background: rgba(255, 80, 197, .16); }
.hub-sug button i { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.hub-sug button small { margin-left: auto; color: rgba(255, 255, 255, .5); font-weight: 500; }
.hub-it-pin { display: grid !important; place-items: center; border-radius: 50%; background: #ff50c5; border: 3px solid #fff; color: #fff; font: 800 14px Inter, Montserrat, sans-serif; box-shadow: 0 4px 14px rgba(0, 0, 0, .45); }
.hub-it-pin.done { background: #8a8a99; }
.hub-it-pin.now { box-shadow: 0 0 0 7px rgba(255, 80, 197, .35), 0 4px 14px rgba(0, 0, 0, .45); }
.hub-it-leg span { position: absolute; transform: translate(-50%, -50%); padding: 3px 9px; border-radius: 99px; white-space: nowrap; background: rgba(16, 10, 30, .9); border: 1px solid rgba(255, 255, 255, .3); color: #fff; font: 700 11px Inter, Montserrat, sans-serif; }
.leaflet-container.hub-picking { cursor: crosshair !important; }

/* ---------- Zone ---------- */
.hub-zones { display: flex; flex-direction: column; gap: 2px; margin: 8px 0; }
.hub-zrow { display: grid; grid-template-columns: 118px 1fr 52px; gap: 10px; align-items: center; padding: 5px 6px; border: 0; border-radius: 8px; background: none; color: #fff; text-align: left; cursor: pointer; font: 600 12px Montserrat, Inter, sans-serif; }
.hub-zrow.static { cursor: default; padding: 5px 0; }
.hub-zrow:not(.static):hover, .hub-zrow.on { background: rgba(255, 80, 197, .14); }
.hub-zrow > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-zrow small { text-align: right; color: rgba(255, 255, 255, .7); }
.hub-miss { list-style: none; margin: 4px 0; padding: 0; }
.hub-miss li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid rgba(255, 255, 255, .07); }
.hub-miss li > i { flex: none; width: 26px; height: 26px; border-radius: 50%; background: #ff50c5; display: grid; place-items: center; font: 800 12px Inter, sans-serif; font-style: normal; }
.hub-miss li > div { flex: 1; min-width: 0; }
.hub-miss .hub-link { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.hub-miss small { display: block; color: rgba(255, 255, 255, .55); font-size: 11px; }
.hub-miss b { font-size: 12px; white-space: nowrap; }
.hub-zone-ring { cursor: pointer; }
.hub-zone-ring svg { display: block; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .45)); }
.hub-zone-ring b { position: absolute; left: 50%; top: 64px; transform: translateX(-50%); white-space: nowrap; padding: 3px 10px; border-radius: 99px; background: rgba(16, 10, 30, .9); border: 1px solid rgba(255, 255, 255, .22); color: #fff; font: 700 11px Inter, Montserrat, sans-serif; }
.hub-zone-ring.on svg { filter: drop-shadow(0 0 10px #ff50c5); }
.hub-zone-miss { display: grid !important; place-items: center; border-radius: 50%; background: #ff50c5; border: 3px solid #fff; color: #fff; font: 800 12px Inter, sans-serif; box-shadow: 0 0 0 7px rgba(255, 80, 197, .28); }
.hub-zone-me span { display: block; width: 18px; height: 18px; border-radius: 50%; background: #3aa0ff; border: 3px solid #fff; box-shadow: 0 0 0 9px rgba(58, 160, 255, .22); box-sizing: border-box; }

/* ---------- Ricerca globale ---------- */
.hub-cerca { position: fixed; inset: 0; z-index: 3000; background: rgba(5, 3, 12, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); display: flex; justify-content: center; align-items: flex-start; padding-top: 10vh; }
.hub-cerca-box { width: min(680px, calc(100vw - 32px)); max-height: 78vh; display: flex; flex-direction: column; overflow: hidden; color: #fff; font: 400 13px Montserrat, Inter, system-ui, sans-serif; background: rgba(18, 12, 32, .94); -webkit-backdrop-filter: blur(28px); backdrop-filter: blur(28px); border: 1px solid rgba(255, 255, 255, .16); border-radius: 18px; box-shadow: 0 24px 80px rgba(0, 0, 0, .55); }
.hub-cerca-in { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.hub-cerca-in svg { color: #ff50c5; flex: none; }
.hub-cerca-in input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: #fff; font: 600 20px Montserrat, Inter, sans-serif; caret-color: #ff50c5; }
.hub-cerca-in input::placeholder { color: rgba(255, 255, 255, .4); font-weight: 500; font-size: 16px; }
.hub-cerca-in input::-webkit-search-cancel-button { display: none; }
.hub-cerca-tabs { display: flex; gap: 6px; padding: 10px 18px 4px; overflow-x: auto; scrollbar-width: none; }
.hub-cerca-tabs button { flex: none; padding: 6px 12px; border-radius: 99px; cursor: pointer; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); color: #fff; font: 600 12px Montserrat, Inter, sans-serif; }
.hub-cerca-tabs button.on { background: #ff50c5; border-color: #ff50c5; box-shadow: 0 0 16px rgba(255, 80, 197, .5); }
.hub-cerca-list { overflow-y: auto; padding-bottom: 6px; scrollbar-width: thin; scrollbar-color: rgba(255, 80, 197, .45) transparent; }
.hub-cerca-g { padding: 12px 18px 4px; font-size: 11px; letter-spacing: 1.4px; font-weight: 700; color: rgba(255, 255, 255, .5); }
.hub-cerca-r { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 18px; border: 0; border-left: 3px solid transparent; background: none; color: #fff; text-align: left; cursor: pointer; font: inherit; }
.hub-cerca-r:hover { background: rgba(255, 255, 255, .05); }
.hub-cerca-r.sel { background: rgba(255, 80, 197, .16); border-left-color: #ff50c5; }
.hub-cerca-r > i { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 16px; font-style: normal; }
.hub-cerca-r > span { flex: 1; min-width: 0; }
.hub-cerca-r b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-cerca-r small { display: block; color: rgba(255, 255, 255, .6); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-cerca-r em { flex: none; font-style: normal; font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .2); }
.hub-cerca-foot { display: flex; gap: 16px; padding: 10px 18px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 12px; color: rgba(255, 255, 255, .55); }
.hub-cerca-foot .r { margin-left: auto; }
.hub-cerca-filtro { margin: 10px 18px 0; padding: 8px 12px; border-radius: 10px; background: rgba(255, 80, 197, .14); font-size: 13px; }
.hub-cerca-filtro button { margin-left: 8px; background: none; border: 0; color: #ff50c5; cursor: pointer; font: 700 12px Montserrat, sans-serif; }

/* ---------- Novità ---------- */
.hub-nov { margin-top: 10px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); }
.hub-nov.nuovo { border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, transparent); }
.hub-nov header { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; }
.hub-nov header span { font-weight: 800; letter-spacing: .8px; color: var(--c); }
.hub-nov header i { font-style: normal; margin-left: 4px; padding: 1px 6px; border-radius: 99px; background: var(--c); color: #fff; letter-spacing: .4px; }
.hub-nov header time { color: rgba(255, 255, 255, .55); white-space: nowrap; }
.hub-nov h5 { margin: 5px 0 2px; font-size: 14px; }
.hub-nov p { margin: 0; color: rgba(255, 255, 255, .62); font-size: 12px; }
.hub-nov .hub-row { margin: 8px 0 0; }
.hub-nov .hub-pill { border-color: var(--c); }
.hub-nov-pin span { position: absolute; left: -14px; top: -14px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--c); border: 3px solid #fff; color: #fff; font: 800 12px Inter, sans-serif; box-shadow: 0 0 0 10px color-mix(in srgb, var(--c) 22%, transparent); box-sizing: border-box; }
.hub-nov-pin.nuovo span { animation: hub-pulse 1.8s ease-out infinite; }
.hub-nov-pin b { position: absolute; left: 20px; top: -44px; white-space: nowrap; padding: 5px 12px; border-radius: 99px; background: rgba(16, 10, 30, .92); border: 1px solid var(--c); color: #fff; font: 600 12px Inter, Montserrat, sans-serif; }
.hub-nov-pin b em { font-style: normal; font-weight: 800; color: var(--c); margin-right: 4px; font-size: 11px; }
@keyframes hub-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 55%, transparent); } 100% { box-shadow: 0 0 0 18px transparent; } }

/* ---------- Condividi ---------- */
.hub-modal { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; background: rgba(5, 3, 12, .55); padding: 16px; }
.hub-share { display: flex; gap: 24px; width: min(780px, 100%); max-height: calc(100dvh - 32px); overflow: auto; padding: 8px 24px 24px 6px; color: #fff; font: 400 13px Montserrat, Inter, system-ui, sans-serif; background: rgba(18, 12, 32, .95); -webkit-backdrop-filter: blur(28px); backdrop-filter: blur(28px); border: 1px solid rgba(255, 255, 255, .16); border-radius: 20px; box-shadow: 0 24px 80px rgba(0, 0, 0, .55); box-sizing: border-box; }
.hub-share-main { flex: 1; min-width: 0; }
.hub-share .hub-head { padding-left: 18px; }
.hub-share-main > :not(.hub-head) { margin-left: 18px; }
.hub-card { border-radius: 14px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .14); background: #120c22; }
.hub-card-img { position: relative; height: 190px; background: #1d3f63 center / cover no-repeat; }
.hub-card-brand { position: absolute; left: 10px; top: 10px; padding: 4px 8px; border-radius: 6px; background: rgba(0, 0, 0, .6); font: 800 11px Montserrat, sans-serif; }
.hub-card-pin { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: #ff50c5; border: 3px solid #fff; box-shadow: 0 0 0 10px rgba(255, 80, 197, .3); box-sizing: border-box; }
.hub-card-img.foto .hub-card-pin { display: none; }
.hub-card-txt { padding: 10px 12px; }
.hub-card-txt small { display: block; color: rgba(255, 255, 255, .6); font-size: 11px; }
.hub-card-txt b { display: block; font-size: 14px; margin: 1px 0; }
.hub-share-link { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 6px 6px 6px 12px; border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); }
.hub-share-link input { flex: 1; min-width: 0; background: none; border: 0; color: #fff; font: 500 13px Montserrat, Inter, sans-serif; outline: none; }
.hub-share-apps { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 12px 18px; }
.hub-share-apps button { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 5px; border-radius: 99px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); color: #fff; cursor: pointer; font: 600 12px Montserrat, Inter, sans-serif; }
.hub-share-apps button:hover { border-color: #ff50c5; }
.hub-share-apps i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 13px; }
.hub-share-apps .solo-tel { display: none; }
.hub-share-qr { width: 210px; flex: none; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 54px 0 0 22px; border-left: 1px solid rgba(255, 255, 255, .1); }
.hub-share-qr .hub-qr { border-radius: 12px; }
.hub-share-qr small { color: rgba(255, 255, 255, .6); }

/* ---------- Diario ---------- */
.hub-dia-mid { display: grid; grid-template-columns: auto 1fr; gap: 28px; }
.hub-cal { display: flex; gap: 4px; margin-top: 8px; }
.hub-cal > div { display: flex; flex-direction: column; gap: 4px; }
.hub-cal i, .hub-cal-leg i { display: block; width: 16px; height: 16px; border-radius: 4px; background: rgba(255, 255, 255, .07); }
.hub-cal i.l1, .hub-cal-leg i.l1 { background: rgba(255, 80, 197, .32); }
.hub-cal i.l2, .hub-cal-leg i.l2 { background: rgba(255, 80, 197, .62); }
.hub-cal i.l3, .hub-cal-leg i.l3 { background: #ff50c5; }
.hub-cal i.l-1 { background: transparent; }
.hub-cal-leg { display: flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 11px; color: rgba(255, 255, 255, .55); }
.hub-cal-leg i { width: 12px; height: 12px; }
.hub-mom { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; }
.hub-mom li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid rgba(255, 255, 255, .07); }
.hub-mom i { font-style: normal; font-size: 20px; }
.hub-mom b { display: block; font-size: 13px; }
.hub-mom small { display: block; color: rgba(255, 255, 255, .6); font-size: 12px; }

/* ---------- Mappa di calore ---------- */
.hub-heat { pointer-events: none; }
.leaflet-container.hub-solo-calore .leaflet-marker-pane > .leaflet-marker-icon:not(.hub-it-pin):not(.hub-it-leg):not(.hub-zone-ring):not(.hub-zone-miss):not(.hub-nov-pin):not(.hub-zone-me),
.leaflet-container.hub-solo-calore .leaflet-tooltip-pane { opacity: 0; pointer-events: none; }
.hub-opts { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.hub-opt { padding: 10px 12px; border-radius: 12px; text-align: left; cursor: pointer; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); color: #fff; font: 600 13px Montserrat, Inter, sans-serif; }
.hub-opt.on { background: rgba(255, 80, 197, .18); border-color: #ff50c5; }
.hub-heat-leg { height: 12px; border-radius: 99px; margin: 8px 0 4px; background: linear-gradient(90deg, #3c28c8, #7c5cff, #ff50c5, #ff8c50, #fff0a0); }
.hub-panel input[type=range] { width: 100%; accent-color: #ff50c5; }
.hub-switch { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; cursor: pointer; margin: 6px 0; }
.hub-switch input { position: absolute; opacity: 0; }
.hub-switch span { width: 42px; height: 24px; border-radius: 99px; background: rgba(255, 255, 255, .2); position: relative; transition: background .2s; }
.hub-switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.hub-switch input:checked + span { background: #ff50c5; }
.hub-switch input:checked + span::after { transform: translateX(18px); }

/* ---------- Ultra wide: tutto un po' più grande ---------- */
@media (width >= 2400px) {
  .hub-panel { width: 440px; font-size: 14px; }
  .hub-panel.hub-wide { width: 820px; }
  .hub-head h3 { font-size: 26px; }
}

/* ---------- Tablet e telefono: pannelli come foglio dal basso ---------- */
@media (width <= 900px) {
  .hub-panel, .hub-panel.hub-wide { left: 0 !important; right: 0; top: auto; bottom: 0; width: 100%; max-height: 72dvh; border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .hub-panel.hub-wide { max-height: 88dvh; }
  .hub-head::before { content: ""; position: absolute; left: 50%; top: 7px; width: 42px; height: 5px; margin-left: -21px; border-radius: 9px; background: rgba(255, 255, 255, .3); }
  .hub-head { padding-top: 20px; }
  .hub-kpis.four { grid-template-columns: 1fr 1fr; }
  .hub-dia-mid { grid-template-columns: 1fr; gap: 6px; }
  .hub-cerca { padding: 0; align-items: stretch; }
  .hub-cerca-box { width: 100%; max-height: none; height: 100dvh; border-radius: 0; border: 0; padding-top: env(safe-area-inset-top); }
  .hub-cerca-foot { display: none; }
  .hub-cerca-r { padding-top: 10px; padding-bottom: 10px; }
  .hub-modal { align-items: end; padding: 0; }
  .hub-share { flex-direction: column; gap: 0; width: 100%; border-radius: 22px 22px 0 0; padding: 4px 18px calc(18px + env(safe-area-inset-bottom)); max-height: 92dvh; }
  .hub-share .hub-head { padding-left: 0; padding-right: 0; }
  .hub-share-main > :not(.hub-head), .hub-share-apps { margin-left: 0; }
  .hub-share-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 10px 4px; }
  .hub-share-apps button { flex-direction: column; gap: 6px; padding: 0; border: 0; background: none; font-size: 11px; color: rgba(255, 255, 255, .85); }
  .hub-share-apps i { width: 50px; height: 50px; border-radius: 16px; font-size: 22px; }
  .hub-share-apps .solo-tel { display: inline-flex; }
  .hub-share-qr { display: none; width: auto; padding: 14px 0 0; border: 0; }
  .hub-share.qr-on .hub-share-qr { display: flex; }
  .hub-toast { bottom: calc(env(safe-area-inset-bottom) + 90px); }
}
@media (width <= 600px) {
  .hub-mom { grid-template-columns: 1fr; }
  .hub-cal i { width: 13px; height: 13px; }
  .hub-cal, .hub-cal > div { gap: 3px; }
  .hub-zrow { grid-template-columns: 104px 1fr 48px; }
}

/* Zone: marker dell'app attenuati mentre il pannello è aperto */
.leaflet-container.hub-dim .leaflet-marker-pane > .leaflet-marker-icon:not(.hub-it-pin):not(.hub-it-leg):not(.hub-zone-ring):not(.hub-zone-miss):not(.hub-nov-pin):not(.hub-zone-me) { opacity: .28; }
.leaflet-container.hub-dim .leaflet-tooltip-pane { opacity: .3; }
.hub-link.small { font-size: 12px; color: #ff50c5; margin: 2px 6px 6px; }

/* Novità: collegamento alla pagina notizie del bot */
.hub-nov-wa { display: flex; width: 100%; margin: 4px 0 10px; box-sizing: border-box; }
