:root {
  --bg: #170910;
  --panel: #221019;
  --panel-2: #2b1420;
  --wine: #7c1f3f;
  --mauve: #cf85a6;
  --rose: #ecb0cc;
  --ink: #f5e9ee;
  --ink-dim: #c9a9b8;
  --border: #3a1e2b;
  --ok: #7fbf8f;
  --danger: #e08a8a;
  --radius: 10px;
  font-size: 15px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

a { color: var(--rose); text-decoration: none; }
a:hover { text-decoration: underline; }

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 22px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  flex: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}
.topbar .brand { flex: none; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); font-size: 1.05rem; white-space: nowrap; }
.topbar .brand img { display: block; border-radius: 50%; }
.topbar .brand span { color: var(--mauve); font-weight: 400; }

.menu-toggle {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.menu-toggle:hover { background: rgba(255, 255, 255, 0.05); border-color: var(--mauve); }

/* ---------------------------------------------------------------- menu admin (drawer da destra) */
.admin-menu { position: fixed; inset: 0; z-index: 300; }
.admin-menu[hidden] { display: none; }
.admin-menu__backdrop {
  position: absolute; inset: 0;
  background: rgba(10, 4, 7, 0.6);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.admin-menu.is-open .admin-menu__backdrop { opacity: 1; }

.admin-menu__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(320px, 86vw);
  background: var(--panel);
  border-left: 1px solid var(--border);
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(.16, 1, .3, 1);
}
.admin-menu.is-open .admin-menu__panel { transform: translateX(0); }

.admin-menu__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 18px; border-bottom: 1px solid var(--border);
}
.admin-menu__user { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); font-size: 0.92rem; }
.admin-menu__close {
  background: transparent; border: 0; color: var(--ink-dim); cursor: pointer;
  display: flex; padding: 6px; border-radius: 6px;
}
.admin-menu__close:hover { color: var(--ink); background: rgba(255, 255, 255, 0.05); }

.admin-menu__links { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.admin-menu__links a {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 14px; border-radius: 9px;
  color: var(--ink-dim); font-size: 0.94rem;
  transition: background 0.2s, color 0.2s;
}
.admin-menu__links a:hover { background: rgba(255, 255, 255, 0.05); color: var(--ink); text-decoration: none; }
.admin-menu__links a.is-current { background: rgba(207, 133, 166, 0.16); color: var(--ink); }
.admin-menu__links a.is-current .material-symbols-outlined { color: var(--mauve); }

.admin-menu__foot { border-top: 1px solid var(--border); padding: 10px; }
.admin-menu__site {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 14px; border-radius: 9px;
  color: var(--mauve); font-size: 0.94rem;
  transition: background 0.2s, color 0.2s;
}
.admin-menu__site:hover { background: rgba(207, 133, 166, 0.12); color: var(--ink); text-decoration: none; }
.admin-menu__logout {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 14px; border-radius: 9px;
  color: var(--danger); font-size: 0.94rem;
  transition: background 0.2s;
}
.admin-menu__logout:hover { background: rgba(224, 138, 138, 0.08); text-decoration: none; }

body.admin-menu-open { overflow: hidden; }

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

h1 { font-size: 1.5rem; margin: 0 0 6px; }
h2 { font-size: 1.15rem; margin: 0 0 12px; }
.subtitle { color: var(--ink-dim); margin: 0 0 24px; }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
}

.btn {
  display: inline-block;
  background: linear-gradient(90deg, var(--wine), var(--mauve));
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink);
}
.btn.danger {
  background: transparent;
  border: 1px solid var(--danger);
  color: var(--danger);
}
.btn.small { padding: 6px 12px; font-size: 0.85rem; }

.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: left; font-size: 0.92rem; }
th { color: var(--ink-dim); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: .04em; }
tr:hover td { background: rgba(255,255,255,0.02); }
td.num, th.num { text-align: right; }

.empty { color: var(--ink-dim); padding: 30px 0; text-align: center; }

.lead-card { padding: 18px 22px; }
.lead-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.lead-card__date { display: block; color: var(--ink-dim); font-size: 0.8rem; margin-top: 2px; }
.lead-card__meta { color: var(--ink-dim); font-size: 0.88rem; margin-bottom: 10px; }
.lead-card__meta a { color: var(--ink-dim); }
.lead-card__meta a:hover { color: var(--mauve); }
.lead-card__message { font-size: 0.92rem; white-space: pre-line; border-top: 1px solid var(--border); padding-top: 10px; margin: 0; }

form .field { margin-bottom: 16px; }
label { display: block; margin-bottom: 6px; font-size: 0.85rem; color: var(--ink-dim); }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], textarea, select {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 11px;
  color: var(--ink);
  font-size: 0.95rem;
  font-family: inherit;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--mauve); outline-offset: 1px; }
textarea { resize: vertical; min-height: 70px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .topbar { padding: 10px 14px; gap: 10px; }
  .topbar .brand span { display: none; }
}

#voci-table th, #voci-table td { padding: 8px 6px; }
#voci-table input { font-size: 0.9rem; padding: 7px 8px; }
#voci-table textarea { font-size: 0.9rem; padding: 7px 8px; min-height: 44px; resize: vertical; }
#voci-table .col-desc { width: 40%; }
#voci-table .col-qta, #voci-table .col-prezzo, #voci-table .col-sconto { width: 12%; }
#voci-table .col-tot { width: 14%; text-align: right; white-space: nowrap; }
#voci-table .col-actions { width: 6%; text-align: center; }

.remove-voce {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--danger);
  border-radius: 6px;
  cursor: pointer;
  padding: 6px 10px;
}

.totals { margin-top: 16px; display: flex; justify-content: flex-end; }
.totals table { width: auto; min-width: 280px; }
.totals td { border: none; padding: 5px 8px; }
.totals tr.grand td { font-size: 1.1rem; font-weight: 700; border-top: 1px solid var(--border); padding-top: 10px; }

.msg { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; }
.msg.ok { background: rgba(127,191,143,0.12); border: 1px solid var(--ok); color: var(--ok); }
.msg.error { background: rgba(224,138,138,0.12); border: 1px solid var(--danger); color: var(--danger); }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-card { width: 100%; max-width: 360px; }
.login-card h1 { text-align: center; margin-bottom: 20px; }

.actions-cell { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- virtual tour: elenco */
.vt-list { display: flex; flex-direction: column; gap: 14px; }
.vt-item { display: grid; grid-template-columns: 150px 1fr auto; gap: 18px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.vt-item:last-child { border-bottom: 0; padding-bottom: 0; }
.vt-item__thumb { display: grid; place-items: center; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: var(--panel-2); color: var(--ink-dim); }
.vt-item__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vt-item__body h2 { margin: 0 0 4px; font-size: 1.1rem; }
.vt-item__body h2 a { color: var(--ink); }
.vt-item__meta { margin: 0; color: var(--ink-dim); font-size: .85rem; }
.vt-item__url { margin: 4px 0 0; color: var(--ink-dim); font-size: .8rem; opacity: .75; word-break: break-all; }
.vt-badge { display: inline-block; margin-right: 6px; padding: 1px 8px; border-radius: 99px; font-size: .75rem; border: 1px solid var(--border); color: var(--ink-dim); }
.vt-badge.is-on { border-color: var(--ok); color: var(--ok); }
.vt-demo-card { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; border-style: dashed; }
.vt-demo-card h2 { margin-bottom: 4px; }
@media (max-width: 760px) { .vt-item { grid-template-columns: 110px 1fr; } .vt-item .actions-cell { grid-column: 1 / -1; } }

/* ---------------------------------------------------------------- virtual tour: editor */
.vt-crumb { margin: 0 0 4px; font-size: .85rem; }
.vt-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.vt-card-head .subtitle { margin-bottom: 16px; max-width: 640px; }
.vt-file-btn { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.btn .material-symbols-outlined { font-size: 18px; vertical-align: -4px; }
.btn.small .material-symbols-outlined { font-size: 16px; }
.vt-prefix { display: flex; align-items: center; background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; padding-left: 11px; color: var(--ink-dim); }
.vt-prefix input { border: 0; background: transparent; padding-left: 2px; padding-right: 2px; }
.vt-prefix span:last-child { padding-right: 11px; }
.vt-color input[type=color] { width: 100%; height: 40px; padding: 3px; border-radius: 6px; border: 1px solid var(--border); background: var(--panel-2); cursor: pointer; }
.vt-check { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: .92rem; cursor: pointer; margin: 4px 0 0; }
.vt-check input { width: 18px; height: 18px; accent-color: var(--mauve); }
.vt-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }

.vt-uploads:not(:empty) { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.vt-upload { display: grid; grid-template-columns: minmax(0, 1fr) 160px 110px; gap: 12px; align-items: center; font-size: .85rem; }
.vt-upload__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vt-upload__bar { height: 6px; border-radius: 6px; background: var(--panel-2); overflow: hidden; }
.vt-upload__bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--wine), var(--mauve)); transition: width .2s; }
.vt-upload__state { color: var(--ink-dim); text-align: right; }
.vt-upload.is-error { grid-template-columns: minmax(0, 1fr) 2fr; }
.vt-upload.is-error .vt-upload__bar { display: none; }
.vt-upload.is-error .vt-upload__state { color: var(--danger); text-align: left; }

.vt-scenes { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.vt-scene { position: relative; border: 2px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--panel-2); transition: border-color .2s; }
.vt-scene.is-current { border-color: var(--mauve); }
.vt-scene__open { display: block; width: 100%; padding: 0; border: 0; background: none; color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.vt-scene__open img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.vt-scene__title { display: block; padding: 7px 10px 0; font-weight: 600; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vt-scene__meta { display: block; padding: 0 10px 8px; color: var(--ink-dim); font-size: .75rem; }
.vt-scene__move { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; }
.vt-scene__move button { width: 26px; height: 26px; border-radius: 6px; border: 0; background: rgba(0, 0, 0, .55); color: #fff; cursor: pointer; font-size: 1rem; line-height: 1; }
.vt-scene__move button:disabled { opacity: .3; cursor: default; }

.vt-editor__grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 22px; }
.vt-editor__stage { position: relative; }
.vt-viewer { width: 100%; height: 480px; border-radius: 10px; overflow: hidden; background: #0d0508; }
.vt-editor.is-placing .vt-viewer, .vt-editor.is-placing .vt-viewer .pnlm-dragfix, .vt-editor.is-placing .vt-viewer .pnlm-ui { cursor: crosshair !important; }
.vt-place-hint { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 5; display: flex; align-items: center; gap: 10px; background: var(--wine); color: #fff; padding: 8px 10px 8px 14px; border-radius: 99px; font-size: .85rem; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); white-space: nowrap; max-width: calc(100% - 20px); }
.vt-place-hint .btn { background: rgba(255, 255, 255, .15); border-color: transparent; color: #fff; }
.vt-help { color: var(--ink-dim); font-size: .8rem; margin: 8px 0 0; }
.vt-view-info { color: var(--ink-dim); font-size: .78rem; }
.vt-hs-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 14px; margin: 6px 0 10px; }
.vt-hs-head h3 { margin: 0; font-size: 1rem; }
.vt-hs-list { display: flex; flex-direction: column; gap: 8px; max-height: 430px; overflow-y: auto; padding-right: 2px; }
.vt-hs-empty { color: var(--ink-dim); font-size: .85rem; margin: 0; }
.vt-hs { border: 1px solid var(--border); border-radius: 8px; padding: 9px; display: flex; flex-direction: column; gap: 6px; background: var(--panel-2); }
.vt-hs.is-selected { border-color: var(--mauve); }
.vt-hs__top { display: flex; gap: 6px; align-items: center; }
.vt-hs__top select { width: auto; flex: 1 1 0; min-width: 0; padding: 6px 8px; font-size: .85rem; }
.vt-hs__top select[data-f=tipo] { flex: 0 0 auto; }
.vt-hs input, .vt-hs textarea { padding: 6px 8px; font-size: .88rem; min-height: 0; }
.vt-hs__tools { display: flex; gap: 2px; margin-left: auto; }
.vt-hs__tools button { background: none; border: 0; color: var(--ink-dim); cursor: pointer; padding: 3px; border-radius: 5px; display: flex; }
.vt-hs__tools button:hover { color: var(--ink); background: rgba(255, 255, 255, .06); }
.vt-hs__tools button[data-a=del]:hover { color: var(--danger); }
.vt-hs__tools .material-symbols-outlined { font-size: 19px; }
.vt-hs__pos { color: var(--ink-dim); font-size: .72rem; }
.vt-hs__orient { display: flex; gap: 10px; align-items: flex-end; }
.vt-hs__orient label { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 2px; margin: 0; color: var(--ink-dim); font-size: .74rem; }
.vt-hs__orient output { color: var(--ink); font-variant-numeric: tabular-nums; }
.vt-hs .vt-hs__orient input[type=range] { padding: 0; width: 100%; accent-color: var(--mauve); }
.vt-hs__orient button { background: none; border: 0; color: var(--ink-dim); cursor: pointer; padding: 3px; border-radius: 5px; display: flex; }
.vt-hs__orient button:hover { color: var(--ink); background: rgba(255, 255, 255, .06); }
.vt-hs__orient .material-symbols-outlined { font-size: 19px; }
.vt-hs .vt-hs__anim { padding: 6px 8px; font-size: .85rem; }
@media (max-width: 900px) { .vt-editor__grid { grid-template-columns: 1fr; } .vt-viewer { height: 360px; } .vt-hs-list { max-height: none; } }

/* hotspot nel viewer dell'editor (stesso aspetto della pagina pubblica) */
/* stessi stili di assets/css/virtualtour.css; --terra è impostato dall'editor col colore accento */
.hs { border-radius: 50%; cursor: pointer; box-sizing: border-box; background-position: center; background-size: contain; background-repeat: no-repeat; }
.hs::before { content: ""; position: absolute; inset: 0; -webkit-mask: var(--hs-icon) center / 50% no-repeat; mask: var(--hs-icon) center / 50% no-repeat; }
.hs--scene { background-color: var(--hs-bg, rgba(255, 255, 255, .92)); box-shadow: 0 0 0 0 rgba(255, 255, 255, .7); animation: pulse 2s infinite; }
.hs--scene::before { background: var(--hs-fg, var(--terra)); }
.hs--info { background-color: var(--hs-bg, var(--terra)); border: 3px solid #fff; }
.hs--info::before { background: var(--hs-fg, #fff); -webkit-mask-size: 58%; mask-size: 58%; }
.hs--img { background-color: transparent; border: 0; border-radius: 0; box-shadow: none; animation: none; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .35)); }
.hs--img::before { display: none; }
/* grafica dei punti su .hs-face (VTIcons.orient): ruotata (--hs-rot), piegata in prospettiva (--hs-tilt) e animata (data-anim) */
.hs--faced { background-color: transparent; border: 0; box-shadow: none; animation: none; }
.hs--faced.hs--img { background-image: none !important; filter: none; }
.hs--faced::before { display: none; }
.hs-face { position: absolute; inset: 0; border-radius: 50%; background-position: center; background-size: contain; background-repeat: no-repeat; transform: perspective(360px) rotateX(var(--hs-tilt, 0deg)) rotate(var(--hs-rot, 0deg)); }
.hs-face::before { content: ""; position: absolute; inset: 0; -webkit-mask: var(--hs-icon) center / 50% no-repeat; mask: var(--hs-icon) center / 50% no-repeat; }
.hs--faced.hs--scene .hs-face { background-color: var(--hs-bg, rgba(255, 255, 255, .92)); }
.hs--faced.hs--scene .hs-face::before { background: var(--hs-fg, var(--terra)); }
.hs--faced.hs--info .hs-face { background-color: var(--hs-bg, var(--terra)); border: 3px solid #fff; }
.hs--faced.hs--info .hs-face::before { background: var(--hs-fg, #fff); -webkit-mask-size: 58%; mask-size: 58%; }
.hs--faced.hs--img .hs-face { background-color: transparent; border: 0; border-radius: 0; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .35)); }
.hs--faced.hs--img .hs-face::before { display: none; }
/* passaggi come frecce appoggiate al pavimento: --rel (direzione rispetto allo sguardo) lo imposta VTIcons.floorTick */
.hs--floor .hs-face { inset: -18%; background-color: rgba(0, 0, 0, .22) !important; border: 3px solid var(--hs-bg, rgba(255, 255, 255, .92)); box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); transform: perspective(360px) rotateX(var(--hs-tilt, 60deg)) rotate(calc(var(--rel, 0deg) + var(--hs-rot, 0deg))); transition: background-color .2s; }
.hs--floor .hs-face::before { background: var(--hs-bg, #fff); -webkit-mask-size: 62%; mask-size: 62%; animation: floor-step 1.6s ease-in-out infinite; }
.hs--floor:hover .hs-face, .hs--floor:focus-visible .hs-face { background-color: var(--hs-fg, var(--terra)) !important; }
.hs--floor:focus-visible { outline: none; }
@keyframes floor-step { 0%, 100% { transform: translateY(6%); } 50% { transform: translateY(-8%); } }
/* animazioni per invitare al click (si fermano sotto il mouse, per non inseguire il puntatore) */
[data-anim="pulsa"] .hs-face { animation: pulse 2s infinite; }
[data-anim="lampeggia"] .hs-face { animation: hs-blink 1.2s ease-in-out infinite; }
[data-anim="battito"] .hs-face { animation: hs-beat 1.5s ease-in-out infinite; }
[data-anim="rimbalzo"] .hs-face { animation: hs-bounce 1.6s ease-in-out infinite; }
[data-anim="alone"] .hs-face { animation: hs-glow 1.8s ease-in-out infinite; }
.hs--faced:hover .hs-face { animation-play-state: paused; }
@keyframes hs-blink { 50% { opacity: .2; } }
@keyframes hs-beat { 0%, 45%, 100% { scale: 1; } 12% { scale: 1.22; } 24% { scale: 1; } 36% { scale: 1.14; } }
@keyframes hs-bounce { 0%, 55%, 100% { translate: 0 0; } 25% { translate: 0 -38%; } 40% { translate: 0 0; } 48% { translate: 0 -12%; } }
@keyframes hs-glow { 0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0)); } 50% { filter: drop-shadow(0 0 6px #fff) drop-shadow(0 0 14px var(--terra)); } }
@keyframes pulse { 70% { box-shadow: 0 0 0 16px rgba(255, 255, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); } }
.vt-viewer .is-selected { outline: 3px solid var(--mauve); outline-offset: 4px; }
.vt-viewer .hs-tip { position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%); background: #fffdf8; color: #2b2a24; padding: 7px 12px; border-radius: 9px; font: 600 .8rem/1.35 -apple-system, "Segoe UI", sans-serif; white-space: nowrap; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); opacity: 0; visibility: hidden; transition: .2s; pointer-events: none; }
.vt-viewer .hs-tip small { display: block; font-weight: 400; color: #6d685b; white-space: normal; width: max-content; max-width: 220px; }
.vt-viewer .pnlm-hotspot-base:hover .hs-tip, .vt-viewer .is-selected .hs-tip { opacity: 1; visibility: visible; }


.vt-savebar { position: sticky; bottom: 0; z-index: 20; display: flex; justify-content: flex-end; align-items: center; gap: 16px; margin: 0 -20px; padding: 12px 20px; background: rgba(23, 9, 16, .92); backdrop-filter: blur(8px); border-top: 1px solid var(--border); }
.vt-savebar [data-vt-dirty] { color: var(--ink-dim); font-size: .88rem; }
.vt-savebar [data-vt-dirty].is-dirty { color: var(--rose); }

/* ---------------------------------------------------------------- virtual tour: icone dei punti */
.vt-ico-prev { position: relative; display: inline-block; flex: none; }
.vt-ico-prev.hs--scene { animation: none; }
.vt-icons { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.vt-icons__col { border: 1px solid var(--border); border-radius: 8px; padding: 14px; background: var(--panel-2); }
.vt-icons__col h3 { margin: 0 0 2px; font-size: 1rem; }
.vt-icons__head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.vt-icons__stage { flex: none; width: 110px; height: 80px; border-radius: 8px; display: grid; place-items: center; background: #3a3526 center / cover no-repeat; box-shadow: inset 0 0 0 999px rgba(0, 0, 0, .15); }
.vt-icons__opts { margin-top: 12px; }
.vt-icons__opts .field { margin-bottom: 0; }
.vt-icons__opts input[type=range] { width: 100%; accent-color: var(--mauve); margin-top: 10px; }
.vt-color-row { display: flex; gap: 6px; align-items: center; }
.vt-color-row input[type=color] { width: 44px; height: 34px; padding: 2px; border-radius: 6px; border: 1px solid var(--border); background: var(--panel); cursor: pointer; flex: none; }
.vt-color-row .btn:disabled { opacity: .55; cursor: default; }
.vt-icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; }
.vt-icon-opt { position: relative; display: grid; place-items: center; gap: 2px; aspect-ratio: 1; padding: 0; border: 2px solid transparent; border-radius: 8px; background: #4a4234; cursor: pointer; }
.vt-icon-opt:hover { border-color: var(--border); background: #564d3d; }
.vt-icon-opt.is-selected { border-color: var(--mauve); }
.vt-icon-opt small { position: absolute; bottom: 1px; left: 0; right: 0; font-size: .58rem; color: #fff; opacity: .8; }
.vt-icon-opt__del { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; background: var(--danger); color: #fff; font-size: 13px; line-height: 18px; text-align: center; }
.vt-hs__ico { flex: none; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 1px solid var(--border); border-radius: 7px; background: #4a4234; cursor: pointer; }
.vt-hs__ico:hover { border-color: var(--mauve); }
.vt-picker { position: absolute; z-index: 400; width: 300px; max-width: calc(100vw - 16px); background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 12px; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); }
.vt-picker__title { margin: 0 0 8px; font-weight: 600; font-size: .88rem; }
.vt-picker__hint { margin: 8px 0 0; color: var(--ink-dim); font-size: .75rem; }
@media (max-width: 760px) { .vt-icons { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- virtual tour: visualizzatore ed export */
.vt-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 20px; }
.vt-opts .vt-check { margin: 0; }
input[type=range][data-bind] { width: 100%; accent-color: var(--mauve); }
.vt-export { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 24px; margin-top: 18px; border-top: 1px solid var(--border); padding-top: 18px; }
.vt-export h3 { margin: 0 0 4px; font-size: 1rem; }
.vt-export .subtitle { margin-bottom: 12px; font-size: .88rem; }
.vt-export__zip { border-left: 1px solid var(--border); padding-left: 24px; }
.vt-code { width: 100%; font: .8rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: #0f0609; border: 1px solid var(--border); border-radius: 6px; color: var(--rose); padding: 10px; resize: vertical; }
.vt-code--line { flex: 1 1 220px; width: auto; padding: 6px 8px; }
.vt-warn { margin: 8px 0 0; color: #e8c07a; font-size: .85rem; }
@media (max-width: 800px) { .vt-export { grid-template-columns: 1fr; } .vt-export__zip { border-left: 0; padding-left: 0; } }

/* ------------------------------------------------------------------ documenti */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.hint { color: var(--ink-dim); opacity: .75; font-size: .8rem; }
input[type=file] { width: 100%; padding: 8px; background: var(--panel-2); border: 1px dashed var(--border); border-radius: 8px; color: var(--ink); font: inherit; }
.doc-clienti { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 14px; max-height: 220px; overflow-y: auto; padding: 10px 12px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; }
.doc-check { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--ink); font-size: .9rem; cursor: pointer; }
.doc-check input { accent-color: var(--mauve); }
.doc-filename { display: block; color: var(--ink-dim); font-size: .8rem; word-break: break-all; }
.doc-muted { color: var(--ink-dim); }
.doc-filter select { width: auto; min-width: 220px; }
button[disabled] { opacity: .6; cursor: progress; }

/* ---------------------------------------------------------------- contatti da chiamare (foglio) */
.wrap--wide { max-width: none; padding-left: 24px; padding-right: 24px; }
.btn .material-symbols-outlined { font-size: 19px; vertical-align: -4px; margin-right: 2px; }

.ct-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ct-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ct-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--panel); border: 1px solid var(--border); color: var(--ink-dim);
  border-radius: 999px; padding: 5px 12px; font: inherit; font-size: .85rem; cursor: pointer;
}
.ct-chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.ct-chip .material-symbols-outlined { font-size: 17px; color: var(--c); }
.ct-chip b { font-weight: 600; color: var(--ink); opacity: .75; }
.ct-chip:hover { color: var(--ink); border-color: var(--mauve); }
.ct-chip.is-on { background: var(--panel-2); color: var(--ink); border-color: var(--c, var(--mauve)); box-shadow: inset 0 0 0 1px var(--c, var(--mauve)); }
.ct-search { position: relative; margin: 0; flex: 0 1 320px; }
.ct-search .material-symbols-outlined { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 19px; color: var(--ink-dim); pointer-events: none; }
.ct-search input { padding-left: 36px; }

.ct-bulk {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  background: rgba(207, 133, 166, .1); border: 1px solid var(--mauve);
  border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; font-size: .9rem;
}
.ct-bulk strong { margin-right: auto; font-weight: 600; }

.ct-sheet {
  position: relative;
  overflow: auto;
  max-height: calc(100vh - 250px);
  min-height: 260px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  scroll-padding: 36px 0 0 274px;
  outline: none;
}
.ct-sheet:focus-visible { box-shadow: 0 0 0 2px rgba(207, 133, 166, .35); }
.ct-table { width: max-content; min-width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; user-select: none; }
.ct-table th, .ct-table td {
  padding: 0 9px; height: 34px; font-size: .88rem;
  border-bottom: 1px solid var(--border); border-right: 1px solid var(--border);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ct-table tr:hover td { background: transparent; }
.ct-table thead th {
  position: sticky; top: 0; z-index: 3;
  background: var(--panel-2); color: var(--ink-dim);
  font-size: .74rem; cursor: pointer; text-overflow: clip;
}
.ct-table thead th:hover { color: var(--ink); }
.ct-arrow { color: var(--mauve); }
.ct-resize { position: absolute; top: 0; right: -4px; width: 9px; height: 100%; cursor: col-resize; z-index: 1; }
.ct-resize:hover { background: rgba(207, 133, 166, .4); }

.ct-table td { position: relative; background: var(--panel); cursor: cell; }
.ct-table tbody tr:hover td { background: #26121c; }
.ct-table tr.is-checked td { background: #2e1622; }
.ct-num { text-align: center; color: var(--ink-dim); font-size: .75rem !important; position: sticky !important; left: 0; z-index: 2; background: var(--panel-2) !important; cursor: default !important; padding: 0 6px !important; }
.ct-num input { width: 15px; height: 15px; margin: 0 6px 0 0; vertical-align: -3px; accent-color: var(--mauve); cursor: pointer; }
.ct-num span { display: inline-block; min-width: 22px; text-align: right; }
thead .ct-num { z-index: 5; }
.ct-sticky { position: sticky !important; left: 64px; z-index: 2; box-shadow: 3px 0 6px -3px rgba(0, 0, 0, .5); }
thead .ct-sticky { z-index: 5; }
.ct-c-azienda { font-weight: 600; }
.ct-c-note { color: var(--ink-dim); }
.ct-c-richiamo.is-late { color: var(--danger); font-weight: 600; }
.ct-c-richiamo.is-today { color: #e0b25b; font-weight: 600; }

.ct-table td.in-range { background: rgba(207, 133, 166, .14) !important; }
.ct-table td.is-active { box-shadow: inset 0 0 0 2px var(--mauve); background: rgba(207, 133, 166, .08) !important; }
.ct-table td.is-editing { overflow: visible; z-index: 6; }

.ct-link { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: none; padding: 3px; border-radius: 6px; background: var(--panel-2); color: var(--mauve); line-height: 0; }
.ct-link .material-symbols-outlined { font-size: 17px; }
.ct-table td:hover .ct-link { display: block; }
.ct-link:hover { color: var(--ink); background: var(--wine); }

.ct-pill {
  display: inline-flex; align-items: center; gap: 2px; max-width: 100%;
  padding: 2px 4px 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600;
  color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); cursor: pointer;
}
.ct-pill .material-symbols-outlined { font-size: 16px; opacity: .7; }
.ct-pill:hover { background: color-mix(in srgb, var(--c) 26%, transparent); }

.ct-acts { text-align: center; padding: 0 !important; }
.ct-act { display: inline-grid; place-items: center; width: 30px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-dim); cursor: pointer; }
.ct-act:hover { background: var(--panel-2); color: var(--mauve); }
.ct-act.is-done { color: var(--ok); }
.ct-act .material-symbols-outlined { font-size: 19px; }

.ct-editor {
  position: absolute; left: -1px; top: -1px; min-width: calc(100% + 2px); width: calc(100% + 2px); height: calc(100% + 2px);
  margin: 0; border-radius: 0 !important; padding: 0 9px !important; font-size: .88rem !important;
  background: #1c0c14 !important; border: 2px solid var(--mauve) !important; outline: none !important; color: var(--ink);
  user-select: text;
}
textarea.ct-editor { height: auto; min-height: 110px; width: 340px; padding: 7px 9px !important; resize: both; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
input.ct-editor[type=date] { color-scheme: dark; min-width: 150px; }

.ct-sheet .empty { position: sticky; left: 0; }
.ct-footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .85rem; color: var(--ink-dim); padding: 8px 2px 0; }
.ct-save.is-pending { color: #e0b25b; }
.ct-save.is-ok { color: var(--ok); }
.ct-save.is-error { color: var(--danger); font-weight: 600; }
.ct-help { font-size: .8rem; color: var(--ink-dim); margin: 10px 2px 0; line-height: 1.9; }
kbd { display: inline-block; font: inherit; font-size: .75rem; padding: 0 5px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; background: var(--panel-2); color: var(--ink); line-height: 1.5; }

.ct-menu {
  position: fixed; z-index: 100; min-width: 210px; padding: 5px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 9px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .55);
}
.ct-menu button {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 8px 10px; border: 0; border-radius: 6px; background: transparent;
  color: var(--ink); font: inherit; font-size: .9rem; text-align: left; cursor: pointer;
}
.ct-menu button i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.ct-menu button kbd { margin-left: auto; opacity: .6; }
.ct-menu button.is-hi, .ct-menu button:hover { background: rgba(207, 133, 166, .16); }
.ct-menu button[aria-selected=true] { font-weight: 700; }

.ct-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200;
  max-width: min(560px, calc(100vw - 32px));
  background: #2f1a25; border: 1px solid var(--ok); color: var(--ink);
  padding: 11px 18px; border-radius: 9px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); font-size: .92rem;
}
.ct-toast.is-error { border-color: var(--danger); }

.ct-dialog {
  width: min(820px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  background: var(--panel); color: var(--ink); border: 1px solid var(--border); border-radius: 12px;
  padding: 22px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
}
.ct-dialog::backdrop { background: rgba(10, 3, 7, .7); }
.ct-dialog__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.ct-dialog__head h2 { margin: 0; }
.ct-drop {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 40px 20px; border: 2px dashed var(--border); border-radius: 10px; cursor: pointer; margin: 0; color: var(--ink-dim);
}
.ct-drop .material-symbols-outlined { font-size: 42px; color: var(--mauve); }
.ct-drop strong { color: var(--ink); font-size: 1rem; }
.ct-drop:hover, .ct-drop.is-over { border-color: var(--mauve); background: rgba(207, 133, 166, .06); }
.ct-drop.is-busy { opacity: .6; pointer-events: none; }
.ct-dialog__msg { color: var(--danger); margin: 12px 0 0; min-height: 1em; }
.ct-map-wrap { max-height: 45vh; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.ct-map th { position: sticky; top: 0; background: var(--panel-2); z-index: 1; }
.ct-map td { vertical-align: middle; }
.ct-map select { padding: 6px 8px; font-size: .88rem; min-width: 170px; }
.ct-map__ex span { display: inline-block; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; background: var(--panel-2); border-radius: 5px; padding: 1px 7px; margin: 2px 4px 2px 0; font-size: .82rem; color: var(--ink-dim); }
.ct-map__ex em { color: var(--ink-dim); opacity: .6; font-size: .82rem; }
.ct-dialog__opts { display: grid; gap: 6px; margin-top: 14px; }
.ct-dialog__foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

@media (max-width: 640px) {
  .wrap--wide { padding-left: 12px; padding-right: 12px; }
  .ct-sheet { max-height: calc(100vh - 200px); scroll-padding-left: 0; }
  .ct-sticky { position: static !important; box-shadow: none; }
  .ct-help { display: none; }
}

/* ---------------------------------------------------------------- virtual tour: menu laterale */
.vt-menu-ed { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 22px; margin-top: 14px; }
.vt-menu-ed.is-off { opacity: .45; pointer-events: none; }
.vt-menu-ed .empty { padding: 8px 0; text-align: left; }
.vt-menu-items { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.vt-menu-item { display: flex; align-items: center; gap: 6px; }
.vt-menu-item input { flex: 1; min-width: 0; }
.vt-menu-item .btn { flex: none; padding: 6px 8px; }
.vt-menu-item .btn .material-symbols-outlined { font-size: 18px; }
.vt-menu-prev { position: relative; height: 300px; border-radius: 10px; overflow: hidden; background: #3a3526 center / cover no-repeat; box-shadow: inset 0 0 0 999px rgba(0, 0, 0, .15); }
.vt-menu-prev__panel { position: absolute; top: 0; bottom: 0; left: 0; width: 62%; padding: 10px 12px; background: rgba(18, 16, 14, .82); backdrop-filter: blur(8px); color: #fff; overflow: hidden; }
.vt-menu-prev.is-right .vt-menu-prev__panel { left: auto; right: 0; text-align: right; }
.vt-menu-prev__close { position: absolute; top: 4px; right: 9px; font-size: 18px; opacity: .8; }
.vt-menu-prev.is-right .vt-menu-prev__close { right: auto; left: 9px; }
.vt-menu-prev__logo { display: flex; justify-content: center; min-height: 26px; padding: 16px 0 12px; }
.vt-menu-prev__logo img { max-width: 100%; max-height: var(--menu-logo, 70px); object-fit: contain; }
.vt-menu-prev ul { list-style: none; margin: 0; padding: 0; }
.vt-menu-prev li { padding: 7px 2px; font-size: .78rem; font-weight: 600; border-top: 1px solid var(--menu-line, rgba(255, 255, 255, .1)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vt-menu-prev li:first-child { border-top: 0; }
@media (max-width: 900px) { .vt-menu-ed { grid-template-columns: 1fr; } .vt-menu-ed__preview { max-width: 300px; } }

/* ---------------------------------------------------------------- virtual tour: contenuto dei modali del menu */
.vt-me { width: min(1100px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; }
.vt-me__modes { display: flex; gap: 6px; margin-bottom: 14px; border-bottom: 1px solid var(--border); }
.vt-me__mode { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--ink-dim); font: inherit; font-weight: 600; cursor: pointer; margin-bottom: -1px; }
.vt-me__mode.is-active { color: var(--ink); border-bottom-color: var(--mauve); }
.vt-me__grid { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 16px; align-items: start; }
.vt-me__palette { position: sticky; top: 0; display: flex; flex-direction: column; gap: 6px; }
.vt-me__tool { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border: 1px dashed var(--border); border-radius: 8px; background: var(--panel-2); color: var(--ink); font: inherit; text-align: left; cursor: grab; }
.vt-me__tool:hover { border-color: var(--mauve); }
.vt-me__tool:active { cursor: grabbing; }
.vt-me__canvas { min-height: 260px; display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 2px dashed var(--border); border-radius: 10px; }
.vt-me__empty { margin: auto; color: var(--ink-dim); text-align: center; }
.vt-me__marker { height: 4px; border-radius: 4px; background: var(--mauve); flex: none; }
.vt-blk { border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); }
.vt-blk.is-dragging { opacity: .4; }
.vt-blk__head { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.vt-blk__head b { font-size: .85rem; }
.vt-blk__handle { cursor: grab; color: var(--ink-dim); user-select: none; }
.vt-blk__actions { margin-left: auto; display: flex; gap: 4px; }
.vt-blk__actions .btn { padding: 4px 6px; }
.vt-blk__actions .material-symbols-outlined { font-size: 17px; }
.vt-blk__body { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.vt-blk__body input[type=text], .vt-blk__body input[type=url] { width: 100%; }
.vt-blk__body .vt-row, .vt-blk__body .vt-help { margin: 0; }
.vt-blk__img { display: block; max-width: 100%; max-height: 260px; border-radius: 6px; background: #000; }
.vt-blk__drop { padding: 18px; border: 1px dashed var(--border); border-radius: 6px; color: var(--ink-dim); text-align: center; }
.vt-blk__hr { border: 0; border-top: 2px solid var(--border); margin: 6px 0; }
.vt-rte__bar { display: flex; flex-wrap: wrap; gap: 2px; }
.vt-rte__bar button { width: 32px; height: 30px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 6px; background: var(--panel); color: var(--ink); cursor: pointer; padding: 0; }
.vt-rte__bar button:hover { border-color: var(--mauve); }
.vt-rte__bar .material-symbols-outlined { font-size: 18px; }
.vt-rte { min-height: 110px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel); color: var(--ink); line-height: 1.55; outline: none; }
.vt-rte:focus { border-color: var(--mauve); }
.vt-rte:empty::before { content: attr(data-placeholder); color: var(--ink-dim); }
.vt-rte p, .vt-rte h4, .vt-rte ul, .vt-rte ol { margin: 0 0 .6em; }
.vt-rte a { color: var(--mauve); }
.vt-me__code { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vt-me__code textarea { min-height: 380px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; resize: vertical; }
.vt-me__preview { width: 100%; min-height: 380px; height: 100%; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.vt-me__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; }
@media (max-width: 820px) { .vt-me__grid, .vt-me__code { grid-template-columns: 1fr; } .vt-me__palette { position: static; flex-direction: row; flex-wrap: wrap; } }
