/* =========================================================
   A Tutta Coda – App soci & staff
   Stesso linguaggio del sito: nero + verde, Fredoka + Inter
   ========================================================= */
:root {
  --bg: #0b0d0c;
  --surface: #141715;
  --surface-2: #1b1f1c;
  --surface-3: #232825;
  --line: #2a302b;
  --line-strong: #3a423c;
  --text: #f2f5f2;
  --muted: #a7b0a9;
  --faint: #868f88;
  --green: #13822f;          /* verde pieno dei pulsanti: testo bianco leggibile (4,9:1) */
  --green-brand: #1ba63a;
  --green-light: #3ccf5c;
  --green-dark: #0f6b26;
  --green-ink: #062b12;
  --green-wash: rgba(27, 166, 58, .14);
  --warn: #f5b84b;
  --warn-wash: rgba(245, 184, 75, .14);
  --danger: #ff6b6b;
  --danger-wash: rgba(255, 107, 107, .13);
  --info: #6cb8ff;
  --radius: 18px;
  --radius-sm: 12px;
  --head: "Fredoka", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 18px 44px rgba(0, 0, 0, .5);
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-drawer: cubic-bezier(.32, .72, 0, 1);
  --nav-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text);
  font: 400 16px/1.55 var(--body); -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none;
}
::selection { background: var(--green); color: #fff; }
img { max-width: 100%; display: block; }
a { color: var(--green-light); text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -.005em; text-wrap: balance; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--green-light); outline-offset: 2px; }
.ph, .ph-bold, .ph-fill { line-height: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.num { font-variant-numeric: tabular-nums; }
.stack { display: grid; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.row--between { justify-content: space-between; }
.wrap-gap { display: flex; flex-wrap: wrap; gap: 8px; }
[hidden] { display: none !important; }

/* ---------- Scrollbar ---------- */
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 8px; }

/* ---------- App shell ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  padding: calc(10px + var(--safe-t)) 16px 10px;
  background: rgba(11, 13, 12, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s ease;
}
.topbar.is-scrolled { border-bottom-color: var(--line); }
.topbar__inner { max-width: 760px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.topbar__logo { height: 34px; width: auto; }
.topbar__actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  display: grid; place-items: center; cursor: pointer; font-size: 1.2rem; color: var(--text);
  transition: background .15s ease, border-color .15s ease, transform .16s var(--ease-out); position: relative;
}
.icon-btn:active { transform: scale(.94); }
.icon-btn .dot { position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--green-light); box-shadow: 0 0 0 2px var(--surface); }
.role-chip { font: 600 .78rem/1 var(--body); padding: 8px 12px; border-radius: 99px; background: var(--green-wash); color: var(--green-light); white-space: nowrap; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }

.app { max-width: 760px; margin: 0 auto; padding: 8px 16px calc(var(--nav-h) + 36px + var(--safe-b)); }
.view { display: none; }
.view.is-active { display: block; animation: viewin .26s var(--ease-out); }
@keyframes viewin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.view__head { padding: 14px 2px 18px; display: grid; gap: 6px; }
.view__head p { color: var(--muted); }

/* ---------- Bottom navigation ---------- */
.tabbar {
  position: fixed; z-index: 40; left: 50%; bottom: calc(12px + var(--safe-b)); translate: -50% 0;
  width: min(560px, calc(100% - 24px)); height: var(--nav-h);
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 6px;
  background: rgba(20, 23, 21, .92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow);
}
.tab {
  border: 0; background: none; cursor: pointer; border-radius: 20px; color: var(--muted);
  display: grid; place-items: center; align-content: center; gap: 3px; font: 600 .7rem/1 var(--body);
  transition: color .15s ease, background .15s ease, transform .16s var(--ease-out); position: relative;
  -webkit-user-select: none; user-select: none; touch-action: manipulation;
}
.tab i { font-size: 1.45rem; }
.tab:active { transform: scale(.94); }
.tab.is-on { color: #fff; background: var(--green); }
.tab .badge { position: absolute; top: 6px; right: calc(50% - 22px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--warn); color: #1d1405; font: 700 .68rem/18px var(--body); text-align: center; }

/* ---------- Surfaces ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.panel + .panel { margin-top: 12px; }
.panel--flush { padding: 0; overflow: hidden; }
.panel__title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.h3 { font-size: 1.15rem; }
.panel__title h2, .panel__title h3 { display: flex; align-items: center; gap: 8px; }
.panel__title h2 i, .panel__title h3 i { color: var(--green-light); font-size: 1.25rem; }
.section-gap { height: 22px; }
.group-label { font: 600 .82rem/1 var(--body); color: var(--muted); margin: 26px 2px 10px; }

details.disclosure { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
details.disclosure + details.disclosure, .panel + details.disclosure, details.disclosure + .panel { margin-top: 12px; }
details.disclosure > summary {
  list-style: none; cursor: pointer; padding: 16px 18px; display: flex; align-items: center; gap: 10px;
  font: 600 1rem/1.3 var(--head); border-radius: var(--radius);
}
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary i:first-child { color: var(--green-light); font-size: 1.25rem; }
details.disclosure > summary::after { content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); rotate: 45deg; translate: 0 -2px; transition: rotate .2s var(--ease-out); }
details.disclosure[open] > summary::after { rotate: -135deg; translate: 0 2px; }
details.disclosure > .disclosure__body { padding: 0 18px 18px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px;
  padding: 0 1.3em; border-radius: 99px; border: 1.5px solid var(--green); background: var(--green); color: #fff;
  font: 600 .98rem/1 var(--body); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, transform .16s var(--ease-out), opacity .15s ease;
  touch-action: manipulation;
}
.btn i { font-size: 1.15em; }
.btn:active { transform: scale(.97); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn--block { width: 100%; }
.btn--ghost { background: transparent; border-color: var(--line-strong); color: var(--text); }
.btn--soft { background: var(--surface-2); border-color: var(--line); color: var(--text); }
.btn--danger { background: transparent; border-color: rgba(255, 107, 107, .45); color: var(--danger); }
.btn--wa { background: #25d366; border-color: #25d366; color: #062b12; }
.btn--light { background: #fff; border-color: #fff; color: #1f2420; }
.btn--sm { min-height: 38px; padding: 0 1em; font-size: .86rem; }
.btn--xs { min-height: 32px; padding: 0 .85em; font-size: .8rem; }
.btn.is-loading { pointer-events: none; opacity: .7; }
.btn.is-loading::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .6s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--green-dark); border-color: var(--green-dark); }
  .btn--ghost:hover, .btn--soft:hover { background: var(--surface-3); border-color: var(--line-strong); }
  .btn--danger:hover { background: var(--danger-wash); border-color: var(--danger); }
  .btn--wa:hover { background: #3be07a; border-color: #3be07a; }
  .btn--light:hover { background: #e9eee9; border-color: #e9eee9; }
  .icon-btn:hover { background: var(--surface-2); border-color: var(--line-strong); }
  .tab:not(.is-on):hover { color: var(--text); }
}
.link-btn { background: none; border: 0; padding: 4px; color: var(--muted); cursor: pointer; font: 500 .85rem var(--body); display: inline-flex; align-items: center; gap: 4px; border-radius: 8px; }
.link-btn:hover { color: var(--text); }
.link-btn--danger { color: var(--danger); }
.link-btn--danger:hover { color: #ff9a9a; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 7px; margin-bottom: 14px; min-width: 0; }
.field > span, .label { font: 600 .84rem/1.2 var(--body); color: var(--text); }
.field small { color: var(--faint); font-size: .8rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
@media (max-width: 380px) { .grid-2 { grid-template-columns: 1fr; } }
input, select, textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: var(--surface-2); color: var(--text);
  font: 400 16px/1.35 var(--body); transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  appearance: none; -webkit-appearance: none;
}
textarea { min-height: 92px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(27, 166, 58, .18); background: var(--surface-3); }
input[type="date"] { color-scheme: dark; }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.8); cursor: pointer; }
select {
  padding-right: 40px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat;
}
input[type="file"] { padding: 10px; min-height: 0; font-size: .9rem; }
input[type="file"]::file-selector-button { margin-right: 12px; border: 0; border-radius: 99px; padding: 8px 14px; background: var(--surface-3); color: var(--text); font: 600 .85rem var(--body); cursor: pointer; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1.5px solid var(--line); cursor: pointer; margin-bottom: 14px; font-size: .92rem; }
.check input { width: 22px; height: 22px; min-height: 0; padding: 0; margin: 0; flex: none; accent-color: var(--green); appearance: auto; -webkit-appearance: checkbox; cursor: pointer; }
.check:has(input:checked) { border-color: rgba(27, 166, 58, .55); background: var(--green-wash); }
.form-note { font-size: .85rem; color: var(--muted); margin: -4px 0 14px; }

/* segmented / chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 99px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--text); font: 600 .84rem/1 var(--body); cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .16s var(--ease-out);
}
.chip:active { transform: scale(.96); }
.chip.is-on, .chip.active { background: var(--green); border-color: var(--green); color: #fff; }
@media (hover: hover) and (pointer: fine) { .chip:not(.is-on):not(.active):hover { border-color: var(--green); } }

/* ---------- Status pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 99px; font: 600 .74rem/1.2 var(--body); white-space: nowrap; }
.pill i { font-size: .95rem; }
.pill--ok { background: var(--green-wash); color: var(--green-light); }
.pill--warn { background: var(--warn-wash); color: var(--warn); }
.pill--danger { background: var(--danger-wash); color: var(--danger); }
.pill--neutral { background: var(--surface-3); color: var(--muted); }

/* ---------- Login / welcome ---------- */
.welcome { position: relative; border-radius: 26px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.welcome__media { position: relative; height: 230px; overflow: hidden; }
.welcome__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.welcome__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,13,12,.05) 30%, var(--surface) 100%); }
.welcome__body { padding: 0 20px 22px; margin-top: -34px; position: relative; display: grid; gap: 14px; }
.welcome__body h1 { font-size: 2.05rem; }
.welcome__body h1 em { font-style: normal; color: var(--green-light); }
.btn-google { background: #fff; border-color: #fff; color: #1f2420; }
.btn-google svg { width: 20px; height: 20px; }
@media (hover: hover) and (pointer: fine) { .btn-google:hover { background: #eef2ee; border-color: #eef2ee; } }
.divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: .8rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.guest-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.guest-link { display: grid; gap: 10px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); cursor: pointer; text-align: left; transition: border-color .15s ease, transform .16s var(--ease-out); }
.guest-link i { font-size: 1.6rem; color: var(--green-light); }
.guest-link b { font: 600 1rem var(--head); }
.guest-link span { color: var(--muted); font-size: .83rem; line-height: 1.35; }
.guest-link:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) { .guest-link:hover { border-color: var(--green); } }
.join-cta { margin-top: 12px; display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--radius); background: linear-gradient(140deg, var(--green), var(--green-dark)); color: #fff; }
.join-cta p { color: #fff; font-size: .9rem; }
.join-cta h3 { margin-bottom: 4px; }
.support { margin-top: 18px; text-align: center; color: var(--muted); font-size: .85rem; line-height: 1.7; }
.support a { color: var(--text); font-weight: 600; text-decoration: none; }

/* ---------- Client home ---------- */
.hello { display: flex; align-items: center; gap: 14px; padding: 12px 2px 18px; }
.hello__avatar { width: 54px; height: 54px; border-radius: 18px; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 1.7rem; flex: none; }
.hello h1 { font-size: 1.6rem; }
.status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.status-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 8px; min-width: 0; }
.status-tile__label { color: var(--muted); font-size: .8rem; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.status-tile__value { font: 600 1.05rem/1.25 var(--head); overflow-wrap: anywhere; }
.status-tile code { font: 600 .9rem/1.3 var(--body); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.status-tile--wide { grid-column: 1 / -1; }

.book-cta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 0; padding: 16px 18px; border-radius: var(--radius); background: var(--green); color: #fff; text-decoration: none; transition: transform .16s var(--ease-out), background .15s ease; }
.book-cta b { font: 600 1.15rem var(--head); display: block; }
.book-cta span { font-size: .85rem; color: #fff; }
.book-cta i { font-size: 1.6rem; }
.book-cta:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) { .book-cta:hover { background: var(--green-dark); } }

/* package card */
.pkg { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; }
.pkg + .pkg { margin-top: 10px; }
.pkg__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.pkg__name { font: 600 1.05rem/1.25 var(--head); }
.pkg__meta { color: var(--muted); font-size: .84rem; margin-top: 3px; }
.counters { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.counter { background: var(--surface-2); border-radius: 14px; padding: 12px; display: grid; gap: 2px; }
.counter b { font: 600 2rem/1 var(--head); color: var(--green-light); font-variant-numeric: tabular-nums; }
.counter span { color: var(--muted); font-size: .76rem; font-weight: 600; }
.counter--zero b { color: var(--faint); }
.empty { text-align: center; padding: 26px 16px; color: var(--muted); display: grid; gap: 10px; justify-items: center; }
.empty i { font-size: 2.2rem; color: var(--faint); }
.empty b { color: var(--text); font: 600 1.05rem var(--head); }

/* ---------- Health & calendar ---------- */
.cal { user-select: none; }
.cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal__head h3 { text-transform: capitalize; }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal__dow { text-align: center; font: 600 .7rem/1 var(--body); color: var(--faint); padding: 6px 0; text-transform: uppercase; }
.cal__day {
  aspect-ratio: 1; border-radius: 12px; border: 0; background: none; cursor: pointer; position: relative;
  display: grid; place-items: center; font: 500 .9rem var(--body); font-variant-numeric: tabular-nums; color: var(--text);
  transition: background .15s ease;
}
.cal__day.is-out { color: var(--faint); opacity: .45; }
.cal__day.is-today { box-shadow: inset 0 0 0 1.5px var(--green); font-weight: 700; }
.cal__day.is-sel { background: var(--green); color: #fff; }
.cal__day .marks { position: absolute; bottom: 5px; left: 0; right: 0; display: flex; justify-content: center; gap: 3px; }
.cal__day .marks i { width: 5px; height: 5px; border-radius: 50%; display: block; }
.mk-vac { background: var(--danger); }
.mk-anti { background: var(--warn); }
.mk-vet { background: var(--info); }
.cal__day.is-sel .marks i { background: #fff; }
@media (hover: hover) and (pointer: fine) { .cal__day:not(.is-sel):hover { background: var(--surface-2); } }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: .78rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; display: block; }

.agenda { display: grid; gap: 8px; }
.agenda__item { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.datebox { width: 52px; border-radius: 12px; background: var(--surface-3); text-align: center; padding: 6px 0; }
.datebox b { display: block; font: 600 1.35rem/1 var(--head); font-variant-numeric: tabular-nums; }
.datebox span { font: 600 .66rem/1 var(--body); text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
.agenda__title { font-weight: 600; font-size: .95rem; }
.agenda__sub { color: var(--muted); font-size: .8rem; }
.agenda__item--vac .datebox { background: var(--danger-wash); color: var(--danger); }
.agenda__item--anti .datebox { background: var(--warn-wash); color: var(--warn); }
.agenda__item--vet .datebox { background: rgba(108, 184, 255, .14); color: var(--info); }
.agenda__item .datebox span { color: inherit; opacity: .85; }

.anti-item { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 14px; border-radius: 14px; background: var(--surface-2); }
.anti-item + .anti-item { margin-top: 8px; }
.anti-item__name { font-weight: 600; }
.anti-item__sub { color: var(--muted); font-size: .8rem; margin-top: 2px; }
.anti-item__actions { display: flex; align-items: center; gap: 4px; }

.age-badge { color: var(--green-light); font-weight: 600; font-size: .85rem; margin: -6px 0 14px; }

/* ---------- Events / locandine ---------- */
.posters { display: grid; gap: 16px; }
@media (min-width: 640px) { .posters { grid-template-columns: 1fr 1fr; } }
.poster { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; display: grid; }
.poster__art { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface-2); cursor: zoom-in; border: 0; padding: 0; width: 100%; display: block; }
.poster__art .bgblur { position: absolute; inset: -30px; width: calc(100% + 60px); height: calc(100% + 60px); object-fit: cover; filter: blur(26px) saturate(1.2) brightness(.55); }
.poster__art .main { position: relative; width: 100%; height: 100%; object-fit: contain; transition: transform .5s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .poster__art:hover .main { transform: scale(1.03); } }
.poster__date { position: absolute; z-index: 2; top: 12px; left: 12px; background: var(--green); color: #fff; border-radius: 14px; padding: 8px 10px; text-align: center; min-width: 58px; box-shadow: 0 8px 20px rgba(0,0,0,.35); }
.poster__date b { display: block; font: 600 1.7rem/1 var(--head); font-variant-numeric: tabular-nums; }
.poster__date span { font: 700 .68rem/1 var(--body); text-transform: uppercase; letter-spacing: .06em; }
.poster__date--past { background: var(--surface-3); color: var(--muted); }
.poster__soon { position: absolute; z-index: 2; top: 14px; right: 12px; }
/* typographic poster when no image */
.poster__type { position: absolute; inset: 0; display: grid; align-content: end; padding: 22px; background: radial-gradient(120% 80% at 100% 0%, rgba(60,207,92,.35), transparent 60%), linear-gradient(160deg, var(--green-dark), #0b2412 75%); }
.poster__type img { position: absolute; top: 18px; right: 18px; width: 92px; filter: brightness(0) invert(1); opacity: .9; }
.poster__type h3 { font-size: 2rem; line-height: 1.05; color: #fff; }
.poster__type p { color: rgba(255,255,255,.8); margin-top: 8px; font-size: .9rem; }
.poster__body { padding: 16px 16px 18px; display: grid; gap: 10px; }
.poster__title { font: 600 1.25rem/1.2 var(--head); }
.poster__when { color: var(--green-light); font-weight: 600; font-size: .88rem; display: flex; align-items: center; gap: 6px; text-transform: capitalize; }
.poster__desc { color: var(--muted); font-size: .92rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.poster__desc.is-clamped { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.poster__actions { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; margin-top: 4px; }
.poster--past { opacity: .72; }

.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.92); display: grid; place-items: center; padding: 20px; cursor: zoom-out; opacity: 0; transition: opacity .2s ease; }
.lightbox.is-open { opacity: 1; }
.lightbox img { max-height: 90dvh; max-width: 100%; object-fit: contain; border-radius: 12px; }
.lightbox .icon-btn { position: absolute; top: calc(16px + var(--safe-t)); right: 16px; }

.admin-event { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; background: var(--surface-2); }
.admin-event + .admin-event { margin-top: 8px; }
.admin-event__thumb { width: 56px; height: 70px; border-radius: 10px; object-fit: cover; background: var(--surface-3); display: grid; place-items: center; color: var(--faint); font-size: 1.3rem; }
.poster-preview { max-width: 300px; margin: 4px auto 16px; }

/* ---------- Map ---------- */
.map-shell { position: relative; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
#map { width: 100%; height: min(58dvh, 520px); background: #1a1d1b; }
.map-tools { position: absolute; z-index: 500; right: 12px; bottom: 12px; display: grid; gap: 8px; }
.map-tools .icon-btn { background: rgba(20,23,21,.94); box-shadow: 0 6px 16px rgba(0,0,0,.4); }
.map-status { position: absolute; z-index: 500; left: 12px; top: 12px; padding: 7px 12px; border-radius: 99px; background: rgba(20,23,21,.94); font-size: .8rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.map-status:empty { display: none; }
.places { display: grid; gap: 8px; margin-top: 14px; }
.place { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; text-align: left; width: 100%; transition: border-color .15s ease; }
.place:hover { border-color: var(--line-strong); }
.place__ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.25rem; }
.place__name { font-weight: 600; font-size: .92rem; }
.place__sub { color: var(--muted); font-size: .78rem; }
.place__dist { font: 600 .82rem var(--body); color: var(--muted); font-variant-numeric: tabular-nums; }
.cat-acqua { background: rgba(108,184,255,.16); color: var(--info); }
.cat-cani { background: var(--green-wash); color: var(--green-light); }
.cat-vet { background: var(--danger-wash); color: var(--danger); }
.cat-centri { background: var(--green); color: #fff; }
.cat-me { background: #fff; color: #111; }
/* leaflet pins */
.pin { width: 28px; height: 28px; border-radius: 50% 50% 50% 4px; rotate: -45deg; display: grid; place-items: center; box-shadow: 0 6px 14px rgba(0,0,0,.45); border: 2px solid rgba(255,255,255,.9); }
.pin i { rotate: 45deg; font-size: 14px; }
.pin.cat-acqua { background: #2c7fd0; color: #fff; }
.pin.cat-cani { background: var(--green-dark); color: #fff; }
.pin.cat-vet { background: #d64545; color: #fff; }
.pin.cat-centri { background: var(--green-brand); color: #fff; width: 40px; height: 40px; }
.pin.cat-centri i { font-size: 19px; }
.pin.cat-me { background: #fff; color: #111; }
.leaflet-container { font-family: var(--body); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow); }
.leaflet-popup-content-wrapper { border-radius: 16px; }
.leaflet-popup-content { margin: 14px 16px; font-size: .88rem; line-height: 1.45; }
.leaflet-popup-content b { font-family: var(--head); font-size: 1rem; font-weight: 600; }
.leaflet-popup-content .pop-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.leaflet-popup-content .pop-actions a { color: #fff; text-decoration: none; }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
.leaflet-control-attribution { background: rgba(11,13,12,.75) !important; color: var(--faint) !important; }
.leaflet-control-attribution a { color: var(--muted) !important; }
.leaflet-bar a { background: var(--surface) !important; color: var(--text) !important; border-color: var(--line) !important; }

/* ---------- Staff list ---------- */
.search { position: relative; }
.search i { position: absolute; left: 16px; top: 50%; translate: 0 -50%; color: var(--faint); font-size: 1.15rem; pointer-events: none; }
.search input { padding-left: 46px; border-radius: 99px; min-height: 52px; }
.filters { margin: 12px 0 6px; }
.result-count { color: var(--muted); font-size: .82rem; margin: 6px 2px 10px; }

.member { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.member + .member { margin-top: 10px; }
.member__head { padding: 16px 16px 12px; display: grid; gap: 8px; }
.member__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.member__name { font: 600 1.12rem/1.2 var(--head); background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: var(--text); }
.member__name:hover { color: var(--green-light); }
.member__dog { color: var(--muted); font-size: .88rem; display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.member__contact { color: var(--muted); font-size: .82rem; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; overflow-wrap: anywhere; }
.member__contact span { display: inline-flex; align-items: center; gap: 5px; }
.member__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.member__tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 16px 12px; }
.member__note { margin: 0 16px 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .86rem; color: var(--text); }
.member__note.is-empty { color: var(--faint); }
.member__pkgs { border-top: 1px solid var(--line); padding: 12px 16px 16px; display: grid; gap: 10px; }
.toggle-pay { border: 0; background: none; cursor: pointer; padding: 0; border-radius: 99px; }

.spkg { background: var(--surface-2); border-radius: 14px; padding: 12px; display: grid; gap: 10px; }
.spkg__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.spkg__name { font-weight: 600; font-size: .95rem; }
.spkg__sub { color: var(--muted); font-size: .78rem; margin-top: 2px; }
.spkg__counts { display: flex; flex-wrap: wrap; gap: 8px; }
.spkg__count { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; background: var(--surface-3); font-size: .84rem; }
.spkg__count b { font: 600 1.1rem/1 var(--head); color: var(--green-light); font-variant-numeric: tabular-nums; }
.spkg__count button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 2px; font-size: .95rem; }
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-action {
  min-height: 46px; border-radius: 12px; border: 0; cursor: pointer; color: #fff; font: 600 .86rem/1.15 var(--body);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 8px; text-align: center;
  transition: transform .16s var(--ease-out), filter .15s ease; touch-action: manipulation;
}
.btn-action i { font-size: 1.1rem; flex: none; }
.btn-action:active { transform: scale(.96); }
@media (hover: hover) and (pointer: fine) { .btn-action:hover { filter: brightness(1.12); } }
.btn-singola { background: #c2410c; }
.btn-gruppo { background: #1d6fd1; }
.btn-sport { background: #b45309; }
.btn-agility { background: #0f766e; }
.btn-mantrailing { background: #7e3fb5; }
.btn-add { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }

.skeleton { border-radius: var(--radius); background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; height: 168px; border: 1px solid var(--line); }
.skeleton + .skeleton { margin-top: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* staff/admin lists */
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.list-row + .list-row { margin-top: 8px; }
.list-row__title { font-weight: 600; }
.list-row__sub { color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.request { padding: 14px; border-radius: 14px; background: var(--surface-2); display: grid; gap: 8px; }
.request + .request { margin-top: 8px; }
.request dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0; font-size: .85rem; }
.request dt { color: var(--muted); }
.request dd { margin: 0; overflow-wrap: anywhere; }

/* import */
.dropzone { display: grid; place-items: center; gap: 8px; text-align: center; padding: 22px 16px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface-2); cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.dropzone i { font-size: 2rem; color: var(--green-light); }
.dropzone b { font: 600 1rem var(--head); }
.dropzone span { color: var(--muted); font-size: .84rem; }
.dropzone.is-over { border-color: var(--green); background: var(--green-wash); }
.dropzone input { display: none; }
.import-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.import-summary div { background: var(--surface-2); border-radius: 14px; padding: 12px; }
.import-summary b { display: block; font: 600 1.6rem/1 var(--head); font-variant-numeric: tabular-nums; }
.import-summary span { color: var(--muted); font-size: .76rem; font-weight: 600; }
.import-list { max-height: 320px; overflow: auto; border-radius: 14px; background: var(--surface-2); padding: 6px; }
.import-item { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 9px 10px; border-radius: 10px; font-size: .84rem; }
.import-item + .import-item { border-top: 1px solid var(--line); border-radius: 0; }
.import-item small { color: var(--muted); display: block; }
.import-item code { font: 600 .8rem var(--body); font-variant-numeric: tabular-nums; }
.import-log { font-size: .86rem; color: var(--muted); line-height: 1.5; }
.import-log b { color: var(--text); }

/* ---------- Sheets (modals) ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 80; display: none; align-items: flex-end; justify-content: center;
  background: rgba(0, 0, 0, .62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.modal-overlay.is-open { display: flex; animation: fadein .2s ease; }
.modal-box {
  width: 100%; max-width: 560px; max-height: calc(100dvh - 40px - var(--safe-t)); overflow: auto; overscroll-behavior: contain;
  background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 26px 26px 0 0;
  padding: 10px 20px calc(24px + var(--safe-b)); box-shadow: var(--shadow);
  animation: sheetin .34s var(--ease-drawer);
}
.modal-box::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 9px; background: var(--line-strong); margin: 0 auto 14px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; position: sticky; top: -10px; background: var(--surface); padding: 6px 0; z-index: 2; }
.modal-head h3 { font-size: 1.25rem; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
@keyframes sheetin { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@media (min-width: 720px) {
  .modal-overlay { align-items: center; padding: 20px; }
  .modal-box { border-radius: 24px; border-bottom: 1px solid var(--line); padding-bottom: 24px; animation: dialogin .24s var(--ease-out); }
  .modal-box::before { display: none; }
}
@keyframes dialogin { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.info-box { background: var(--surface-2); border-radius: 14px; padding: 12px 14px; font-size: .9rem; margin-bottom: 14px; display: grid; gap: 4px; }

.diario-card { background: var(--surface-2); border-radius: 14px; padding: 12px 14px; }
.diario-card + .diario-card { margin-top: 8px; }
.diario-meta { font-size: .78rem; color: var(--muted); font-weight: 600; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.log-row { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: .86rem; }
.log-row + .log-row { margin-top: 6px; }
.log-row__meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .74rem; font-weight: 600; flex-wrap: wrap; }

/* ---------- Toast & install ---------- */
#toast-box {
  position: fixed; z-index: 100; left: 50%; bottom: calc(var(--nav-h) + 26px + var(--safe-b)); translate: -50% 0;
  max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 16px; background: #f2f5f2; color: #101310;
  font: 600 .9rem/1.3 var(--body); box-shadow: var(--shadow); display: flex; align-items: center; gap: 8px;
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s ease, transform .3s var(--ease-out);
}
#toast-box.is-on { opacity: 1; transform: none; }
#toast-box i { color: var(--green); font-size: 1.15rem; }
#pwa-install-banner {
  position: fixed; z-index: 95; top: calc(10px + var(--safe-t)); left: 50%; translate: -50% 0; width: calc(100% - 24px); max-width: 520px;
  display: none; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 12px;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 18px; box-shadow: var(--shadow);
  animation: bannerin .35s var(--ease-out);
}
#pwa-install-banner img { width: 42px; height: 42px; border-radius: 11px; object-fit: cover; }
@keyframes bannerin { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }

/* notifications sheet */
.notif-state { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 16px; background: var(--surface-2); margin-bottom: 14px; }
.notif-state i { font-size: 1.8rem; }
.notif-list { display: grid; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.notif-list li { display: flex; gap: 10px; align-items: center; font-size: .9rem; color: var(--muted); }
.notif-list li i { color: var(--green-light); font-size: 1.1rem; }

@media (min-width: 900px) {
  .app { padding-top: 16px; }
  h1 { font-size: 2.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .skeleton { animation: none; }
}
/* OpenStreetMap in versione scura, per stare nel tema dell'app */
.tiles-scure { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.6); }
.welcome__media { margin-bottom: -1px; }
.status-tile__value .small { font-family: var(--body); font-weight: 500; }

/* =========================================================
   v2.1 · elenco soci compatto, saldo bollini, installazione,
   notifiche admin, listino, orari veterinari
   ========================================================= */

/* Foto del cane */
.dog-avatar { position: relative; flex: none; width: 46px; height: 46px; border-radius: 14px; background: var(--green-wash); color: var(--green-light); display: grid; place-items: center; font-size: 1.4rem; overflow: hidden; }
.dog-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dog-avatar--lg { width: 60px; height: 60px; border-radius: 18px; font-size: 1.8rem; }
.member__foto, .hello__foto { position: relative; flex: none; cursor: pointer; display: block; border-radius: 18px; }
.member__foto input, .hello__foto input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.member__foto-edit { position: absolute; right: -4px; bottom: -4px; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-3); border: 2px solid var(--surface); color: var(--text); display: grid; place-items: center; font-size: .8rem; }
.hello__foto .member__foto-edit { border-color: var(--bg); }
.member__foto:focus-within, .hello__foto:focus-within { outline: 2px solid var(--green-light); outline-offset: 2px; }

/* Elenco soci: una riga per socio, ben separata */
.mlist { display: grid; gap: 8px; }
.mrow {
    width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; text-align: left;
    padding: 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer;
    transition: border-color .15s ease, background .15s ease, transform .16s var(--ease-out); touch-action: manipulation;
}
.mrow:active { transform: scale(.985); background: var(--surface-2); }
@media (hover: hover) and (pointer: fine) { .mrow:hover { border-color: var(--line-strong); background: var(--surface-2); } }
.mrow__main { min-width: 0; display: grid; gap: 3px; }
.mrow__name { font: 600 1rem/1.25 var(--head); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mrow__omonimo { font-size: .66rem; padding: 2px 7px; }
.mrow__sub { color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow__sub i { color: var(--green-light); }
.mrow__side { display: grid; justify-items: end; gap: 6px; }
.mrow__bollini { font: 600 .9rem/1 var(--head); color: var(--green-light); white-space: nowrap; }
.mrow__bollini--zero { font: 500 .74rem var(--body); color: var(--faint); }
@media (max-width: 360px) { .mrow { grid-template-columns: auto 1fr; } .mrow__side { grid-column: 2; justify-items: start; grid-auto-flow: column; justify-content: start; } }

/* La scheda socio dentro il foglio */
.member--sheet { border: 0; background: none; }
.member--sheet .member__head { padding: 0 0 12px; }
.member--sheet .member__top { gap: 14px; align-items: center; }
.member--sheet .member__tools { padding: 0 0 12px; }
.member--sheet .member__note { margin: 0 0 12px; }
.member--sheet .member__pkgs { padding: 14px 0 0; }

/* Saldo bollini in home */
.saldo { margin: -4px 0 12px; }
.saldo__titolo { font: 600 .82rem var(--body); color: var(--muted); margin: 0 2px 8px; }
.saldo__grid { display: grid; grid-template-columns: repeat(var(--n, 2), 1fr); gap: 8px; }
.saldo__voce { background: linear-gradient(150deg, var(--green), var(--green-dark)); border-radius: 20px; padding: 14px 16px; display: grid; gap: 4px; color: #fff; }
.saldo__voce b { font: 600 2.6rem/1 var(--head); }
.saldo__voce span { font-size: .82rem; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.saldo__voce.is-zero { background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.saldo__voce.is-zero b { color: var(--faint); }
.saldo__grid[style*="--n:3"] .saldo__voce b, .saldo__grid[style*="--n:4"] .saldo__voce b { font-size: 2.1rem; }
.saldo__vuoto { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.saldo__vuoto i { font-size: 1.6rem; color: var(--green-light); }
.saldo__vuoto b { display: block; }
.saldo__vuoto span { color: var(--muted); font-size: .84rem; }
.status-tile--link { text-align: left; cursor: pointer; color: var(--text); font: inherit; transition: border-color .15s ease, transform .16s var(--ease-out); }
.status-tile--link:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) { .status-tile--link:hover { border-color: var(--green); } }
.status-tile__go { margin-left: auto; color: var(--faint); }
.home-actions { display: grid; gap: 8px; margin-top: 12px; }
.home-actions .book-cta { margin: 0; }
.hello { padding: 8px 2px 14px; }
.hello h1 { font-size: 1.5rem; }

/* Ospite: listino e installazione */
.guest-link--wide { grid-column: 1 / -1; grid-template-columns: auto 1fr; align-items: center; display: grid; }
.install-cta { margin-top: 10px; width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; text-align: left; padding: 14px 16px; border-radius: var(--radius); border: 1px dashed var(--line-strong); background: transparent; color: var(--text); cursor: pointer; font: inherit; }
.install-cta > i:first-child { font-size: 1.5rem; color: var(--green-light); }
.install-cta span span { color: var(--muted); font-size: .84rem; }
.install-hero { display: flex; gap: 14px; align-items: center; margin: 4px 0 16px; }
.install-hero img { border-radius: 18px; flex: none; }
.install-hero h3 { font-size: 1.25rem; margin-bottom: 4px; }
.install-steps { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 10px; }
.install-steps li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: var(--surface-2); font-size: .92rem; }
.install-steps i { color: var(--green-light); }
.step-n { width: 28px; height: 28px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font: 600 .9rem var(--head); }

/* Campanella che richiama l'attenzione */
.icon-btn.is-attention { border-color: rgba(60, 207, 92, .6); color: var(--green-light); }
.icon-btn.is-attention i { animation: dondola 2.6s var(--ease-out) infinite; transform-origin: 50% 10%; }
.icon-btn.is-attention::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 2px solid var(--green-light); animation: impulso 2.6s ease-out infinite; pointer-events: none; }
@keyframes dondola { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(16deg); } 82% { transform: rotate(-13deg); } 88% { transform: rotate(8deg); } 94% { transform: rotate(-4deg); } }
@keyframes impulso { 0% { opacity: .9; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.45); } }
@media (prefers-reduced-motion: reduce) { .icon-btn.is-attention i, .icon-btn.is-attention::after { animation: none; } }

/* Listino */
.listino-nota { display: flex; gap: 12px; align-items: center; }
.listino-nota > i { font-size: 1.6rem; color: var(--green-light); }
.tariffe { list-style: none; margin: 0; padding: 0; }
.tariffe li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 14px 16px; }
.tariffe li + li { border-top: 1px solid var(--line); }
.tariffe li div { display: grid; gap: 2px; min-width: 0; }
.tariffe li div span { color: var(--muted); font-size: .8rem; }
.tariffe li > b { font: 600 1.1rem var(--head); min-width: 46px; text-align: right; }
.pacchetti { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 560px) { .pacchetti { grid-template-columns: repeat(3, 1fr); } }
.pacchetto { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 4px; align-content: start; }
.pacchetto__nome { font: 600 .82rem var(--body); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pacchetto__prezzo { font: 600 2rem/1.1 var(--head); }
.pacchetto__bollini { color: var(--green-light); font-weight: 600; font-size: .85rem; }
.pacchetto ul { margin: 8px 0 0; padding: 0 0 0 18px; color: var(--muted); font-size: .82rem; display: grid; gap: 3px; }
.pacchetto ul b { color: var(--text); }
.pacchetto--top { border-color: rgba(60, 207, 92, .5); background: linear-gradient(160deg, rgba(27, 166, 58, .16), var(--surface) 70%); }

/* Mappa: orari */
.chip--toggle.is-on { background: var(--green); border-color: var(--green); color: #fff; }
.orari-box { margin-top: 8px; }
.orari-box summary { cursor: pointer; color: var(--green-light); font-weight: 600; font-size: .82rem; }
.orari { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: .8rem; font-variant-numeric: tabular-nums; }
.orari td { padding: 3px 0; vertical-align: top; }
.orari td:first-child { color: var(--muted); padding-right: 12px; white-space: nowrap; }
.orari tr.is-oggi td { color: var(--text); font-weight: 700; }
.txt-ok { color: var(--green-light); font-weight: 600; }
.txt-ko { color: var(--muted); }

/* Notifiche admin */
.icon-btn--sm { width: 34px; height: 34px; font-size: .95rem; }
.promemoria-box { background: var(--surface-2); border-radius: 14px; padding: 12px; margin-bottom: 14px; }
.prom-row { display: grid; grid-template-columns: 22px 1fr auto auto; gap: 8px; align-items: center; }
.prom-row + .prom-row { margin-top: 8px; }
.prom-row > i { color: var(--green-light); font-size: 1.1rem; }
.prom-row__testo { grid-column: 2 / 4; font-size: .9rem; }
.prom-row select, .prom-row input { min-height: 40px; padding: 8px 10px; font-size: .9rem; }
.prom-row select { padding-right: 34px; background-position: calc(100% - 18px) 17px, calc(100% - 13px) 17px; }
.prom-row input[type="time"] { width: 96px; }
.preset-tipo { padding: 12px; border-radius: 14px; background: var(--surface-3); }
.preset-tipo + .preset-tipo { margin-top: 10px; }
.preset-nome { margin-bottom: 10px; font-weight: 600; min-height: 42px; }
.preset-prom { margin-bottom: 6px; }
.preset-tipo .prom-row select, .preset-tipo .prom-row input { background-color: var(--surface-2); }
.notif-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.notif-row + .notif-row { margin-top: 8px; }
.notif-row__main { display: grid; gap: 2px; min-width: 0; font-size: .88rem; }
.notif-row__main > span:not(.small) { color: var(--muted); overflow-wrap: anywhere; }
.notif-row__side { display: grid; justify-items: end; gap: 4px; align-content: start; }
.admin-event { grid-template-columns: 56px 1fr; }
.admin-event__azioni { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; margin-top: -4px; }

/* =========================================================
   v2.2 · avvisi in app, timbri per pacchetto, pagamenti, modifiche
   ========================================================= */
/* Avvisi arrivati: in alto, sopra ogni pagina */
.avvisi { margin-bottom: 16px; padding: 14px; border-radius: var(--radius); background: var(--green-wash); border: 1px solid rgba(27, 166, 58, .45); display: grid; gap: 8px; animation: viewin .26s var(--ease-out); }
.avvisi[hidden] { display: none; }
.avvisi__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.avvisi__head b { display: inline-flex; align-items: center; gap: 8px; color: var(--green-light); font: 600 .95rem/1.2 var(--head); }
.avvisi__head b i { font-size: 1.2rem; }
.avviso { display: grid; gap: 3px; width: 100%; text-align: left; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; transition: border-color .15s ease, transform .16s var(--ease-out); }
.avviso:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) { .avviso:hover { border-color: var(--green); } }
.avviso__t { font-weight: 600; font-size: .92rem; }
.avviso__c { color: var(--muted); font-size: .86rem; }
.avviso__d { color: var(--faint); font-size: .74rem; font-weight: 600; }
.avvisi-lista { display: grid; gap: 6px; }
.avvisi-lista[hidden] { display: none; }
.notif-invito { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: 16px; background: var(--green-wash); border: 1px solid rgba(27, 166, 58, .45); margin-bottom: 12px; }
.notif-invito[hidden] { display: none; }
.notif-invito > i { font-size: 1.8rem; color: var(--green-light); }

/* Modo di pagamento: lettere */
.pay-pick { display: flex; gap: 6px; margin-top: 6px; }
.pay-pick__opt { min-width: 46px; min-height: 42px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface-2); color: var(--text); font: 700 1rem/1 var(--body); cursor: pointer; text-transform: uppercase; transition: background .15s ease, border-color .15s ease, transform .16s var(--ease-out); }
.pay-pick__opt:active { transform: scale(.95); }
.pay-pick__opt.is-on { background: var(--green); border-color: var(--green); color: #fff; }
.pay-tag { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 8px; background: var(--surface-3); border: 1px solid var(--line-strong, var(--line)); color: var(--text); font: 700 .78rem/1 var(--body); text-transform: uppercase; flex: none; }

/* Pacchetti: attivi in evidenza, finiti e passati attenuati */
.spkg--attivo { border: 1px solid rgba(27, 166, 58, .35); }
.spkg--passato, .pkg--passato { opacity: .78; }
.spkg--passato .spkg__count b { color: var(--muted); }
.spkg-sep { margin: 8px 2px 0; color: var(--muted); font-size: .78rem; font-weight: 600; }
.spkg__head .row { flex-wrap: wrap; justify-content: flex-end; }
.btn-action[disabled] { opacity: .35; cursor: not-allowed; filter: grayscale(1); }
.btn-action[disabled]:active { transform: none; }
.icon-btn--sm { width: 32px; height: 32px; font-size: .95rem; flex: none; }

/* Timbri del singolo pacchetto */
.mov { border-top: 1px solid var(--line); padding-top: 4px; }
.mov > summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 38px; cursor: pointer; color: var(--muted); font-size: .84rem; font-weight: 600; }
.mov > summary::-webkit-details-marker { display: none; }
.mov > summary > i:first-child { color: var(--green-light); font-size: 1.05rem; }
.mov__caret { margin-left: auto; transition: rotate .2s var(--ease-out); }
.mov[open] .mov__caret { rotate: 180deg; }
.mov__list { display: grid; gap: 6px; padding-bottom: 4px; }
.mov-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-3); font-size: .86rem; }
.pkg .mov-row { background: var(--surface-2); }
.mov-row__data { font-weight: 700; min-width: 66px; flex: none; }
.mov-row__main { display: grid; gap: 1px; min-width: 0; flex: 1; }
.mov-row__main b { font-weight: 600; }
.mov-row__main span { color: var(--faint); font-size: .74rem; font-weight: 600; }
.mov-row.is-annullato { opacity: .6; }
.mov-row.is-annullato .mov-row__main b, .mov-row.is-annullato .mov-row__data { text-decoration: line-through; }

/* Diario e modifiche */
.diario-card__azioni { display: flex; justify-content: flex-end; gap: 14px; margin-top: 6px; }
.edit-banner { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin-bottom: 14px; border-radius: 14px; background: rgba(245, 184, 75, .12); border: 1px solid rgba(245, 184, 75, .45); font-size: .9rem; }
.edit-banner[hidden] { display: none; }
.edit-banner > i { color: var(--warn); font-size: 1.2rem; }
.edit-banner .link-btn { margin-left: auto; }
.hello__cambia { margin-left: auto; flex: none; }
.hello__cambia[hidden] { display: none; }
