/* Dogs & Co – grafica ispirata ai post Instagram @dogsandcoacademy:
   titoli condensati maiuscoli (Anton), testo Montserrat, riquadri giallo-lime, verde del logo. */
:root {
  --bg: #f3f5ef;
  --surface: #ffffff;
  --surface-2: #eef1ea;
  --text: #121a15;
  --muted: #66706a;
  --border: #e2e6dd;
  --ink: #0f1a14;
  --primary: #1f6b3a;
  --primary-2: #2f8a4e;
  --primary-ink: #ffffff;
  --primary-soft: #e2f0e6;
  --lime: #e4f52f;
  --lime-ink: #111;
  --danger: #c0352b;
  --warn-bg: #fff2cc;
  --warn-ink: #7a5200;
  --ok-bg: #e2f0e6;
  --ok-ink: #1d5a33;
  --shadow: 0 1px 2px rgba(15, 26, 20, .05), 0 8px 24px rgba(15, 26, 20, .07);
  --shadow-lg: 0 18px 40px rgba(15, 26, 20, .18);
  --radius: 20px;
  --display: "Anton", "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  --body: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b110d;
    --surface: #141c17;
    --surface-2: #1c2620;
    --text: #edf2ee;
    --muted: #9aa69e;
    --border: #26322b;
    --ink: #050806;
    --primary: #45b26b;
    --primary-2: #5cc982;
    --primary-ink: #06120a;
    --primary-soft: #18301f;
    --danger: #f2867f;
    --warn-bg: #3a2e10;
    --warn-ink: #f3cf7a;
    --ok-bg: #18301f;
    --ok-ink: #8fd9a9;
    --shadow: 0 1px 0 rgba(255, 255, 255, .03), 0 10px 30px rgba(0, 0, 0, .35);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 500 15px/1.5 var(--body);
}
h1, h2, h3 { margin: 0 0 12px; line-height: 1.05; font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .01em; }
h1 { font-size: 2.4rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.3rem; }
h2 .muted { font-size: .7em; }
a { color: var(--primary); text-decoration: none; font-weight: 600; }
b, strong { font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.grow { flex: 1; min-width: 0; }
.cap::first-letter { text-transform: uppercase; }
[hidden] { display: none !important; }
body.busy, body.busy * { cursor: progress !important; }
::selection { background: var(--lime); color: var(--lime-ink); }

/* Evidenziatore stile post Instagram */
.hl {
  background: var(--lime); color: var(--lime-ink); line-height: 1.25;
  padding: .04em .28em 0; box-shadow: 4px 4px 0 rgba(0, 0, 0, .22);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

#app { max-width: 560px; margin: 0 auto; min-height: 100vh; }

/* Barra superiore e navigazione */
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.brand { font-family: var(--display); font-size: 1.35rem; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 10px; }
.brand img { width: 36px; height: 36px; flex: none; border-radius: 50%; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.brand span { overflow: hidden; text-overflow: ellipsis; padding-top: 2px; }
.content { padding: 8px 16px calc(110px + env(safe-area-inset-bottom)); }

.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(12px + env(safe-area-inset-bottom));
  width: calc(100% - 24px); max-width: 536px; z-index: 5;
  display: flex; gap: 4px; padding: 6px;
  background: color-mix(in srgb, var(--ink) 94%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-radius: 24px; box-shadow: var(--shadow-lg);
}
.tabbar button {
  flex: 1; border: 0; background: none; color: rgba(255, 255, 255, .62);
  padding: 7px 2px 6px; border-radius: 18px; font: inherit; font-size: .66rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  transition: background .25s var(--ease), color .25s var(--ease), transform .15s;
}
.tabbar button span { font-size: 1.3rem; filter: grayscale(1) brightness(1.6); opacity: .75; transition: transform .3s var(--ease), filter .2s; }
.tabbar button:active { transform: scale(.94); }
.tabbar button.on { background: var(--lime); color: var(--lime-ink); }
.tabbar button.on span { filter: none; opacity: 1; transform: translateY(-1px) scale(1.08); }

/* Card e liste */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.card[data-action] { cursor: pointer; }
.card[data-action]:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent, var(--primary)) 45%, var(--border)); }
.card[data-action]:active { transform: scale(.985); }
.card.inactive { opacity: .55; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.head-row h2 { margin: 0; }
.card .head-row { margin-bottom: 8px; }
.section-title {
  margin: 26px 0 12px; font-size: 1.15rem; letter-spacing: .03em;
  display: flex; align-items: center; gap: 10px;
}
.section-title::after { content: ""; flex: 1; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--lime), transparent); }
.b-title { font-weight: 700; }
.chev { color: var(--muted); font-size: 1.5rem; transition: transform .2s var(--ease); }
.card[data-action]:hover .chev { transform: translateX(3px); color: var(--primary); }
.empty {
  text-align: center; color: var(--muted); padding: 28px 16px;
  border: 2px dashed var(--border); border-radius: var(--radius); margin-bottom: 12px;
}
.line { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.line:last-of-type { border-bottom: 0; }
.alert { background: var(--warn-bg); color: var(--warn-ink); border-radius: 14px; padding: 11px 14px; margin-bottom: 12px; font-size: .88rem; border-left: 4px solid #e0a400; }

/* Benvenuto: stile copertina dei post */
.hello {
  position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--primary-2) 75%, transparent), transparent 60%),
    linear-gradient(160deg, #173f26 0%, var(--ink) 100%);
  color: #fff; border-radius: 26px; padding: 24px 20px 22px; margin: 4px 0 18px; box-shadow: var(--shadow-lg);
}
.hello::before {
  content: ""; position: absolute; z-index: -1; right: -40px; bottom: -50px; width: 210px; height: 210px;
  background: url("../icons/logo.png") center / contain no-repeat; opacity: .13; transform: rotate(-12deg);
  animation: float 8s ease-in-out infinite;
}
.hello h2 { font-size: 2.3rem; margin-bottom: 12px; }
.hello p { margin: 0 0 18px; color: rgba(255, 255, 255, .82); max-width: 32ch; }
.hello .btn.primary { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); box-shadow: 0 6px 20px color-mix(in srgb, var(--lime) 35%, transparent); }
@keyframes float { 50% { transform: rotate(-6deg) translateY(-10px); } }

.booking { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.booking::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--accent); }
.b-date {
  display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 54px; padding: 6px 4px;
  border-radius: 14px; background: var(--ink); color: #fff; align-self: flex-start;
}
.b-date span { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--lime); }
.b-date strong { font-family: var(--display); font-weight: 400; font-size: 1.7rem; line-height: 1.05; }
.b-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.b-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
details.past summary { cursor: pointer; color: var(--muted); margin: 22px 0 10px; font-weight: 700; text-transform: uppercase; font-size: .82rem; letter-spacing: .05em; }
details.past .booking { opacity: .72; }

.service, .dog { display: flex; align-items: center; gap: 14px; }
.service { position: relative; overflow: hidden; }
.service::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--accent); }
.s-icon, .avatar {
  width: 50px; height: 50px; flex: none; border-radius: 16px; display: grid; place-items: center; font-size: 1.55rem;
  background: color-mix(in srgb, var(--accent, var(--primary)) 16%, var(--surface));
  transition: transform .3s var(--ease);
}
.s-icon .ic { display: grid; place-items: center; color: var(--accent, var(--primary)); }
.s-icon { --rev: color-mix(in srgb, var(--accent, var(--primary)) 16%, var(--surface)); }
.s-icon .ic svg { width: 34px; height: 34px; }
.credit { margin: 10px 0 0; font-size: .68rem; }
.credit a { color: var(--muted); font-weight: 500; }
.s-icon:has(.ic svg) { width: 58px; height: 58px; border-radius: 18px; }
.ic-in { --rev: var(--surface); }
.ic-in { display: inline-grid; place-items: center; vertical-align: -.18em; color: var(--accent, var(--primary)); }
.ic-in svg { width: 1.3em; height: 1.3em; }
.section-title .ic-in { color: var(--primary); }
.ic.emoji, .ic-in.emoji { font-size: inherit; }
.card[data-action]:hover .s-icon, .card[data-action]:hover .avatar { transform: rotate(-6deg) scale(1.06); }
.meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .8rem; color: var(--muted); margin-top: 4px; }

/* Badge e chip */
.badge { display: inline-block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); margin-top: 4px; width: fit-content; }
.badge.warn, .chip.warn { background: var(--warn-bg); color: var(--warn-ink); }
.badge.ok { background: var(--ok-bg); color: var(--ok-ink); }
.badge.admin { background: var(--lime); color: var(--lime-ink); margin: 0; }
.badge.st-completata { background: var(--ok-bg); color: var(--ok-ink); }
.badge.st-annullata, .badge.st-assente { background: color-mix(in srgb, var(--danger) 14%, var(--surface)); color: var(--danger); }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.static { flex-wrap: wrap; margin: 8px 0; }
.chip { border: 1.5px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: .82rem; font-weight: 600; white-space: nowrap; cursor: pointer; transition: all .2s var(--ease); }
.chip:hover { border-color: var(--text); }
.chips.static .chip { cursor: default; padding: 3px 10px; font-size: .78rem; background: var(--surface-2); border: 0; }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--lime); }

/* Pulsanti */
.btn {
  position: relative; overflow: hidden;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 14px; padding: 12px 18px; font: inherit; font-weight: 800; font-size: .86rem;
  text-transform: uppercase; letter-spacing: .04em; cursor: pointer;
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s, border-color .2s, color .2s;
}
.btn:hover { border-color: var(--text); }
.btn:active { transform: scale(.96); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); box-shadow: 0 6px 18px color-mix(in srgb, var(--primary) 30%, transparent); }
.btn.primary:hover { background: var(--primary-2); border-color: var(--primary-2); transform: translateY(-1px); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger-ghost { background: transparent; border-color: transparent; color: var(--danger); }
.btn.small { padding: 7px 12px; font-size: .74rem; border-radius: 11px; }
.btn.block { display: block; width: 100%; margin-top: 10px; padding: 14px; }
.btn.back { margin: -4px 0 8px -8px; }
.link-btn { display: block; margin: 14px auto 0; padding: 6px 10px; background: none; border: 0; color: var(--primary); font: 600 .82rem var(--body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { color: var(--ink); }
.btn::after { /* lampo al tocco */
  content: ""; position: absolute; inset: 0; background: radial-gradient(circle, rgba(255, 255, 255, .45) 10%, transparent 11%) center / 0 0 no-repeat;
  opacity: 0; transition: background-size .45s, opacity .6s;
}
.btn:active::after { background-size: 1200% 1200%; opacity: 1; transition: 0s; }
.row { display: flex; gap: 10px; align-items: flex-end; }
.row > * { flex: 1; }
.row > .narrow { flex: 0 0 80px; }

/* Form */
label { display: block; font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 14px; }
input, select, textarea {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: 13px; background: var(--surface-2); color: var(--text);
  font: inherit; font-size: 16px; font-weight: 500; text-transform: none; letter-spacing: 0;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
input[type="color"] { padding: 4px; height: 48px; }
input:focus, select:focus, textarea:focus { outline: none; background: var(--surface); border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); }
label.check { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text); text-transform: none; letter-spacing: 0; font-size: .86rem; }
label.check input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--primary); }
label.inline { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; color: var(--text); font-weight: 600; text-transform: none; letter-spacing: 0; font-size: .86rem; }
label.inline input { margin: 0; flex: 1; padding: 8px 10px; }
label.inline > :first-child { min-width: 0; }
fieldset { border: 1.5px solid var(--border); border-radius: 16px; padding: 10px 14px; margin: 0 0 14px; }
legend { font-family: var(--display); text-transform: uppercase; font-size: 1rem; padding: 0 6px; }
fieldset .row { margin-top: 8px; }
fieldset .row select, fieldset .row input { margin-top: 0; }
.search { margin: 0 0 12px; }
form.row { margin-top: 10px; }
form.row input { margin: 0; }

/* Login */
.auth { padding: 0 16px 32px; }
.auth-hero {
  position: relative; overflow: hidden; isolation: isolate; text-align: center; color: #fff;
  margin: 0 -16px 18px; padding: calc(36px + env(safe-area-inset-top)) 20px 44px;
  background:
    radial-gradient(100% 70% at 50% 0%, color-mix(in srgb, var(--primary-2) 70%, transparent), transparent 70%),
    linear-gradient(180deg, #173f26, var(--ink));
  border-radius: 0 0 34px 34px;
}
.auth-hero .logo { display: block; width: 116px; height: 116px; margin: 0 auto 14px; object-fit: contain; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .45)); animation: pop .7s var(--ease) both; }
.auth-hero h1 { font-size: 3rem; margin-bottom: 10px; animation: rise .6s .1s var(--ease) both; }
.auth-hero h1::after { content: "Prenota online"; display: table; margin: 8px auto 0; font-size: 1.05rem; background: var(--lime); color: var(--lime-ink); padding: 4px 10px 2px; transform: rotate(-2deg); box-shadow: 4px 4px 0 rgba(0, 0, 0, .25); }
.auth-hero p { color: rgba(255, 255, 255, .78); margin: 0 auto; max-width: 30ch; animation: rise .6s .2s var(--ease) both; }
.auth-hero + .card { margin-top: -34px; position: relative; animation: rise .6s .25s var(--ease) both; }
.seg { display: flex; background: var(--surface-2); border-radius: 14px; padding: 4px; margin-bottom: 18px; }
.seg button { flex: 1; border: 0; background: none; padding: 10px; border-radius: 11px; font: inherit; font-weight: 800; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); cursor: pointer; transition: all .25s var(--ease); }
.seg button.on { background: var(--ink); color: var(--lime); box-shadow: var(--shadow); }
.demo { text-align: center; }
.demo p { margin: 0 0 10px; }
@keyframes pop { from { transform: scale(.6) rotate(-20deg); opacity: 0; } }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } }

/* Contatti e social */
.contacts { text-align: center; margin: 12px 0; }
.social-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 10px; }
.social {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px 7px 8px; border-radius: 999px;
  background: var(--surface); border: 1.5px solid var(--border); color: var(--text); font-size: .8rem; font-weight: 700;
  transition: transform .2s var(--ease), border-color .2s;
}
.social:hover { transform: translateY(-2px); border-color: var(--text); }
.s-badge { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: .75rem; font-weight: 800; line-height: 1; }
.social.fb .s-badge { background: #1877f2; }
.social.fb .s-badge::after { content: "f"; font-family: Arial, sans-serif; font-size: .95rem; }
.social.yt .s-badge { background: #ff0000; border-radius: 6px; }
.social.yt .s-badge::after { content: ""; border-left: 8px solid #fff; border-top: 5px solid transparent; border-bottom: 5px solid transparent; margin-left: 2px; }
.social.ig .s-badge { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.social.ig .s-badge::after { content: ""; width: 9px; height: 9px; border: 2px solid #fff; border-radius: 50%; }
.social.wa .s-badge { background: #25d366; }
.social.wa .s-badge::after { content: "✆"; font-size: .85rem; }
.social.tel .s-badge { background: var(--primary); }
.social.tel .s-badge::after { content: "☎"; font-size: .8rem; }
.social.web .s-badge { background: #555; }
.social.web .s-badge::after { content: "www"; font-size: .45rem; letter-spacing: -.02em; }
.address { display: inline-block; }

/* Prenotazione guidata */
.steps { display: flex; gap: 6px; margin-bottom: 16px; }
.steps div { flex: 1; font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); text-align: center; padding-top: 8px; position: relative; }
.steps div::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; border-radius: 5px; background: var(--border); }
.steps div::after { content: ""; position: absolute; top: 0; left: 0; height: 5px; width: 0; border-radius: 5px; background: var(--primary); transition: width .5s var(--ease); }
.steps span { display: none; }
.steps .done::after { width: 100%; }
.steps .on { color: var(--text); }
.steps .on::after { width: 100%; background: var(--lime); animation: grow .5s var(--ease); }
@keyframes grow { from { width: 0; } }
.datestrip { display: flex; gap: 8px; overflow-x: auto; padding: 6px 2px 16px; margin: 0 -2px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.datestrip::-webkit-scrollbar { display: none; }
.day {
  flex: 0 0 auto; width: 58px; padding: 9px 0 7px; border: 1.5px solid var(--border); border-radius: 16px; scroll-snap-align: start;
  background: var(--surface); color: var(--text); font: inherit; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; transition: all .2s var(--ease);
}
.day:hover:not(.off) { border-color: var(--text); transform: translateY(-2px); }
.day span { font-size: .64rem; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.day strong { font-family: var(--display); font-weight: 400; font-size: 1.5rem; line-height: 1.15; }
.day em { font-style: normal; font-size: .62rem; font-weight: 700; color: var(--primary); min-height: 1em; }
.day.on { background: var(--ink); border-color: var(--ink); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.day.on span { color: rgba(255, 255, 255, .7); }
.day.on em { color: var(--lime); }
.day.off { opacity: .35; cursor: default; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.slot {
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text); border-radius: 14px;
  padding: 10px 4px; font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center;
  transition: all .2s var(--ease);
}
.slot strong { font-family: var(--display); font-weight: 400; font-size: 1.35rem; letter-spacing: .02em; }
.slot span { font-size: .66rem; font-weight: 600; color: var(--muted); }
.slot:hover:not(:disabled) { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); transform: translateY(-2px); }
.slot:hover:not(:disabled) span { color: var(--lime-ink); }
.slot:disabled { opacity: .4; cursor: default; text-decoration: line-through; }
.summary { position: relative; overflow: hidden; }
.summary::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--accent); }
.row-sum { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.row-sum:last-child { border: 0; }
.row-sum span { color: var(--muted); font-size: .86rem; }
.row-sum b { text-align: right; }
.row-sum b::first-letter { text-transform: uppercase; }
.success { text-align: center; padding-top: 30px; }
.success .big { font-size: 4.5rem; display: inline-block; animation: pop .7s var(--ease) both, bounce 2.4s 1s ease-in-out infinite; }
.success h2 { font-size: 2.3rem; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* Agenda */
.datenav { display: flex; gap: 6px; align-items: center; margin-bottom: 12px; }
.datenav input { margin: 0; flex: 1; padding: 8px 10px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.stats div { background: var(--ink); color: #fff; border-radius: 16px; padding: 12px 8px; text-align: center; }
.stats strong { display: block; font-family: var(--display); font-weight: 400; font-size: 1.7rem; line-height: 1.1; color: var(--lime); }
.stats span { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: rgba(255, 255, 255, .7); }
.agenda { position: relative; overflow: hidden; }
.agenda::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--accent); }
.a-head { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; }
.a-time { font-family: var(--display); font-weight: 400; font-size: 1.4rem; display: flex; flex-direction: column; align-items: center; min-width: 54px; line-height: 1.1; }
.a-time span { font-family: var(--body); font-size: .7rem; color: var(--muted); font-weight: 600; }
.person { display: flex; gap: 8px; padding: 10px 0 4px; border-top: 1px solid var(--border); }
.p-actions { display: flex; gap: 4px; align-items: flex-start; flex-wrap: wrap; justify-content: flex-end; max-width: 140px; }
.note { font-style: italic; margin-top: 2px; }
.hours { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 2px 12px; font-size: .8rem; }
.hours span { display: inline-block; width: 34px; color: var(--muted); font-weight: 700; }
.hours em { color: var(--muted); }

/* Richieste da confermare */
.pending { position: relative; overflow: hidden; background: color-mix(in srgb, var(--lime) 14%, var(--surface)); border-color: color-mix(in srgb, var(--lime) 60%, var(--border)); }
.pending::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--lime); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.request { padding: 10px 0; border-top: 1px solid var(--border); }
.request:first-of-type { margin-top: 8px; }
.req-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.badge.st-richiesta { background: var(--lime); color: var(--lime-ink); }
.warn-text { color: var(--warn-ink); margin-top: 4px; }

/* Pacchetti */
.pkg { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.card > .pkg:last-child { border-bottom: 0; }
.client .pkg { border: 1.5px solid var(--border); border-radius: 14px; padding: 9px 12px; margin: 6px 0; }
.pkg.done { opacity: .5; }
.meter { height: 8px; border-radius: 999px; background: var(--surface-2); margin-top: 7px; overflow: hidden; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-2) 70%, var(--lime)); border-radius: 999px; transform-origin: left; animation: fill 1s var(--ease) both; }
@keyframes fill { from { transform: scaleX(0); } }
.line-card { display: flex; align-items: center; gap: 10px; }
.top-gap { margin-top: 30px; }

/* Ingresso animato delle schermate (solo al cambio di scheda o passo) */
.content.enter > * { animation: rise .45s var(--ease) both; }
.content.enter > *:nth-child(2) { animation-delay: .04s; }
.content.enter > *:nth-child(3) { animation-delay: .08s; }
.content.enter > *:nth-child(4) { animation-delay: .12s; }
.content.enter > *:nth-child(5) { animation-delay: .16s; }
.content.enter > *:nth-child(6) { animation-delay: .2s; }
.content.enter > *:nth-child(n+7) { animation-delay: .24s; }

/* Modale */
.overlay { position: fixed; inset: 0; z-index: 20; background: rgba(5, 10, 7, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; }
.overlay.enter { animation: fade .25s ease both; }
.sheet {
  background: var(--surface); width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto;
  border-radius: 28px 28px 0 0; padding: 26px 18px calc(22px + env(safe-area-inset-bottom));
  position: relative;
}
.sheet::before { content: ""; position: absolute; top: 9px; left: 50%; width: 42px; height: 5px; margin-left: -21px; border-radius: 5px; background: var(--border); }
.overlay.enter .sheet { animation: up .4s var(--ease) both; }
@keyframes up { from { transform: translateY(60px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@media (min-width: 640px) {
  .overlay { align-items: center; }
  .sheet { border-radius: 28px; }
  .sheet::before { display: none; }
}
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; flex-wrap: wrap; }
.modal-actions .danger-ghost { margin-right: auto; }

/* Notifica */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 30;
  transform: translate(-50%, 20px) scale(.96); opacity: 0; pointer-events: none; transition: .3s var(--ease);
  background: var(--lime); color: var(--lime-ink); font-weight: 700; padding: 11px 18px; border-radius: 14px; font-size: .88rem;
  max-width: calc(100% - 32px); box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.toast.error { background: var(--danger); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
