/* Osteria dei Quattro Venti: colori e caratteri sopra la base comune (/demo/app-palestra/app.css) */
@font-face {
  font-family: "Fraunces";
  src: url("/demo/fonts/fraunces-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}
:root {
  --bg: #faf6ef;
  --surface: #fff;
  --surface-2: #f2eadd;
  --ink: #2b1b12;
  --muted: #6e5a4c;
  --line: rgba(43, 27, 18, .12);
  --accent: #9c3a22;
  --accent-ink: #fff;
  --ok: #2f7a4a;
  --warn: #b7791f;
  --head: "Fraunces", Georgia, serif;
  color-scheme: light;
}
h1, h2, h3 { font-weight: 500; text-transform: none; letter-spacing: -.01em; }
.hello h1 { font-size: 34px; font-style: italic; font-weight: 400; }
.section-title h2 { font-size: 20px; }
.brand { text-transform: none; letter-spacing: 0; font-size: 19px; font-weight: 600; }
.brand i { font-style: italic; font-weight: 500; }
.app-top { background: rgba(250, 246, 239, .9); }
.tabbar { background: rgba(255, 255, 255, .94); }
.tabbar button { color: #9a8879; }
.round-btn { background: #fff; }
.card { box-shadow: 0 1px 2px rgba(43, 27, 18, .04); }
.note .ic { background: var(--surface-2); }
.toast { background: rgba(43, 27, 18, .96); color: #fff; }
.toast .ic { font-family: var(--head); font-style: italic; }
.btn.ghost { background: #fff; }
.demo-strip { background: var(--accent); color: #fff; }
.demo-strip button { background: rgba(255, 255, 255, .18); }
.ring::after { font-family: var(--head); }
.mini-stamps b { color: var(--accent); }
.empty { background: #fff; }
.days button { background: #fff; }
.days button b { font-family: var(--head); }
.pill { background: rgba(156, 58, 34, .1); color: var(--accent); }
.pill.ok { background: rgba(47, 122, 74, .12); color: var(--ok); }
.pill.wait { background: rgba(183, 121, 31, .14); color: var(--warn); }
.pill.no { background: rgba(43, 27, 18, .08); color: var(--muted); }

/* Piatto del giorno */
.dish { overflow: hidden; border-radius: 22px; background: #fff; border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(43, 27, 18, .1); }
.dish img { width: 100%; height: 190px; object-fit: cover; }
.dish > div { padding: 16px 18px 18px; }
.dish .label { color: var(--accent); }
.dish h3 { margin: 4px 0 4px; font-size: 24px; font-style: italic; font-weight: 400; }
.dish p { color: var(--muted); font-size: 14px; }
.dish .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.dish .price { font-family: var(--head); font-size: 22px; }
.dish.flash { animation: dishFlash 1.2s ease; }
@keyframes dishFlash { 0% { box-shadow: 0 0 0 0 rgba(156, 58, 34, .6); } 100% { box-shadow: 0 0 0 18px rgba(156, 58, 34, 0); } }

/* La tua prenotazione */
.booking { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 20px; background: var(--ink); color: #fff; }
.booking .when { display: grid; place-items: center; width: 66px; height: 66px; flex: none; border-radius: 16px; background: rgba(255, 255, 255, .1); text-align: center; }
.booking .when b { font-family: var(--head); font-size: 22px; line-height: 1; }
.booking .when small { font-size: 11px; font-weight: 700; text-transform: uppercase; opacity: .8; }
.booking h3 { font-size: 18px; color: #fff; }
.booking p { font-size: 13.5px; color: #d9cbbf; }
.booking .pill { margin-top: 6px; }
.booking .pill.ok { background: rgba(120, 220, 150, .18); color: #9be3b3; }
.booking .pill.wait { background: rgba(255, 200, 100, .18); color: #ffd58a; }
.booking .pill.no { background: rgba(255, 255, 255, .12); color: #f1e6dc; }

/* Prenota */
.stepper { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.stepper div { display: flex; align-items: center; gap: 14px; }
.stepper button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-2); font-size: 20px; line-height: 1; }
.stepper b { min-width: 22px; font-family: var(--head); font-size: 22px; text-align: center; }
.slot-title { margin: 6px 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.slots button { display: grid; gap: 1px; padding: 10px 6px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.slots button b { font-family: var(--head); font-size: 18px; }
.slots button small { font-size: 11px; color: var(--muted); }
.slots button.few small { color: var(--warn); font-weight: 700; }
.slots button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.slots button[aria-pressed="true"] small { color: rgba(255, 255, 255, .85); }
.slots button:disabled { opacity: .4; }
.note-field { width: 100%; min-height: 70px; margin-bottom: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; resize: vertical; }

/* Menù */
.menu-group { margin-bottom: 20px; }
.menu-group h2 { margin-bottom: 6px; font-size: 22px; font-style: italic; font-weight: 400; color: var(--accent); }
.menu-item { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.menu-item:last-child { border-bottom: 0; }
.menu-item .top { display: flex; justify-content: space-between; gap: 12px; font-weight: 700; }
.menu-item .top span:last-child { font-family: var(--head); font-weight: 500; }
.menu-item p { color: var(--muted); font-size: 13.5px; }
.tag-v { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: rgba(47, 122, 74, .12); color: var(--ok); font-size: 11px; font-weight: 800; vertical-align: 2px; }
.menu-legend { margin: -4px 0 18px; font-size: 12.5px; color: var(--muted); }

/* Tessera */
.member-card {
  position: relative; overflow: hidden; padding: 22px; border-radius: 24px; color: #fff;
  background: radial-gradient(120% 90% at 100% 0%, rgba(255, 190, 140, .35), transparent 55%), linear-gradient(160deg, #9c3a22, #5e1f10);
  box-shadow: 0 30px 60px rgba(94, 31, 16, .35);
  animation: cardIn .6s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes cardIn { from { opacity: 0; transform: perspective(900px) rotateX(18deg) translateY(20px); } }
.member-card .top { display: flex; justify-content: space-between; align-items: center; }
.member-card .brand i { background: #fff; color: var(--accent); }
.member-card .name { margin-top: 22px; font-family: var(--head); font-size: 28px; font-style: italic; line-height: 1; }
.member-card .meta { display: flex; gap: 22px; margin-top: 10px; font-size: 13px; color: #f3d9cc; }
.member-card .meta b { display: block; color: #fff; font-size: 14px; }
.member-card .pill { background: rgba(255, 255, 255, .18); color: #fff; }
.qr-box { display: grid; justify-items: center; gap: 10px; margin-top: 20px; padding: 18px; border-radius: 18px; background: #fff; color: var(--ink); }
.qr-box img { width: 160px; height: 160px; image-rendering: pixelated; }
.qr-box p { font-size: 13px; font-weight: 700; }
.stamps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 14px; }
.stamp { aspect-ratio: 1; display: grid; place-items: center; border: 2px dashed rgba(43, 27, 18, .2); border-radius: 50%; color: transparent; }
.stamp.on { border: 0; background: var(--accent); color: #fff; }
.stamp.new { animation: stampIn .7s cubic-bezier(.2, 1.6, .4, 1) both; }
.stamp.gift { border-color: rgba(156, 58, 34, .5); color: var(--accent); }
.stamp.gift.on { color: #fff; }
@keyframes stampIn { 0% { transform: scale(2.2) rotate(-25deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.reward { display: flex; gap: 12px; align-items: center; margin-top: 16px; padding: 14px; border-radius: 16px; background: var(--surface-2); font-size: 14px; }
.reward .icon { color: var(--accent); }

/* Pannello */
.admin { --bg: #f7f3ec; --surface: #fff; --surface-2: #f2eadd; --ink: #2b1b12; --muted: #6e5a4c; --line: #e8dfd2; }
.admin .side { background: #2b1b12; }
.admin .side nav button[aria-current="page"] { background: rgba(255, 255, 255, .1); color: #fff; }
.admin .side .brand i { background: var(--accent); color: #fff; }
.admin .kpi.dark { background: #2b1b12; border-color: #2b1b12; }
.admin .kpi.dark b { color: #ffcfb8; }
.admin .avatar { background: #2b1b12; color: #ffcfb8; }
.admin .dots10 i.on { background: var(--accent); }
.admin .field input:focus, .admin .field textarea:focus, .admin .field select:focus { outline-color: rgba(156, 58, 34, .35); border-color: var(--accent); }
.admin .scan { background: #2b1b12; }
.admin .scan .vf::before { border-color: #ffcfb8; }
.admin .scan .vf::after { background: #ffcfb8; box-shadow: 0 0 12px #ffcfb8; }
.admin .phone-prev { background: linear-gradient(160deg, #7a4a35, #3a2116 60%, #241510); }
.admin .sent-note { background: #e7f4ea; color: #24573a; }
.res-row { display: grid; grid-template-columns: 58px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.res-row:last-child { border-bottom: 0; }
.res-row .t { font-family: var(--head); font-size: 19px; }
.res-row b { font-size: 14.5px; }
.res-row small { display: block; color: var(--muted); font-size: 12.5px; }
.res-row .acts { display: flex; gap: 6px; }
.res-row.mine { background: linear-gradient(90deg, rgba(156, 58, 34, .07), transparent); }
.btn.ok-btn { background: var(--ok); color: #fff; }
.photo-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.photo-pick button { padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 12px; aspect-ratio: 1; background: none; }
.photo-pick img { width: 100%; height: 100%; object-fit: cover; }
.photo-pick button[aria-pressed="true"] { border-color: var(--accent); }
.check { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; font-size: 14px; font-weight: 600; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.covers { font-family: var(--head); font-size: 15px; color: var(--muted); }
.install { border-color: rgba(156, 58, 34, .25); background: #fff; }
.days button:disabled { opacity: .35; }

/* Menù: piatti finiti e editor nel pannello */
.menu-item.out .top, .menu-item.out p { color: #a8978a; }
.menu-item.out .tag-out { background: rgba(156, 58, 34, .12); color: var(--accent); }
.tag-out { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: rgba(43, 27, 18, .08); color: var(--muted); font-size: 11px; font-weight: 800; vertical-align: 2px; }
.m-cat { margin: 18px 0 8px; font-size: 19px; font-style: italic; color: var(--accent); }
.m-head, .m-row { display: grid; grid-template-columns: minmax(150px, 1.1fr) 1.6fr 64px 130px 52px 32px; gap: 8px; align-items: center; }
.m-head { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.m-row { padding: 6px 0; border-bottom: 1px solid var(--line); }
.m-row input, .m-row select { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 14px; }
.m-row.is-out input:not([type=checkbox]) { opacity: .5; text-decoration: line-through; }
.m-out { display: grid; place-items: center; }
.m-out input { width: 20px; height: 20px; accent-color: var(--accent); }
.x-btn { width: 30px; height: 30px; border: 0; border-radius: 8px; background: var(--surface-2); color: var(--muted); font-size: 17px; line-height: 1; }
.chip-add { padding: 7px 12px; border: 1px dashed #b9a99a; border-radius: 999px; background: none; font-size: 13px; font-weight: 700; color: var(--muted); }
.chip-add:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 760px) {
  .m-head, .m-row { grid-template-columns: 1fr 60px 44px 30px; }
  .m-head .opt, .m-row .opt { display: none; }
}

/* Esito della lettura del QR nel pannello */
.scan-res { margin: -4px 0 16px; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line); background: #fff; animation: viewIn .35s both; }
.scan-res b { display: block; font-size: 16px; }
.scan-res p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.scan-res .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.scan-res.ok { border-color: #bfe3c9; background: #eef8f1; }
.scan-res.warn { border-color: #f1d9a8; background: #fff7e6; }
.scan-res.prize { border-color: rgba(156, 58, 34, .35); background: linear-gradient(120deg, #fff1ea, #fff); }
.scan-res.prize b { font-family: var(--head); font-size: 20px; font-weight: 500; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.search { flex: 1; max-width: 300px; min-width: 180px; padding: 10px 14px 10px 36px; border: 1px solid var(--line); border-radius: 999px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e5a4c' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 12px 50% / 16px no-repeat; font-size: 14px; }
.search:focus { outline: 2px solid rgba(156, 58, 34, .3); border-color: var(--accent); }
.cli { padding: 6px 8px; border-radius: 12px; }
.cli.is-sel { background: #fff1ea; }
.cli-pick { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding: 4px 0; border: 0; background: none; text-align: left; }
.cli-pick b { display: block; font-size: 14.5px; }
.cli-pick .dots10 { margin-top: 4px; }
.cli-pick .grow { display: block; }

/* Giorni e orari */
.wk { display: grid; grid-template-columns: 1fr 70px 70px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.wk:last-of-type { border-bottom: 0; }
.wk-head { padding-top: 0; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.wk-head span, .wk .sw { justify-self: center; }
.wk b { font-size: 14.5px; }
.sw { position: relative; display: inline-block; width: 44px; height: 26px; cursor: pointer; }
.sw input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.sw span { position: absolute; inset: 0; border-radius: 99px; background: #ddd2c5; transition: background .2s; pointer-events: none; }
.sw span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.sw input:checked + span { background: var(--ok); }
.sw input:checked + span::after { transform: translateX(18px); }
.sw input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.tchip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 6px 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-family: var(--head); font-size: 15px; }
.tchip button { width: 24px; height: 24px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--muted); font-size: 15px; line-height: 1; }
.tinput { padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 14px; }
.days button em { font-style: normal; font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--accent); }
.days button[aria-pressed="true"] em { color: #fff; }
