/* Home del portale (12/10/2026): le app come su un telefono, aperte in riquadri che restano vivi (multitasking). */
.home-body { margin: 0; background: var(--bg); overflow: hidden; }
.hm { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.hm-bar { flex: none; display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 12px; background: var(--side); color: var(--side-ink); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.hm-bar .brand { height: 22px; }
.hm-home { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 0; border-radius: 9px; background: rgba(255, 255, 255, .08); color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.hm-home:hover, .hm-home.on { background: rgba(255, 255, 255, .18); }
.hm-home .ic { width: 17px; height: 17px; }
.hm-tabs { flex: 1; min-width: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.hm-tab { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 6px 0 8px; border: 0; border-radius: 9px; background: transparent; color: var(--side-muted); font: inherit; font-size: 13px; cursor: pointer; }
.hm-tab:hover { background: rgba(255, 255, 255, .08); color: var(--side-ink); }
.hm-tab.on { background: rgba(255, 255, 255, .16); color: var(--side-ink); }
.hm-tab .dot { width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; color: #fff; }
.hm-tab .dot .ic { width: 12px; height: 12px; }
.hm-tab .x { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; opacity: .6; }
.hm-tab .x:hover { opacity: 1; background: rgba(255, 255, 255, .15); }
.hm-tab .x .ic { width: 12px; height: 12px; }
.hm-user { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 8px; border: 0; border-radius: 9px; background: transparent; color: inherit; font: inherit; font-size: 13px; cursor: pointer; }
.hm-user:hover { background: rgba(255, 255, 255, .08); }
.hm-menu { position: absolute; right: 10px; top: 46px; z-index: 50; min-width: 220px; padding: 6px; border-radius: 12px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-l); }
.hm-menu button, .hm-menu a { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.hm-menu button:hover, .hm-menu a:hover { background: var(--surface-2); }
.hm-menu small { display: block; padding: 4px 10px 8px; color: var(--muted); }
.hm-stage { flex: 1; min-height: 0; position: relative; }
.hm-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--bg); }
.hm-launcher { position: absolute; inset: 0; overflow: auto; padding: 32px 24px 48px;
  background: radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 60%),
              radial-gradient(900px 500px at 110% 110%, color-mix(in srgb, #ea580c 14%, transparent), transparent 60%), var(--bg); }
.hm-hello { max-width: 980px; margin: 0 auto 26px; }
.hm-hello h1 { margin: 0 0 4px; font-size: 26px; }
.hm-hello p { margin: 0; color: var(--muted); }
.hm-grid { max-width: 980px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 26px 14px; }
.hm-app { position: relative; display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 6px 4px; border: 0; background: none; color: var(--ink); font: inherit; text-align: center; cursor: pointer; border-radius: 16px; }
.hm-app:hover .hm-ic, .hm-app:focus-visible .hm-ic { transform: translateY(-2px) scale(1.04); box-shadow: 0 10px 22px rgba(0, 0, 0, .22); }
.hm-ic { position: relative; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 20px; color: #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, .16); transition: transform .15s, box-shadow .15s;
  background-image: linear-gradient(145deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 55%, rgba(0, 0, 0, .14)); }
.hm-ic .ic { width: 36px; height: 36px; stroke-width: 1.8; }
.hm-app b { font-size: 14px; font-weight: 600; }
.hm-app small { font-size: 11.5px; color: var(--muted); line-height: 1.3; max-width: 130px; }
.hm-badge { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #e11d48; color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
.hm-open-dot { position: absolute; bottom: -9px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--muted); }
.hm-foot { max-width: 980px; margin: 36px auto 0; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; }
.hm-foot .maker { height: 16px; opacity: .7; }
.hm-empty { max-width: 560px; margin: 40px auto; }
@media (max-width: 640px) {
  .hm-launcher { padding: 22px 16px 40px; }
  .hm-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 6px; }
  .hm-ic { width: 60px; height: 60px; border-radius: 16px; }
  .hm-ic .ic { width: 28px; height: 28px; }
  .hm-app small { display: none; }
  .hm-app b { font-size: 12px; }
  .hm-user .name { display: none; }
}
/* telefono: con un'app aperta il riquadro va a tutto schermo; resta una linguetta sul bordo sinistro per la home */
.hm-fab { display: none; position: absolute; z-index: 20; top: 50%; left: env(safe-area-inset-left); width: 22px; height: 58px; margin-top: -29px; padding: 0;
  border-radius: 0 12px 12px 0; border: 0; place-items: center; color: #fff; background: rgba(15, 23, 42, .5); backdrop-filter: blur(6px); cursor: pointer; }
.hm-fab .ic { width: 15px; height: 15px; }
@media (max-width: 640px) {
  .hm.app-on .hm-bar { display: none; }
  .hm.app-on .hm-fab { display: grid; }
  .hm-launcher { padding-top: calc(22px + env(safe-area-inset-top)); }
}
/* vista «vedi come» di un amministratore Muraro: striscia sempre visibile sotto la barra */
.hm-preview { flex: none; display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 4px 12px; background: var(--warn-soft); color: var(--warn); font-size: 13px; border-bottom: 1px solid var(--line); }
.hm-preview .ic { flex: none; width: 17px; height: 17px; }
.hm-preview > span { flex: 1; min-width: 0; }
.hm-preview small { color: var(--ink-2); }
.hm-preview button { flex: none; height: 26px; padding: 0 10px; border: 1px solid currentColor; border-radius: 8px; background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.hm-preview button:hover { background: rgba(0, 0, 0, .06); }
@media (max-width: 640px) { .hm-preview small { display: none; } }
