/* Stile MOODY — colori e font presi da moodydesio.com (condiviso da app e pannello) */
:root {
  --green: #0A4238;
  --green-deep: #06302A;
  --green-soft: #3D6B62;
  --pink: #F7CDE2;
  --pink-2: #EEB3D0;
  --pink-3: #FBE7F1;
  --cream: #FCF4ED;
  --cream-2: #F4E6D8;
  --amber: #E8A23A;
  --amber-soft: #F8E1B8;
  --white: #ffffff;
  --danger: #C2412D;
  --danger-soft: #FBE3DD;
  --ok: #2F7D55;
  --ok-soft: #DDF3E7;
  --line: rgba(10, 66, 56, .14);
  --display: "Bricolage Grotesque", "Open Sans", system-ui, sans-serif;
  --body: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 12px 32px rgba(6, 48, 42, .18);
  --shadow-sm: 0 2px 10px rgba(6, 48, 42, .10);
  --ease: cubic-bezier(.2, .9, .25, 1);
  --gl: max(16px, env(safe-area-inset-left, 0px));
  --gr: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--cream); color: var(--green); font-family: var(--body); font-size: 16px; line-height: 1.5; min-height: 100dvh;
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -.02em; line-height: 1.02; margin: 0; text-wrap: balance; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
img { max-width: 100%; }

.eyebrow { font-family: var(--body); font-weight: 800; font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; }
.muted { opacity: .72; }
.small { font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Marchio ---------- */
.wordmark { font-family: var(--display); font-weight: 800; font-size: 30px; letter-spacing: -.035em; line-height: 1; color: var(--pink); }
.brand { display: inline-flex; align-items: baseline; gap: 8px; }
.brand__sub { font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--pink-2); opacity: .85; }

/* ---------- Bottoni ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px; border-radius: 999px;
  border: 2px solid var(--green); background: var(--green); color: var(--cream); font-weight: 700; font-size: 16px; text-decoration: none;
  transition: transform .12s, background-color .15s, box-shadow .15s; }
.btn:active { transform: scale(.97); }
.btn--pink { background: var(--pink); border-color: var(--pink); color: var(--green); }
.btn--amber { background: var(--amber); border-color: var(--amber); color: var(--green-deep); }
.btn--cream { background: var(--cream); border-color: var(--cream); color: var(--green); }
.btn--ghost { background: transparent; color: var(--green); }
.btn--danger { background: transparent; color: var(--danger); border-color: currentColor; }
.btn--block { width: 100%; }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn .spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link-btn { background: none; border: 0; padding: 8px 0; text-decoration: underline; text-underline-offset: 2px; font-size: 14px; font-weight: 700; }

.icon-btn { position: relative; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(247, 205, 226, .16); color: var(--pink);
  display: grid; place-items: center; transition: background-color .15s; }
.icon-btn:active { background: rgba(247, 205, 226, .3); }
.icon-btn svg { width: 22px; height: 22px; }
.badge { position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--amber);
  color: var(--green-deep); font-size: 12px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--green); }

/* ---------- Campi ---------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; position: relative; }
.field label { font-weight: 700; font-size: 14px; }
.field input, .field textarea, .field select { width: 100%; min-height: 52px; padding: 12px 16px; border-radius: 14px; border: 2px solid var(--line);
  background: var(--white); outline: none; transition: border-color .15s, box-shadow .15s; font-size: 16px; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(10, 66, 56, .08); }
.field.bad input { border-color: var(--danger); }
.field__hint { font-size: 13px; color: var(--danger); font-weight: 600; }
.field__hint button { background: none; border: 0; padding: 0; font-weight: 800; text-decoration: underline; color: var(--green); }
.pw { position: relative; }
.pw input { padding-right: 84px; }
.pw__toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: var(--cream); border-radius: 10px;
  padding: 8px 10px; font-size: 13px; font-weight: 800; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; margin: 6px 0 14px; cursor: pointer; line-height: 1.4; }
.check input { width: 22px; height: 22px; accent-color: var(--green); flex: none; margin-top: 0; }
.error, .info, .okbox { border-radius: 14px; padding: 11px 14px; font-size: 14px; margin-bottom: 14px; font-weight: 600; }
.error { background: var(--danger-soft); color: var(--danger); }
.info { background: var(--pink); }
.okbox { background: var(--ok-soft); color: var(--ok); }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 30px); opacity: 0; z-index: 100;
  background: var(--green-deep); color: var(--cream); padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 14px;
  box-shadow: var(--shadow); transition: transform .25s var(--ease), opacity .25s; width: max-content; max-width: calc(100% - 32px); text-align: center; pointer-events: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Sheet (pannello dal basso) ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(6, 48, 42, .55); z-index: 50; opacity: 0; transition: opacity .25s; }
.sheet-backdrop.show { opacity: 1; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; max-height: 92dvh; overflow: auto; overscroll-behavior: contain; background: var(--cream);
  border-radius: 28px 28px 0 0; padding: 12px var(--gr) calc(24px + env(safe-area-inset-bottom, 0px)) var(--gl); transform: translateY(100%);
  transition: transform .34s var(--ease); max-width: 560px; margin: 0 auto; box-shadow: 0 -10px 40px rgba(6, 48, 42, .2); }
@media (min-width: 560px) { .sheet { padding-left: 24px; padding-right: 24px; } }
.sheet.show { transform: translateY(0); }
.sheet.drag { transition: none; }
.sheet__grip { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 14px; }
.sheet__close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--white);
  font-size: 22px; line-height: 1; display: grid; place-items: center; z-index: 2; box-shadow: var(--shadow-sm); }
.sheet__title { font-size: 30px; margin: 4px 0 12px; padding-right: 44px; }
.btn-row { display: grid; gap: 10px; }

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