@font-face { font-family: 'Montserrat'; src: url('fonts/montserrat.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Atkinson'; src: url('fonts/atkinson-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Atkinson'; src: url('fonts/atkinson-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --ice: #eef2f8; --paper: #fbfcfe; --ink: #0f1f36; --ink-2: #4d5d75; --line: #d5dde9;
  --deep: #0a1a33; --deep-2: #13294a; --sea: #0d438b; --sea-hi: #8fb4ec;
  --ok: #17703f; --ok-bg: #dcf1e4; --bad: #b3261e; --bad-bg: #fbe5e2; --amber: #8a5300; --amber-bg: #fbefd2;
  --display: 'Montserrat', system-ui, sans-serif; --body: 'Atkinson', system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body { font: 17px/1.45 var(--body); color: var(--ink); background: var(--ice); -webkit-text-size-adjust: 100%; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.01em; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--sea-hi); outline-offset: 2px; }
[hidden] { display: none !important; }
a { color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- testata */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--safe-t)) 14px 10px; background: var(--deep); color: #e8eef8; }
.brand { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.brand .mark { width: 34px; height: auto; flex: none; }
.brand .word { width: 112px; height: auto; flex: none; }
.brand .mark { margin-right: 4px; }
.brand .sname { font: 700 13px var(--display); letter-spacing: .06em; text-transform: uppercase; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bell { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 21px; border: 2px solid #33455c; background: transparent; color: #ced8e5; font-weight: 700; font-size: 14px; flex: none; }
.bell.on { border-color: var(--sea-hi); color: #fff; background: rgba(143, 180, 236, .16); }
.bell:disabled { opacity: .6; }

#root { max-width: 640px; margin: 0 auto; padding: 14px 14px calc(28px + var(--safe-b)); }
.notice { background: var(--amber-bg); color: #4a2e00; border: 1px solid #ecd49a; border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; font-size: 15px; }
.notice b { font-weight: 700; }

/* ---- sezioni */
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; background: #dfe6f1; border-radius: 14px; margin-bottom: 14px; }
.tabs button { min-height: 46px; border: 0; border-radius: 10px; background: transparent; font: 700 15px var(--display); color: var(--ink-2); }
.tabs button[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(10, 26, 51, .15); }

.list { display: grid; gap: 12px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: grid; gap: 10px; }
.card.hl { border-color: var(--sea); box-shadow: 0 0 0 3px rgba(13, 67, 139, .18); }
.card h2 { font-size: 20px; line-height: 1.2; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; color: var(--ink-2); font-size: 14px; }
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 12px; background: #e3ebf7; color: var(--sea); font: 700 12px var(--display); letter-spacing: .02em; }
.chip.new { background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--amber-bg); color: var(--amber); }
.text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 12px; border: 2px solid var(--line); background: var(--paper); font-weight: 700; text-decoration: none; }
.btn.primary { background: var(--sea); border-color: var(--sea); color: #fff; }
.btn.danger { color: var(--bad); border-color: #e7b9b5; background: var(--bad-bg); }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 15px; }
.btn:disabled { opacity: .6; }
.btn:active { transform: translateY(1px); }
.pdfrow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--ice); }
.pdfrow .ico { flex: none; width: 36px; height: 44px; border-radius: 6px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; font: 800 11px var(--display); color: var(--bad); }
.pdfrow .nm { min-width: 0; flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdfrow small { display: block; color: var(--ink-2); font-weight: 400; }
.empty { text-align: center; color: var(--ink-2); padding: 36px 12px; border: 2px dashed var(--line); border-radius: 16px; }
.foot { text-align: center; color: var(--ink-2); font-size: 14px; margin: 26px 8px 0; }

/* ---- pagina admin */
.login { min-height: 100vh; background: var(--deep); color: #e8eef8; padding: calc(40px + var(--safe-t)) 24px 40px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.login .logo { width: 170px; max-width: 55vw; height: auto; margin-top: 10px; }
.login h1 { font-size: 28px; margin-top: 10px; }
.login form { display: grid; gap: 14px; width: 100%; max-width: 380px; }
.field { display: grid; gap: 6px; }
.field > span { font-weight: 700; font-size: 15px; }
.login .field > span { color: #b6c4da; }
.field input, .field textarea { min-height: 52px; border-radius: 12px; border: 2px solid var(--line); background: #fff; padding: 10px 14px; width: 100%; }
.field textarea { min-height: 120px; resize: vertical; }
.login .field input { background: #0a111a; border-color: #2b3c53; color: #fff; font-size: 22px; letter-spacing: .15em; text-align: center; height: 58px; }
.login .field input:focus { border-color: var(--sea-hi); outline: none; }
.err { color: var(--bad); font-weight: 700; margin: 0; }
.login .err { color: #ff9c94; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: grid; gap: 14px; margin-bottom: 14px; }
.panel h2 { font-size: 19px; }
.stats { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.stats .pill { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pubok { background: var(--ok-bg); color: var(--ok); border-radius: 12px; padding: 10px 12px; font-weight: 700; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.toast { position: fixed; left: 50%; bottom: calc(20px + var(--safe-b)); transform: translateX(-50%); background: var(--deep); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 700; max-width: 90vw; z-index: 20; box-shadow: 0 6px 20px rgba(0, 0, 0, .3); }
.toast.bad { background: var(--bad); }
@media (prefers-reduced-motion: no-preference) { .toast { animation: up .2s ease-out; } @keyframes up { from { opacity: 0; transform: translate(-50%, 8px); } } }
@media (max-width: 520px) { .bell span { display: none; } .bell { width: 44px; padding: 0; justify-content: center; } }
.notice .btn { margin-top: 8px; }
.sec { margin: 22px 2px 10px; font-size: 18px; }
.formgrid { display: grid; gap: 14px; }

/* ---- ordine su WhatsApp */
.btn.wa { background: #1c8f4e; border-color: #1c8f4e; color: #fff; }
.btn.big { min-height: 58px; font-size: 18px; border-radius: 14px; }
.orderbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; padding: 10px 14px calc(10px + var(--safe-b)); background: linear-gradient(to top, var(--ice) 70%, rgba(238, 242, 248, 0)); display: flex; justify-content: center; }
.orderbar .btn { width: 100%; max-width: 612px; box-shadow: 0 6px 18px rgba(10, 26, 51, .28); }
body.hasbar #root { padding-bottom: calc(96px + var(--safe-b)); }
.tabs.main { margin: 0 0 14px; }
.hint { color: var(--ink-2); font-size: 14px; margin: 0; }

/* ---- contenuti lunghi: la pagina non deve mai essere più larga dello schermo */
html, body { overflow-x: hidden; max-width: 100%; }
.list, .card, .panel, .formgrid { grid-template-columns: minmax(0, 1fr); }
.list > *, .card > *, .panel > *, .formgrid > *, .meta > *, .pubok > * { min-width: 0; }
.card h2, .panel h2, .meta { overflow-wrap: anywhere; }
.pdfrow .nm small { overflow: hidden; text-overflow: ellipsis; }
.actions .btn { max-width: 100%; }

/* ---- invio notifica: barra di avanzamento */
.overlay { position: fixed; inset: 0; z-index: 30; background: rgba(10, 26, 51, .6); display: grid; place-items: center; padding: 16px; }
.dialog { width: 100%; max-width: 420px; background: var(--paper); border-radius: 18px; padding: 22px 20px; display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); box-shadow: 0 16px 48px rgba(0, 0, 0, .35); }
.dialog h2 { font-size: 21px; }
.dialog.bad h2 { color: var(--bad); }
.dialog .hint { overflow-wrap: anywhere; }
.bar { display: flex; height: 22px; border-radius: 11px; background: #dfe6f1; overflow: hidden; }
.bar .seg { height: 100%; transition: width .3s ease; }
.bar .seg.ok { background: var(--ok); }
.bar .seg.ko { background: var(--bad); }
.sendstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.sendstats .st { background: var(--ice); border-radius: 12px; padding: 10px 4px; display: grid; gap: 2px; }
.sendstats b { font: 800 26px var(--display); }
.sendstats span { font-size: 13px; color: var(--ink-2); }
.sendstats .ok b { color: var(--ok); }
.sendstats .ko b { color: var(--bad); }
@media (prefers-reduced-motion: reduce) { .bar .seg { transition: none; } }

/* ---- registrazione e pagina clienti */
.notice.reg { background: #e3ebf7; color: var(--deep); border-color: #bfd0e8; }
.tabs.main { grid-template-columns: repeat(3, 1fr); }
.tabs.main button { font-size: 14px; padding: 0 4px; }
.client .meta a { font-weight: 700; color: var(--sea); }
.dialog .actions .btn { flex: 1; }

.overlay.locked { background: var(--deep); }
.overlay.locked .dialog { max-height: calc(100vh - 32px); overflow-y: auto; }

.dialog .text { margin: 0; }
.howto { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.dialog .actions { display: grid; grid-template-columns: 1fr; }

/* =====================================================================
   Vetrina clienti: «il banco del mercato di oggi»
   blu notte del marchio, conchiglia incisa, scontrini da staccare
   ===================================================================== */
html:has(body.shop) { background: #071a36; }
.shop {
  --page: #071a36; --foam: #e8f1fb; --pearl: #f6f9fd; --aqua: #8fd3ff; --coral: #ff6b4a; --coral-ink: #b8321a;
  background: var(--page); color: var(--foam);
}

/* testata fissa in vetro */
.shop .top { background: rgba(7, 26, 54, .72); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); border-bottom: 1px solid rgba(143, 180, 236, .14); }
.shop .bell { border-color: rgba(143, 180, 236, .35); color: #d4e3f6; }
.shop .bell.on { border-color: var(--aqua); background: rgba(143, 211, 255, .16); color: #fff; }

/* hero: saluto, data in grande e conchiglia che emerge */
.hero { position: relative; overflow: hidden; background: radial-gradient(110% 95% at 88% -10%, #2a73c9 0%, #134682 34%, #0a2a52 62%, #071a36 100%); }
.hero-in { position: relative; max-width: 640px; margin: 0 auto; padding: 28px 18px 70px; min-height: 250px; }
.hero .shell { position: absolute; right: -64px; top: -14px; width: 330px; max-width: 80vw; height: auto; opacity: .24; pointer-events: none; -webkit-mask-image: linear-gradient(to bottom, #000 50%, transparent 100%); mask-image: linear-gradient(to bottom, #000 50%, transparent 100%); }
.hero .hello { position: relative; margin: 0 0 10px; color: var(--aqua); font-size: 17px; font-weight: 700; min-height: 1.4em; }
.hero h1 { position: relative; font-size: clamp(46px, 15vw, 78px); line-height: .94; letter-spacing: -.04em; color: #fff; text-shadow: 0 2px 30px rgba(7, 26, 54, .5); }
.hero h1 span { display: block; font-weight: 200; }
.hero h1 b { display: block; font-weight: 800; }
.hero-sum { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; min-height: 36px; }
.sumchip { display: inline-flex; align-items: center; gap: 5px; height: 36px; padding: 0 15px; border-radius: 18px; border: 1px solid rgba(143, 211, 255, .38); background: rgba(255, 255, 255, .08); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font: 600 14px var(--display); color: #fff; }
.sumchip b { font-weight: 800; color: var(--aqua); font-size: 16px; }
.waves { position: absolute; left: 0; right: 0; bottom: -1px; height: 48px; pointer-events: none; }
.waves i { position: absolute; left: 0; right: 0; bottom: 0; height: 48px; background-repeat: repeat-x; background-size: 480px 48px; }
.waves .a { bottom: 7px; opacity: .8; background-image: url(brand/wave-a.svg); }
.waves .b { background-image: url(brand/wave-b.svg); }

/* sezioni */
.shop #root { padding-top: 6px; }
.shop .tabs { background: none; padding: 0; gap: 0; border-radius: 0; border-bottom: 1px solid rgba(143, 180, 236, .2); margin: 8px 0 22px; }
.shop .tabs button { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; border-radius: 0; background: none; box-shadow: none; color: rgba(232, 241, 251, .55); font: 700 15px var(--display); }
.shop .tabs button[aria-selected="true"] { background: none; box-shadow: none; color: #fff; }
.shop .tabs button[aria-selected="true"]::after { content: ''; position: absolute; left: 12%; right: 12%; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: linear-gradient(90deg, var(--aqua), #4f93ee); }
.tabs .n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: rgba(143, 180, 236, .2); color: #fff; font: 800 12px/22px var(--display); text-align: center; }
.tabs .n:empty { display: none; }
.shop .tabs button[aria-selected="true"] .n { background: var(--coral); }

.shop .notice { background: rgba(143, 180, 236, .12); border: 1px solid rgba(143, 180, 236, .3); color: var(--foam); border-radius: 16px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.shop .notice.reg { background: rgba(143, 180, 236, .12); color: var(--foam); border-color: rgba(143, 180, 236, .3); }
.shop .btn.primary { background: linear-gradient(135deg, #2279e0, #0d438b); border-color: transparent; color: #fff; }

/* offerta = scontrino con bordo perforato */
.shop .list { gap: 20px; }
.shop .card { position: relative; padding: 0; gap: 0; border: 0; border-radius: 20px; background: var(--pearl); color: var(--ink); box-shadow: 0 22px 40px -22px rgba(0, 0, 0, .8); }
.tk-head { position: relative; display: grid; gap: 11px; grid-template-columns: minmax(0, 1fr); padding: 20px 20px 20px; overflow: hidden; border-radius: 20px 20px 0 0; }
.card.solo .tk-head { border-radius: 20px; }
.tk-head::before { content: ''; position: absolute; right: -28px; top: -20px; width: 160px; height: 141px; background: url(brand/shell.png) center / contain no-repeat; filter: invert(1); opacity: .075; pointer-events: none; }
.tk-head > * { position: relative; min-width: 0; }
.shop .card h2 { font-size: 25px; line-height: 1.12; letter-spacing: -.02em; font-weight: 800; color: #0a1f3d; }
.shop .card .text { font-size: 17px; color: #2c3d57; }
.shop .card .meta { gap: 8px 10px; }
.when { font: 600 13px var(--display); color: #5d6f89; }
.shop .chip { height: 26px; padding: 0 11px; border-radius: 13px; }
.chip.until { background: #e1ebf8; color: #0d438b; }
.shop .chip.new { background: var(--coral); color: #fff; gap: 6px; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.stamp { display: inline-block; padding: 3px 10px; border: 2.5px solid var(--coral-ink); border-radius: 7px; color: var(--coral-ink); font: 800 13px var(--display); letter-spacing: .02em; transform: rotate(-3deg); }
.perf { position: relative; height: 0; margin: 0 20px; border-top: 2px dashed #c0cfe2; }
.perf::before, .perf::after { content: ''; position: absolute; top: -12px; width: 24px; height: 24px; border-radius: 50%; background: var(--page); }
.perf::before { left: -32px; }
.perf::after { right: -32px; }
.tk-foot { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); padding: 18px 20px 20px; border-radius: 0 0 20px 20px; background: linear-gradient(#e9f0f9, var(--pearl)); }
.tk-foot > * { min-width: 0; }
.shop .btn.wa { width: 100%; min-height: 54px; border: 0; border-radius: 14px; background: linear-gradient(135deg, #25c06c, #12803f); font-size: 16px; box-shadow: 0 10px 20px -10px rgba(18, 128, 63, .9); }
.shop .pdfrow { background: #e1ebf8; }

/* annuncio = messaggio sulla lavagna */
.shop .card.ann { background: linear-gradient(160deg, rgba(143, 180, 236, .2), rgba(143, 180, 236, .06)); border: 1px solid rgba(143, 180, 236, .26); color: var(--foam); box-shadow: none; }
.card.ann::after { content: ''; position: absolute; left: -1px; top: 22px; bottom: 22px; width: 4px; border-radius: 0 4px 4px 0; background: linear-gradient(var(--aqua), #4f93ee); }
.card.ann .tk-head::before { filter: none; opacity: .09; }
.shop .card.ann h2 { color: #fff; font-size: 22px; }
.shop .card.ann .text { color: #d3e0f1; }
.card.ann .when { color: #9fb6d6; }
.card.ann .chip.until { background: rgba(143, 180, 236, .2); color: var(--aqua); }
.card.ann .perf { border-top-color: rgba(143, 180, 236, .3); }
.card.ann .perf::before, .card.ann .perf::after { display: none; }
.card.ann .tk-foot { background: rgba(7, 26, 54, .25); }
.card.ann .pdfrow { background: rgba(255, 255, 255, .08); }
.card.ann .pdfrow .nm { color: #fff; }
.card.ann .pdfrow small { color: #9fb6d6; }
.shop .card.hl { box-shadow: 0 0 0 3px var(--aqua), 0 0 40px 2px rgba(143, 211, 255, .5); }

.shop .empty { position: relative; border: 1.5px dashed rgba(143, 180, 236, .32); color: #b7c9e2; border-radius: 20px; padding: 28px 22px 34px; }
.shop .empty::before { content: ''; display: block; height: 92px; margin: 0 auto 14px; background: url(brand/shell.png) center / contain no-repeat; opacity: .42; }
.shop .foot { color: #8ea6c9; display: grid; justify-items: center; gap: 10px; margin-top: 34px; }
.shop .foot::before { content: ''; width: 44px; height: 39px; background: url(brand/shell.png) center / contain no-repeat; opacity: .38; }

.shop .orderbar { background: linear-gradient(to top, var(--page) 60%, rgba(7, 26, 54, 0)); }
.shop .orderbar .btn { box-shadow: 0 12px 28px -8px rgba(18, 128, 63, .85); }

/* finestre (registrazione, notifiche, installazione) */
.shop .dialog { position: relative; z-index: 1; border-radius: 24px; background: var(--pearl); }
.shop .overlay { background: rgba(4, 14, 30, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.shop .overlay.locked { background: radial-gradient(120% 80% at 85% 0%, #2a73c9 0%, #134682 38%, #071a36 78%); }
.shop .overlay.locked::before { content: ''; position: absolute; top: 5vh; right: -56px; width: 300px; height: 265px; background: url(brand/shell.png) center / contain no-repeat; opacity: .16; pointer-events: none; }

/* movimento: la conchiglia emerge, il mare scorre piano, le carte entrano una dopo l'altra */
@media (prefers-reduced-motion: no-preference) {
  .hero .shell { animation: surface 1.8s cubic-bezier(.2, .7, .2, 1) both; transform-origin: 62% 70%; }
  @keyframes surface { from { opacity: 0; transform: translateY(26px) rotate(-9deg) scale(.94); } to { opacity: .24; transform: none; } }
  .waves .a { animation: drift 15s linear infinite reverse; }
  .waves .b { animation: drift 23s linear infinite; }
  @keyframes drift { to { background-position-x: 480px; } }
  .list.enter .card { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
  .list.enter .card:nth-child(1) { animation-delay: var(--d0, 0ms); }
  .list.enter .card:nth-child(2) { animation-delay: var(--d1, 0ms); }
  .list.enter .card:nth-child(3) { animation-delay: var(--d2, 0ms); }
  .list.enter .card:nth-child(4) { animation-delay: var(--d3, 0ms); }
  .list.enter .card:nth-child(5) { animation-delay: var(--d4, 0ms); }
  .list.enter .card:nth-child(n+6) { animation-delay: var(--d5, 0ms); }
  @keyframes rise { from { opacity: 0; transform: translateY(34px) scale(.97); } to { opacity: 1; transform: none; } }
  .chip .dot { animation: ping 1.8s ease-out infinite; }
  @keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .8); } 80%, 100% { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); } }
}
.shop .tabs button { white-space: nowrap; }

/* finestre: testo scuro su carta; nella registrazione obbligatoria il vetro scuro con i testi azzurri del saluto */
.shop .dialog { color: var(--ink); }
.shop .overlay.locked .dialog { background: rgba(7, 26, 54, .55); border: 1px solid rgba(143, 211, 255, .3); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: var(--aqua); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .7); }
.shop .overlay.locked .dialog h2, .shop .overlay.locked .dialog .hint, .shop .overlay.locked .dialog .field > span, .shop .overlay.locked .dialog .text { color: var(--aqua); }
.shop .overlay.locked .dialog .err { color: #ffb4a9; }
.shop .overlay.locked .dialog .field input { background: rgba(255, 255, 255, .95); border-color: transparent; color: var(--ink); }
.shop .overlay.locked .dialog .field input:focus { outline: 3px solid var(--aqua); outline-offset: 1px; }
.shop .btn.primary { background-origin: border-box; border: 0; }
/* pulsanti pieni: niente bordo (con il bordo trasparente il gradiente si ripeteva e lasciava un filo rotto) */
.shop .btn.primary, .shop .btn.wa { border: 0; background-origin: border-box; background-clip: border-box; background-repeat: no-repeat; background-color: #0d438b; }
.shop .btn.wa { background-color: #12803f; }
.shop .btn.small { padding: 0 16px; }

/* pulsante notifiche: lo stato si capisce a colpo d'occhio (da attivare / attive / bloccate) */
.shop .bell { gap: 8px; height: 44px; width: auto; padding: 0 16px 0 12px; border: 0; border-radius: 22px; font: 800 14px var(--display); white-space: nowrap; color: #06224a; background: linear-gradient(135deg, #b9e6ff, #6fbcf5); box-shadow: 0 6px 18px -6px rgba(111, 188, 245, .9); }
.shop .bell span { display: inline; }
.bell .chk, .bell .slash { display: none; }
.shop .bell.on { color: #fff; background: rgba(37, 192, 108, .16); box-shadow: inset 0 0 0 2px #3fd488; }
.bell.on .chk { display: block; }
.bell.on .bi { color: #3fd488; }
.shop .bell.blocked { color: #ffd2cb; background: rgba(255, 107, 74, .14); box-shadow: inset 0 0 0 2px #ff8a73; }
.bell.blocked .slash { display: block; }
.shop .bell:disabled { color: #9fb6d6; background: rgba(143, 180, 236, .12); box-shadow: inset 0 0 0 2px rgba(143, 180, 236, .3); opacity: 1; }
.shop .bell:not(.on):not(.blocked):not(:disabled) .bi { transform-origin: 50% 10%; }
@media (prefers-reduced-motion: no-preference) {
  .shop .bell:not(.on):not(.blocked):not(:disabled) .bi { animation: ring 4s ease-in-out infinite; }
  @keyframes ring { 0%, 70%, 100% { transform: none; } 74% { transform: rotate(16deg); } 78% { transform: rotate(-14deg); } 82% { transform: rotate(10deg); } 86% { transform: rotate(-7deg); } 90% { transform: rotate(3deg); } }
}
@media (max-width: 520px) { .shop .bell { width: auto; padding: 0 14px 0 11px; font-size: 13px; } .shop .bell span { display: inline; } }

/* admin: tabella «chi ha visto» */
.dialog.wide { max-width: 760px; max-height: calc(100vh - 32px); overflow-y: auto; }
.aud-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.fchip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 20px; border: 2px solid var(--line); background: var(--paper); font: 700 14px var(--display); }
.fchip b { min-width: 22px; height: 22px; border-radius: 11px; background: #e3ebf7; color: var(--sea); font: 800 12px/22px var(--display); text-align: center; }
.fchip.on { background: var(--deep); border-color: var(--deep); color: #fff; }
.fchip.on b { background: rgba(255, 255, 255, .2); color: #fff; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; margin-top: 12px; }
table.aud { width: 100%; border-collapse: collapse; font-size: 15px; }
table.aud th { position: sticky; top: 0; text-align: left; padding: 10px 12px; background: #e9eff8; font: 800 13px var(--display); color: var(--ink-2); white-space: nowrap; }
table.aud td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
table.aud td.nm { font-weight: 700; overflow-wrap: anywhere; }
table.aud td a { color: var(--sea); font-weight: 700; text-decoration: none; white-space: nowrap; }
.numsm { display: none; font-weight: 400; font-size: 13px; }
.st-badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font: 700 12px var(--display); white-space: nowrap; }
.st-badge.ok { background: var(--ok-bg); color: var(--ok); }
.st-badge.bad { background: var(--bad-bg); color: var(--bad); }
.st-badge.warn { background: var(--amber-bg); color: var(--amber); }
.st-badge.idle { background: #e6ebf3; color: var(--ink-2); }
.dialog .actions.row { display: flex; flex-wrap: wrap; }
@media (max-width: 560px) {
  table.aud th.num, table.aud td.num { display: none; }
  table.aud td.nm span { display: block; }
  .numsm { display: block; }
  table.aud th, table.aud td { padding: 9px 8px; }
  table.aud { font-size: 14px; }
}
@media (max-width: 560px) {
  .dialog.wide { padding: 18px 12px; }
  .dialog.wide > h2, .dialog.wide > .hint { padding: 0 4px; }
  .fchip { min-height: 36px; padding: 0 11px; font-size: 13px; gap: 6px; }
  .aud-filters { gap: 6px; }
  table.aud { table-layout: fixed; font-size: 13px; }
  table.aud th:nth-child(1) { width: 37%; }
  table.aud th:nth-child(3), table.aud th:nth-child(4) { width: 31.5%; }
  table.aud th, table.aud td { padding: 8px 6px; }
  .numsm { font-size: 12px; }
  .st-badge { padding: 2px 7px; font-size: 11px; }
  .dialog .actions.row { display: grid; grid-template-columns: 1fr; }
}
