/* ============================================================
   Bestogoo Business UI — componenti dell'admin (gestore e superadmin)
   Un solo foglio per il canvas Claude Design "Area gestore Bestogoo — redesign"
   e per le pagine vere: stesso CSS = stesso risultato.
   Valori dal Bestogoo Design System (kit ui_kits/business).
   Tutto vive sotto .bz (sul body delle pagine, sulla radice delle tavole) e
   dichiara ogni proprieta' che conta, cosi' i fogli storici non filtrano dentro.
   ============================================================ */

.bz {
  --bz-accent: #2563eb;
  --bz-accent-strong: #1d4ed8;
  --bz-accent-soft: #eff6ff;
  --bz-accent-tint: #dbeafe;
  --bz-ink: #17243b;
  --bz-ink-2: #34445c;
  --bz-muted: #526079;
  --bz-faint: #5b6880;
  --bz-line: #b9c4d2;
  --bz-field: #8190a6;
  --bz-bg: #e4e9f0;
  --bz-surface-tint: #eef3fa;
  --bz-chip: #f0f2f5;
  --bz-chip-hover: #e4e6e9;
  --bz-ok: #186a33;
  --bz-ok-bg: #e6f4ea;
  --bz-warn: #7a5d08;
  --bz-warn-bg: #fff7d6;
  --bz-danger: #a93226;
  --bz-danger-bg: #fde7e5;
  --bz-ring: 0 0 0 3px rgba(37, 99, 235, .3);
  --bz-shadow-xs: 0 1px 2px rgba(0, 0, 0, .05);
  --bz-shadow-lg: 0 16px 40px -12px rgba(17, 24, 39, .25);
  --bz-ease: cubic-bezier(.2, .7, .2, 1);
  font-family: 'Nunito Sans', 'Avenir Next', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--bz-ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.bz, .bz *, .bz *::before, .bz *::after { box-sizing: border-box; }
/* regole di base a specificita' minima (:where), cosi' ogni componente .bz-* le sovrascrive */
:where(.bz) :where(h1, h2, h3, h4, p, ul, ol, figure) { margin: 0; }
:where(.bz) :where(ul, ol).bz-plain { padding: 0; list-style: none; }
.bz :is(button, input, select, textarea) { font-family: inherit; }
:where(.bz) a { color: var(--bz-accent); text-decoration: none; }
:where(.bz) a:hover { color: var(--bz-accent-strong); }
.bz :focus-visible { outline: none; box-shadow: var(--bz-ring); }
.bz-icon { width: 20px; height: 20px; flex: none; }
.bz-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bz [hidden], .bz[hidden] { display: none !important; }

/* ============================ GUSCIO ============================ */
.bz-app { min-height: 100vh; display: flex; flex-wrap: wrap; background: var(--bz-bg); }
.bz-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; }

/* barra laterale */
.bz-side {
  position: sticky;
  top: 0;
  flex: 0 0 240px;
  width: 240px;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: thin;
  display: flex;
  flex-direction: column;
  background: var(--bz-surface-tint);
  border-right: 1px solid var(--bz-line);
  color: var(--bz-ink-2);
}
.bz-side__brand { display: flex; align-items: center; gap: 10px; padding: 20px 20px 16px; border-bottom: 1px solid var(--bz-line); color: inherit; }
.bz-side__logo { width: 36px; height: 36px; flex: none; }
.bz-side__name { display: flex; flex-direction: column; line-height: 1.1; }
.bz-side__name b { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; color: var(--bz-ink); }
.bz-side__name small { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--bz-muted); }
.bz-side__nav { display: flex; flex-direction: column; gap: 2px; padding: 12px 10px; }
.bz-side__foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding: 12px 10px 16px; border-top: 1px solid var(--bz-line); }

.bz-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--bz-ink-2);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  transition: background-color .15s var(--bz-ease), color .15s var(--bz-ease);
}
.bz-nav-item .bz-icon { color: var(--bz-muted); transition: color .15s var(--bz-ease); }
.bz-nav-item:hover { background: var(--bz-bg); color: var(--bz-ink); }
.bz-nav-item:hover .bz-icon { color: var(--bz-accent); }
.bz-nav-item.is-active, .bz-nav-item[aria-current="page"] { background: var(--bz-accent-tint); color: var(--bz-accent-strong); font-weight: 800; box-shadow: inset 3px 0 var(--bz-accent); }
.bz-nav-item.is-active .bz-icon, .bz-nav-item[aria-current="page"] .bz-icon { color: var(--bz-accent); }
.bz-nav-badge { margin-left: auto; padding: 1px 8px; border-radius: 9999px; background: var(--bz-accent); color: #fff; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
/* gruppo di voci (Marketing): intestazione sopra, linea sotto */
.bz-nav-group { margin: 14px 12px 4px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--bz-muted); }

.bz-venue { display: flex; align-items: center; gap: 10px; padding: 8px 6px 0; }
.bz-venue__mark { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--bz-accent-tint); color: var(--bz-accent-strong); font-size: 15px; font-weight: 800; background-size: cover; background-position: center; }
.bz-venue__name { font-size: 13px; font-weight: 700; color: var(--bz-ink); }
.bz-venue__sub { font-size: 12px; color: var(--bz-muted); }
.bz-venue--flat { padding: 0; }

/* intestazione di pagina */
.bz-top { background: #fff; border-bottom: 1px solid var(--bz-line); padding: 20px 32px 18px; }
.bz-top.has-tabs { padding-bottom: 0; }
.bz-top__row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.bz-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 14px; font-weight: 700; }
.bz-eyebrow { margin-bottom: 4px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--bz-accent); }
.bz-title { font-size: 28px; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; color: var(--bz-ink); }
.bz-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* schede sottolineate */
.bz-tabs { display: flex; gap: 24px; margin-top: 14px; overflow-x: auto; scrollbar-width: none; }
.bz-tabs::-webkit-scrollbar { display: none; }
.bz-tab {
  padding: 10px 0 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--bz-muted);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: color .15s var(--bz-ease), border-color .15s var(--bz-ease);
}
.bz-tab:hover { color: var(--bz-ink); }
.bz-tab.is-active, .bz-tab[aria-current="page"], .bz-tab[aria-selected="true"] { border-bottom-color: var(--bz-accent); color: var(--bz-accent); font-weight: 700; }

/* corpo */
.bz-body { width: 100%; max-width: 1120px; padding: 24px 32px 48px; display: flex; flex-direction: column; gap: 16px; }
.bz-body--narrow { max-width: 880px; gap: 20px; }
body:has(.mai-fab) .bz-body { padding-bottom: 96px; }
.bz-stack { display: flex; flex-direction: column; gap: inherit; }

/* ============================ BLOCCHI ============================ */
.bz-card { background: #fff; border: 1px solid var(--bz-line); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.bz-card--tight { padding: 16px 20px; gap: 14px; }
.bz-card--flush { padding: 0; gap: 0; overflow: hidden; }
.bz-card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.bz-card--flush > .bz-card__head { padding: 20px 20px 16px; }
.bz-card__head > .bz-search { flex: 0 1 220px; }
.bz-card__title { font-size: 17px; font-weight: 700; color: var(--bz-ink); }
.bz-card__sub { margin-top: 4px; font-size: 14px; color: var(--bz-muted); }
.bz-section-title { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; color: var(--bz-ink); }
.bz-group-label { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--bz-muted); }
.bz-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.bz-grid--cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.bz-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bz-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.bz-row--between { justify-content: space-between; }
.bz-muted { color: var(--bz-muted); }
.bz-num { font-variant-numeric: tabular-nums; }

/* campi */
.bz-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bz-label { font-size: 14px; font-weight: 600; color: var(--bz-ink); }
.bz-help { font-size: 13px; font-weight: 400; color: var(--bz-muted); }
.bz-error { font-size: 13px; font-weight: 600; color: var(--bz-danger); }
.bz-input, .bz-select, .bz-textarea {
  width: 100%;
  min-width: 0;
  height: 46px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid var(--bz-field);
  border-radius: 8px;
  background: #fff;
  color: var(--bz-ink);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  box-shadow: none;
  transition: border-color .15s var(--bz-ease), box-shadow .15s var(--bz-ease);
}
.bz-select { padding: 0 12px; }
.bz-textarea { height: auto; min-height: 120px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.bz-input::placeholder, .bz-textarea::placeholder { color: var(--bz-faint); }
.bz-input:hover, .bz-select:hover, .bz-textarea:hover { border-color: var(--bz-faint); }
.bz-input:focus, .bz-select:focus, .bz-textarea:focus { outline: none; border-color: var(--bz-accent); box-shadow: 0 0 0 4px rgba(37, 99, 235, .14); }
.bz-input.is-invalid, .bz-select.is-invalid, .bz-textarea.is-invalid { border-color: var(--bz-danger); }
.bz-input-group { display: flex; gap: 8px; }
.bz-input-group > .bz-select { flex: 0 0 92px; padding: 0 10px; }
.bz-input-group > .bz-input { flex: 1; }
.bz-input-group__actions { display: contents; }
.bz-search, .bz-iconinput { position: relative; display: flex; align-items: center; }
.bz-search > .bz-icon, .bz-iconinput > .bz-icon { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--bz-muted); pointer-events: none; }
.bz-search > .bz-input { height: 44px; padding-left: 42px; }
.bz-iconinput > .bz-input { padding-left: 42px; font-variant-numeric: tabular-nums; }
.bz-anchor { position: relative; }
.bz-counter { align-self: flex-end; font-size: 13px; color: var(--bz-muted); font-variant-numeric: tabular-nums; }

/* pulsanti */
.bz-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--bz-line);
  border-radius: 8px;
  background: #fff;
  color: var(--bz-ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s var(--bz-ease), border-color .15s var(--bz-ease), transform .15s var(--bz-ease);
}
.bz-btn:hover { background: var(--bz-bg); border-color: var(--bz-field); color: var(--bz-ink); }
.bz-btn:active { transform: translateY(1px); }
.bz-btn .bz-icon { width: 16px; height: 16px; }
.bz-btn--primary { padding: 0 16px; border-color: var(--bz-accent); background: var(--bz-accent); color: #fff; }
.bz-btn--primary:hover { border-color: var(--bz-accent-strong); background: var(--bz-accent-strong); color: #fff; }
.bz-btn--soft { border-color: transparent; background: var(--bz-accent-soft); color: var(--bz-accent-strong); }
.bz-btn--soft:hover { border-color: transparent; background: var(--bz-accent-tint); color: var(--bz-accent-strong); }
.bz-btn--danger { border-color: var(--bz-line); color: var(--bz-danger); }
.bz-btn--sm { height: 34px; padding: 0 12px; font-size: 13px; }
.bz-btn--lg { height: 44px; padding: 0 20px; font-size: 15px; }
.bz-btn--block { width: 100%; }
.bz-btn--icon { width: 34px; height: 34px; padding: 0; }
.bz-btn--field { flex: none; width: 46px; height: 46px; color: var(--bz-ink-2); }
.bz-btn--ghost { border-color: transparent; background: transparent; color: var(--bz-muted); }
.bz-btn--ghost:hover { border-color: transparent; background: var(--bz-bg); color: var(--bz-ink); }
.bz-btn--primary.bz-btn--danger { border-color: var(--bz-danger); background: var(--bz-danger); color: #fff; }
.bz-btn--primary.bz-btn--danger:hover { border-color: #a93226; background: #a93226; color: #fff; }
.bz-btn--ghost.bz-btn--danger { color: var(--bz-muted); }
.bz-btn--ghost.bz-btn--danger:hover { background: var(--bz-danger-bg); color: var(--bz-danger); }
.bz-btn[disabled], .bz-btn.is-disabled { opacity: .5; cursor: not-allowed; }

/* filtri a pillola */
.bz-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bz-chips--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.bz-chip {
  flex: none;
  height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--bz-line);
  border-radius: 9999px;
  background: #fff;
  color: var(--bz-ink-2);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s var(--bz-ease), border-color .15s var(--bz-ease);
}
.bz-chip:hover { background: var(--bz-bg); }
.bz-chip small { color: var(--bz-muted); font-size: 13px; font-weight: 700; }
.bz-chip.is-active, .bz-chip[aria-pressed="true"] { border-color: var(--bz-accent); background: var(--bz-accent); color: #fff; }
.bz-chip.is-active small, .bz-chip[aria-pressed="true"] small { color: var(--bz-accent-tint); }

/* segmentato (periodo, vista) */
.bz-seg { display: inline-flex; padding: 3px; border: 1px solid var(--bz-line); border-radius: 10px; background: var(--bz-bg); }
.bz-seg__btn { height: 34px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--bz-ink-2); font-size: 14px; font-weight: 700; cursor: pointer; }
.bz-seg__btn.is-active, .bz-seg__btn[aria-pressed="true"] { background: #fff; color: var(--bz-ink); font-weight: 800; box-shadow: var(--bz-shadow-xs); }
.bz-seg--block { display: flex; }
.bz-seg--block .bz-seg__btn { flex: 1; }

/* scelta singola a righe */
.bz-radios { display: flex; flex-direction: column; gap: 8px; }
.bz-radio { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border: 1px solid var(--bz-field); border-radius: 8px; background: #fff; color: var(--bz-ink); font-size: 14px; font-weight: 600; cursor: pointer; transition: border-color .15s var(--bz-ease), background-color .15s var(--bz-ease); }
.bz-radio:hover { border-color: var(--bz-faint); }
.bz-radio input { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; flex: none; margin: 0; border: 2px solid var(--bz-field); border-radius: 50%; background: #fff; transition: border-color .15s var(--bz-ease), border-width .15s var(--bz-ease); }
.bz-radio input:checked { border: 5px solid var(--bz-accent); }
.bz-radio:has(input:checked) { border-color: var(--bz-accent); background: var(--bz-accent-soft); }

/* stati */
.bz-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 9999px; font-size: 12px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.bz-pill--info { background: var(--bz-accent-tint); color: var(--bz-accent-strong); }
.bz-pill--ok { background: var(--bz-ok-bg); color: var(--bz-ok); }
.bz-pill--warn { background: var(--bz-warn-bg); color: var(--bz-warn); }
.bz-pill--danger { background: var(--bz-danger-bg); color: var(--bz-danger); }
.bz-pill--muted { background: var(--bz-chip); color: #4b5563; }
.bz-count { min-width: 18px; height: 18px; padding: 0 5px; display: inline-grid; place-items: center; border-radius: 9999px; background: var(--bz-accent-tint); color: var(--bz-accent-strong); font-size: 11px; font-weight: 800; }

/* interruttore */
.bz-switch { position: relative; width: 40px; height: 24px; flex: none; border: 0; border-radius: 9999px; background: var(--bz-chip-hover); cursor: pointer; transition: background-color .15s var(--bz-ease); }
.bz-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s var(--bz-ease); }
.bz-switch.is-on, .bz-switch[aria-checked="true"] { background: var(--bz-accent); }
.bz-switch.is-on::after, .bz-switch[aria-checked="true"]::after { transform: translateX(16px); }

/* tabella a righe (grid) */
.bz-table { min-width: 0; overflow-x: auto; background: #fff; border: 1px solid var(--bz-line); border-radius: 12px; }
.bz-table__head, .bz-table__row { display: grid; align-items: center; gap: 14px; padding: 0 20px; }
.bz-table__head { padding-top: 12px; padding-bottom: 12px; background: var(--bz-bg); border-bottom: 1px solid var(--bz-line); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--bz-muted); }
.bz-table__row { min-height: 64px; border-bottom: 1px solid var(--bz-line); font-size: 14px; }
.bz-table__row:last-child { border-bottom: 0; }
.bz-table__row:hover { background: #fbfcfd; }
.bz-table__row.is-dim { color: var(--bz-muted); }

/* elenco a righe */
.bz-list { margin: 0; padding: 0; list-style: none; background: #fff; border: 1px solid var(--bz-line); border-radius: 12px; overflow: hidden; }
.bz-list__item { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--bz-line); }
.bz-list__item:last-child { border-bottom: 0; }
.bz-list__item.is-unread { background: #fbfcff; }
.bz-list--inset { border: 0; border-top: 1px solid var(--bz-line); border-radius: 0; }
.bz-list--center > .bz-list__item { align-items: center; }
.bz-list__body { flex: 1; min-width: 0; }
.bz-list__group { padding: 8px 18px; background: var(--bz-bg); border-bottom: 1px solid var(--bz-line); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--bz-muted); }
.bz-list__title { font-size: 15px; font-weight: 700; color: var(--bz-ink); }
.bz-list__text { margin-top: 2px; font-size: 14px; line-height: 1.5; color: var(--bz-ink-2); }
.bz-list__meta { font-size: 13px; color: var(--bz-muted); }
.bz-tile { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--bz-accent-soft); color: var(--bz-accent); }
.bz-tile--warn { background: var(--bz-warn-bg); color: var(--bz-warn); }
.bz-tile--muted { background: var(--bz-chip); color: #4b5563; }
.bz-tile--danger { background: var(--bz-danger-bg); color: var(--bz-danger); }
.bz-avatar { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--bz-accent-tint); color: var(--bz-accent-strong); font-size: 13px; font-weight: 800; }
.bz-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--bz-accent); }

/* indicatori */
.bz-kpi { background: #fff; border: 1px solid var(--bz-line); border-radius: 12px; padding: 16px 18px; }
.bz-kpi__label { margin-bottom: 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--bz-muted); }
.bz-kpi__row { display: flex; align-items: baseline; gap: 10px; }
.bz-kpi__value { font-size: 30px; font-weight: 800; letter-spacing: -0.015em; color: var(--bz-ink); font-variant-numeric: tabular-nums; }
.bz-kpi__note { margin-top: 4px; font-size: 13px; color: var(--bz-muted); }

/* avvisi */
.bz-banner { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-radius: 10px; background: var(--bz-accent-soft); color: var(--bz-accent-strong); font-size: 14px; line-height: 1.5; }
.bz-banner .bz-icon { width: 18px; height: 18px; margin-top: 2px; }
.bz-banner--warn { background: var(--bz-warn-bg); color: var(--bz-warn); }
.bz-banner--danger { background: var(--bz-danger-bg); color: var(--bz-danger); }
.bz-banner--ok { background: var(--bz-ok-bg); color: var(--bz-ok); }
.bz-banner__link, .bz-banner__link:hover { color: inherit; font-weight: 700; text-decoration: underline; }

/* stato vuoto */
.bz-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 24px; text-align: center; color: var(--bz-ink-2); }
.bz-empty__mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--bz-accent-soft); color: var(--bz-accent); }
.bz-empty__title { font-size: 16px; font-weight: 700; color: var(--bz-ink); }
.bz-empty__text { max-width: 360px; font-size: 14px; color: var(--bz-muted); }
.bz-empty--inset { border-top: 1px solid var(--bz-line); }

/* striscia dei giorni */
.bz-days { display: flex; gap: 8px; overflow-x: auto; padding: 6px 4px 2px; scrollbar-width: none; }
.bz-day {
  position: relative;
  flex: 0 0 56px;
  height: 62px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 1px solid var(--bz-line);
  border-radius: 10px;
  background: #fff;
  color: var(--bz-ink);
  cursor: pointer;
}
.bz-day__wd { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--bz-muted); }
.bz-day__n { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.bz-day .bz-count { position: absolute; top: -6px; right: -4px; }
.bz-day.is-selected, .bz-day[aria-current="date"] { border-color: var(--bz-accent); background: var(--bz-accent); color: #fff; }
.bz-day.is-selected .bz-day__wd, .bz-day[aria-current="date"] .bz-day__wd { color: var(--bz-accent-tint); }
.bz-day.is-selected .bz-count, .bz-day[aria-current="date"] .bz-count { background: #fff; box-shadow: 0 0 0 1px var(--bz-accent); }

/* editor di testo (descrizione) */
.bz-editor { border: 1px solid var(--bz-field); border-radius: 8px; background: #fff; overflow: hidden; transition: border-color .15s var(--bz-ease), box-shadow .15s var(--bz-ease); }
.bz-editor:focus-within { border-color: var(--bz-accent); box-shadow: 0 0 0 4px rgba(37, 99, 235, .14); }
.bz-editor__bar { display: flex; align-items: center; gap: 2px; padding: 6px 8px; border-bottom: 1px solid var(--bz-line); background: var(--bz-bg); }
.bz-editor__bar .bz-btn--icon { width: 32px; height: 32px; color: var(--bz-ink-2); }
.bz-editor__sep { width: 1px; height: 20px; margin: 0 6px; background: var(--bz-line); }
.bz-editor__area { min-height: 140px; padding: 12px 14px; font-size: 15px; line-height: 1.6; color: var(--bz-ink); outline: none; }
.bz-editor__foot { display: flex; justify-content: flex-end; padding: 0 12px 10px; font-size: 13px; color: var(--bz-muted); font-variant-numeric: tabular-nums; }

/* voci scelte con la x per toglierle (servizi offerti / non offerti) */
.bz-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.bz-tag { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 6px 0 12px; border-radius: 9999px; background: var(--bz-accent-soft); color: var(--bz-accent-strong); font-size: 13px; font-weight: 700; }
.bz-tag--muted { background: var(--bz-chip); color: var(--bz-ink-2); }
.bz-tag__x { width: 22px; height: 22px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; opacity: .7; }
.bz-tag__x:hover { opacity: 1; background: rgba(17, 24, 39, .08); }
.bz-tag__x .bz-icon { width: 14px; height: 14px; }

/* scelta di un file */
.bz-file { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px; border: 1px dashed var(--bz-field); border-radius: 8px; background: var(--bz-bg); }
.bz-file__name { flex: 1 1 140px; min-width: 0; font-size: 14px; color: var(--bz-muted); }
.bz-file__name b { display: block; color: var(--bz-ink); font-weight: 700; }
.bz-file__thumb { width: 64px; height: 48px; flex: none; border-radius: 8px; object-fit: cover; }
.bz-file.is-filled { background: #fff; }

/* orari della settimana */
.bz-week { display: flex; flex-direction: column; border: 1px solid var(--bz-line); border-radius: 10px; overflow: hidden; }
.bz-week__head, .bz-week__row { display: grid; grid-template-columns: minmax(150px, 1.1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(110px, auto); align-items: center; gap: 12px; padding: 10px 16px; }
.bz-week__head { background: var(--bz-bg); border-bottom: 1px solid var(--bz-line); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--bz-muted); }
.bz-week__group { border-bottom: 1px solid var(--bz-line); }
.bz-week__group:last-child { border-bottom: 0; }
.bz-week__row { min-height: 60px; }
.bz-week__row.is-extra { min-height: 0; padding-top: 0; }
.bz-week__row > .bz-linkbtn { justify-self: start; }
.bz-week__msg { grid-column: 2 / 4; }
.bz-week__day { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 700; color: var(--bz-ink); }
.bz-week__row .bz-input, .bz-week__row .bz-select { height: 40px; font-variant-numeric: tabular-nums; }
.bz-week__closed { grid-column: 2 / 4; }
.bz-linkbtn { padding: 0; border: 0; background: none; color: var(--bz-accent); font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.bz-linkbtn:hover { color: var(--bz-accent-strong); }
.bz-linkbtn--muted { color: var(--bz-muted); }

/* due colonne (modulo + elenco) */
.bz-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; align-items: start; }

/* badge della data (chiusure, eventi) */
.bz-datebadge { width: 52px; flex: none; display: flex; flex-direction: column; align-items: center; padding: 6px 0; border-radius: 10px; background: var(--bz-accent-soft); color: var(--bz-accent-strong); line-height: 1.1; }
.bz-datebadge b { font-size: 18px; font-weight: 800; }
.bz-datebadge small { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.bz-datebadge--muted { background: var(--bz-chip); color: var(--bz-ink-2); }

/* calendario a comparsa sotto un campo data */
.bz-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 50; }
.bz-cal { width: 304px; max-width: calc(100vw - 32px); padding: 12px; background: #fff; border: 1px solid var(--bz-line); border-radius: 12px; box-shadow: var(--bz-shadow-lg); }
.bz-cal__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.bz-cal__month { font-size: 15px; font-weight: 800; color: var(--bz-ink); }
.bz-cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.bz-cal__wd { height: 28px; display: grid; place-items: center; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--bz-muted); }
.bz-cal__day { height: 38px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--bz-ink); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; }
.bz-cal__day:hover { background: var(--bz-bg); }
.bz-cal__day.is-today { box-shadow: inset 0 0 0 1px var(--bz-accent); color: var(--bz-accent); }
.bz-cal__day.is-selected, .bz-cal__day[aria-pressed="true"] { background: var(--bz-accent); color: #fff; box-shadow: none; }
.bz-cal__day[disabled] { background: none; color: var(--bz-faint); font-weight: 500; cursor: default; }
.bz-cal__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--bz-line); }

/* codice QR */
.bz-qr { position: relative; width: 216px; height: 216px; margin: 0 auto; padding: 10px; border: 1px solid var(--bz-line); border-radius: 12px; background: #fff; }
.bz-qr__code, .bz-qr__code > svg { display: block; width: 100%; height: 100%; }
.bz-qr__logo { position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; padding: 4px; border-radius: 10px; background: #fff; }
.bz-color { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--bz-ink-2); }
.bz-color input[type="color"] { width: 46px; height: 46px; padding: 4px; border: 1px solid var(--bz-field); border-radius: 8px; background: #fff; cursor: pointer; }

/* conferma breve in basso */
.bz-toast { position: fixed; left: 50%; bottom: 24px; z-index: 1100; display: inline-flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 10px; background: var(--bz-ink); color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap; box-shadow: var(--bz-shadow-lg); transform: translateX(-50%); }
.bz-toast .bz-icon { width: 18px; height: 18px; color: var(--bz-ok-bg); }
.bz-toast--error { background: var(--bz-danger); width: max-content; max-width: calc(100vw - 32px); white-space: normal; }
.bz-toast--error .bz-icon { color: #fff; }

/* finestre */
.bz-overlay { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(17, 24, 39, .45); }
/* JAY deve restare dietro alle finestre del gestore, anche su telefono. */
.bz-modal-open .mai-fab { visibility: hidden !important; }
.bz-modal-open .mai-panel { z-index: 999 !important; }
.bz-modal { width: 100%; max-width: 560px; max-height: calc(100dvh - 48px); overflow: auto; background: #fff; border: 1px solid var(--bz-line); border-radius: 16px; box-shadow: var(--bz-shadow-lg); }
.bz-modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--bz-line); background: var(--bz-surface-tint); }
.bz-modal__head--center { align-items: center; padding-bottom: 4px; }
.bz-modal__title { font-size: 18px; font-weight: 800; color: var(--bz-ink); }
.bz-modal__body { display: flex; flex-direction: column; gap: 16px; padding: 16px 24px; }
.bz-modal__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 24px; border-top: 1px solid var(--bz-line); background: var(--bz-surface-tint); position: sticky; bottom: 0; z-index: 2; }
.bz-modal--sm { max-width: 420px; }
.bz-modal__foot-label { margin-right: auto; }
.bz-modal--qr { max-width: 400px; }
.bz-modal__sub { margin-top: 2px; font-size: 13px; color: var(--bz-muted); overflow-wrap: anywhere; }
.bz-modal__text { font-size: 14px; line-height: 1.5; color: var(--bz-muted); }
.bz-sheetnav { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px 20px; }
.bz-sheetnav__sep, .bz-nav-sep { height: 1px; margin: 8px 12px; background: var(--bz-line); }

/* barra in basso e menu completo (mobile) */
.bz-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; height: 68px; padding-bottom: 16px; display: none; background: rgba(255, 255, 255, .97); box-shadow: inset 0 1px 0 var(--bz-line), 0 -10px 30px -18px rgba(17, 24, 39, .3); }
.bz-tabbar__item { position: relative; flex: 1; display: grid; place-items: center; padding: 0; border: 0; background: none; color: var(--bz-muted); cursor: pointer; }
.bz-tabbar__dot { position: absolute; top: 12px; left: 50%; width: 8px; height: 8px; margin-left: 4px; border-radius: 50%; background: var(--bz-accent); box-shadow: 0 0 0 2px #fff; }
.bz-tabbar__item .bz-icon { width: 24px; height: 24px; }
.bz-tabbar__item:has(.bz-tabbar__label) { display: flex; flex-direction: column; justify-content: center; gap: 3px; min-width: 0; }
.bz-tabbar__label { display: block; max-width: 100%; padding: 0 3px; font-size: 10px; line-height: 1.2; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bz-tabbar__item.is-active, .bz-tabbar__item[aria-current="page"] { color: var(--bz-accent); }
.bz-tabbar__item.is-active::before, .bz-tabbar__item[aria-current="page"]::before { content: ''; position: absolute; top: 0; left: 50%; width: 26px; height: 3px; margin-left: -13px; border-radius: 0 0 3px 3px; background: var(--bz-accent); }

/* ============================ RESPONSIVE ============================ */
@media (max-width: 890px) and (min-width: 641px) {
  .bz-side { flex-basis: 100px; width: 100px; }
  .bz-side__brand { justify-content: center; padding: 18px 0 14px; }
  .bz-side__name, .bz-nav-item > span, .bz-nav-badge, .bz-venue__text { display: none; }
  .bz-nav-group { height: 1px; margin: 8px 12px; overflow: hidden; font-size: 0; background: var(--bz-line); }
  .bz-nav-item { justify-content: center; padding: 11px 0; }
  .bz-venue { justify-content: center; }
}
@media (max-width: 640px) {
  .bz-app .bz-side { display: none; }
  .bz-tabbar { display: flex; }
  .bz-main { padding-bottom: 68px; }
  .bz-top { padding: 18px 16px 16px; }
  .bz-top.has-tabs { padding-bottom: 0; }
  .bz-title { font-size: 24px; }
  .bz-tabs { gap: 20px; margin-top: 12px; }
  .bz-body { padding: 14px 16px 32px; gap: 12px; }
  .bz-card:not(.bz-card--flush) { padding: 18px 16px; }
  .bz-card--flush > .bz-card__head { padding: 16px; }
  .bz-card__head > .bz-search { flex-basis: 100%; }
  .bz-split { grid-template-columns: minmax(0, 1fr); }
  .bz-week__head { display: none; }
  .bz-week__row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 10px; padding: 12px; }
  .bz-week__day { grid-column: 1 / -1; }
  .bz-week__row > .bz-linkbtn { grid-column: 1 / -1; justify-self: start; }
  .bz-week__row.is-extra > span:empty { display: none; }
  .bz-week__closed, .bz-week__msg { grid-column: 1 / -1; }
  .bz-week__row:has(> .addhours[hidden])::after { content: ""; }
  .bz-toast { bottom: 84px; }
  .bz-overlay { align-items: flex-end; padding: 0; }
  .bz-modal { max-width: none; max-height: 92dvh; border-radius: 16px 16px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .bz * { transition: none !important; }
}

/* RTL (arabo, <html dir="rtl">): solo regole sotto [dir="rtl"], la resa LTR non cambia. */
[dir="rtl"] .bz-side { border-right: 0; border-left: 1px solid var(--bz-line); }
[dir="rtl"] .bz-nav-item.is-active, [dir="rtl"] .bz-nav-item[aria-current="page"] { box-shadow: inset -3px 0 var(--bz-accent); }
[dir="rtl"] .bz-nav-badge { margin-left: 0; margin-right: auto; direction: ltr; unicode-bidi: isolate; } /* «99+», non «+99» */
[dir="rtl"] .bz-search > .bz-icon, [dir="rtl"] .bz-iconinput > .bz-icon { left: auto; right: 14px; }
[dir="rtl"] .bz-search > .bz-input, [dir="rtl"] .bz-iconinput > .bz-input { padding-left: 14px; padding-right: 42px; }
[dir="rtl"] .bz-switch::after { left: auto; right: 2px; }
[dir="rtl"] .bz-switch.is-on::after, [dir="rtl"] .bz-switch[aria-checked="true"]::after { transform: translateX(-16px); }
[dir="rtl"] .bz-day .bz-count { right: auto; left: -4px; }
[dir="rtl"] .bz-tag { padding: 0 12px 0 6px; }
[dir="rtl"] .bz-pop { left: auto; right: 0; }
[dir="rtl"] .bz-modal__foot-label { margin-right: 0; margin-left: auto; }
[dir="rtl"] .bz-tabbar__dot { margin-left: -12px; }
/* frecce e chevron sinistra/destra (indietro, precedente/successivo): a specchio */
[dir="rtl"] svg:has(> path:first-child:is([d="m15 6-6 6 6 6"], [d="m9 6 6 6-6 6"], [d="m11 6-6 6 6 6"], [d="m6 6 6 6-6 6"], [d="M19 12H5"])) { transform: scaleX(-1); }
