/* 2.10 Centro notifiche del gestionale (static/centro-notifiche.js): pannello a destra (a tutto schermo sul telefono),
   striscia «N cose da fare» in cima alle pagine, avvisi impilati in basso. Token del gestionale: va anche col tema scuro. */
.nc-dim { position: fixed; inset: 0; z-index: 140; background: rgba(10, 10, 14, .32); }
.nc-dim[hidden], .nc-drawer[hidden], .nc-strip[hidden] { display: none; }
.nc-drawer { position: fixed; z-index: 141; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); display: flex; flex-direction: column;
  background: var(--bg, #F2F2F5); color: var(--ink); box-shadow: -24px 0 60px rgba(0, 0, 0, .22); animation: nc-in .22s ease both; }
@keyframes nc-in { from { transform: translateX(24px); opacity: 0; } }
.nc-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 10px; }
.nc-head strong { font-size: 24px; letter-spacing: -.01em; }
.nc-tabs { display: flex; gap: 6px; margin: 0 20px 12px; padding: 4px; border-radius: 14px; background: var(--surface-2); }
.nc-tabs button { flex: 1; min-height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: inherit; font-weight: 700; font-size: 14.5px; cursor: pointer; }
.nc-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-card); }
.nc-tabs em { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--st-danger); color: #fff; font-style: normal; font-size: 11.5px; }
.nc-tabs em[hidden] { display: none; }
.nc-list { flex: 1; overflow-y: auto; padding: 0 14px 24px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.nc-list[hidden] { display: none; }
.nc-when { margin: 8px 6px 0; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.nc-empty { margin: 30px 16px; color: var(--muted); text-align: center; font-size: 14.5px; line-height: 1.5; }
.nc-item { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 14px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-card); border-left: 4px solid transparent; }
.nc-item.is-urgent { border-left-color: var(--st-danger); }
.nc-item.kind-pronti { border-left-color: var(--st-ready); }
.nc-item.is-taken { opacity: .78; }
.nc-ico { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--surface-2); font-size: 21px; }
.nc-item.is-urgent .nc-ico { background: var(--st-danger-bg); }
.nc-item.kind-pronti .nc-ico { background: var(--st-ready-bg); }
.nc-item.kind-prenotazione .nc-ico { background: var(--st-prep-bg); }
.nc-body { min-width: 0; }
.nc-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.nc-title { font-size: 15.5px; line-height: 1.3; overflow-wrap: anywhere; }
.nc-age { flex: none; color: var(--muted); font-size: 12px; font-weight: 600; }
.nc-label { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.nc-note { margin: 4px 0 0; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); font-size: 13.5px; }
.nc-who { margin: 6px 0 0; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.nc-item.is-mine .nc-who { color: var(--st-danger); }
.nc-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.nc-acts:empty { display: none; }
.nc-acts .button { min-height: 38px; }
.nc-past { box-shadow: none; background: transparent; border: 1px solid var(--line); padding: 10px 12px; }
.nc-past .nc-ico { width: 36px; height: 36px; font-size: 17px; background: color-mix(in srgb, var(--nc-c, #8A8A96) 16%, transparent); }
.nc-past { grid-template-columns: 36px minmax(0, 1fr); }

/* striscia in cima alle pagine */
.nc-strip { position: sticky; top: 8px; z-index: 30; display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 0 16px; padding: 12px 16px; border: 0; border-radius: 16px;
  background: var(--ink); color: var(--surface); font: inherit; font-size: 14.5px; text-align: left; cursor: pointer; box-shadow: 0 10px 26px rgba(0, 0, 0, .18); }
.nc-strip b { flex: none; }
.nc-strip span[data-nc-strip-txt] { flex: 1; min-width: 0; opacity: .78; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nc-strip em { flex: none; font-style: normal; font-weight: 800; }
.nc-strip-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #F5A623; }
.nc-strip.is-urgent .nc-strip-dot { background: #FF453A; animation: nc-pulse 1.4s infinite; }
@keyframes nc-pulse { 70% { box-shadow: 0 0 0 9px rgba(255, 69, 58, 0); } 0% { box-shadow: 0 0 0 0 rgba(255, 69, 58, .55); } }

/* avvisi impilati */
.nc-toasts { position: fixed; z-index: 135; right: 20px; bottom: 20px; width: min(400px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.nc-toast { pointer-events: auto; position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; padding: 12px 40px 12px 12px; border-radius: 16px;
  background: var(--ink); color: var(--surface); box-shadow: 0 16px 36px rgba(0, 0, 0, .3); animation: nc-up .25s ease both; }
@keyframes nc-up { from { transform: translateY(12px); opacity: 0; } }
.nc-toast .nc-ico { width: 40px; height: 40px; background: rgba(255, 255, 255, .12); }
.nc-toast.is-urgent { box-shadow: 0 0 0 2px #FF453A, 0 16px 36px rgba(0, 0, 0, .3); }
.nc-toast-txt { display: flex; flex-direction: column; min-width: 0; font-size: 13.5px; }
.nc-toast-txt b { font-size: 15px; }
.nc-toast-txt span { opacity: .78; }
.nc-toast .nc-acts { grid-column: 2; margin-top: 4px; }
.nc-toast .button-secondary, .app-shell .nc-toast .button-secondary { background: color-mix(in srgb, currentColor 16%, transparent); color: inherit; border-color: transparent; }
.nc-toast .button-primary, .app-shell .nc-toast .button-primary { background: var(--surface); color: var(--ink); border-color: transparent; }   /* 2.28 anche con il tema Notte */
.nc-x { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: inherit; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .nc-drawer, .nc-toast, .nc-strip-dot { animation: none !important; } }

@media (max-width: 900px) {
  .nc-drawer { width: 100vw; }
  .nc-strip { top: 70px; }
  .nc-toasts { left: 16px; right: 16px; width: auto; bottom: calc(96px + env(safe-area-inset-bottom)); }
}
