/* Pannelli di gestione (super admin e proprietari) — stile chiaro e moderno, icone Lucide. */
:root {
  --brand: #c0563b;
  --brand-600: #a8462d;
  --brand-50: #fdf3ef;
  --brand-100: #fae3da;
  --bg: #f7f7f5;
  --card: #ffffff;
  --ink: #18181b;
  --ink-2: #3f3f46;
  --muted: #71717a;
  --line: #e7e5e4;
  --line-2: #f1f0ee;
  --soft: #f5f5f4;
  --ok: #15803d;
  --ok-50: #ecfdf3;
  --err: #b91c1c;
  --err-50: #fef2f2;
  --warn: #b45309;
  --warn-50: #fffbeb;
  --info: #1d4ed8;
  --info-50: #eff6ff;
  --in: #0f9f6e;
  --out: #e0674a;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(24,24,27,.04), 0 1px 3px rgba(24,24,27,.06);
  --shadow-lg: 0 10px 30px rgba(24,24,27,.08);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14.5px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-600); }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.01em; }
h2 { font-size: 16px; font-weight: 650; margin: 0 0 14px; }
h3 { font-size: 14px; font-weight: 650; margin: 18px 0 6px; }
p { margin: 0 0 10px; }
code { background: var(--soft); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; font-size: 12.5px; }
.ic { width: 18px; height: 18px; flex: none; }

/* ---------- Struttura ---------- */
.shell { display: flex; min-height: 100vh; }
.side { width: 256px; flex: none; background: var(--card); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 12px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 16px; padding: 4px 10px 18px; }
.brand:hover { color: var(--ink); }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--brand); color: #fff; }
.brand-mark .ic { width: 17px; height: 17px; }
.nav-group { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: #a1a1aa; padding: 16px 12px 6px; }
.navlink { display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 9px; color: var(--ink-2); background: none; border: 0; font: 500 14px var(--font); width: 100%; cursor: pointer; text-align: left; margin-bottom: 1px; }
.navlink .ic { color: #a1a1aa; }
.navlink:hover { background: var(--soft); color: var(--ink); }
.navlink.active { background: var(--brand-50); color: var(--brand-600); }
.navlink.active .ic { color: var(--brand); }
.navlink .count { margin-left: auto; background: var(--brand); color: #fff; font-size: 11px; border-radius: 999px; padding: 1px 7px; }
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 12px; }
.who { display: flex; align-items: center; gap: 10px; padding: 4px 8px 10px; font-weight: 600; font-size: 13.5px; }
.who small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand-100); color: var(--brand-600); font-weight: 700; font-size: 13px; flex: none; }
.main { flex: 1; min-width: 0; padding: 26px 34px 70px; max-width: 1360px; }
.top { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.top-title { flex: 1; min-width: 0; }
.top h1 { font-size: 26px; font-weight: 700; margin: 0; letter-spacing: -.02em; }
.subtitle { color: var(--muted); margin: 4px 0 0; }
.crumb { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.crumb .ic { width: 15px; height: 15px; }
.top-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.burger { display: none; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px; cursor: pointer; color: var(--ink); align-self: center; }
.scrim { display: none; }
.impersonate { display: flex; align-items: center; justify-content: center; gap: 10px; background: #fff7e6; border-bottom: 1px solid #fde4b0; padding: 8px 16px; font-size: 13.5px; margin: 0; color: #7c4a03; }

@media (max-width: 960px) {
  .side { position: fixed; z-index: 40; left: 0; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  .nav-open .side { transform: none; }
  .nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.25); z-index: 30; }
  .burger { display: grid; }
  .main { padding: 16px 16px 70px; }
  .top { align-items: center; }
  .top h1 { font-size: 21px; }
}

/* ---------- Card e griglie ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; box-shadow: var(--shadow); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.card-head .muted { font-size: 13px; }
.card-highlight { border-color: #f6c9b8; background: linear-gradient(180deg, var(--brand-50), #fff 60%); }
.card-danger { border-color: #fecaca; }
.card-flush { padding: 0; overflow: hidden; }
.card-flush > .card-head { padding: 18px 20px 0; }
details.card summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
details.card summary::-webkit-details-marker { display: none; }
details.card[open] summary { margin-bottom: 12px; }
.narrow { max-width: 620px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-addr { display: grid; grid-template-columns: 110px minmax(0, 2fr) 110px minmax(0, 1fr); gap: 18px; }
@media (max-width: 640px) { .grid-addr { grid-template-columns: 1fr 1fr; } }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; }
.grid2 > .card, .grid3 > .card, .grid-main > .card, .grid-main > div > .card:last-child { margin-bottom: 0; }
.grid2, .grid3, .grid-main { margin-bottom: 18px; }
.form .grid2, .form .grid3 { margin-bottom: 0; gap: 14px; }
@media (max-width: 1080px) { .grid-main { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row > input:not([type=checkbox]):not([type=file]), .row > select { flex: 1; min-width: 160px; }
.stack > * + * { margin-top: 10px; }
.inline { display: inline; }
.grow { flex: 1; min-width: 0; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.center-col { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.text-ok { color: var(--ok); }
.text-err { color: var(--err); }
.text-warn { color: var(--warn); }
.divider { height: 1px; background: var(--line); margin: 16px 0; border: 0; }

/* ---------- Moduli ---------- */
.form label, label.field { display: block; margin-bottom: 14px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.form label small, label.field small { display: block; font-weight: 400; color: var(--muted); margin-top: 4px; font-size: 12.5px; }
input, select, textarea, button { font: inherit; color: inherit; }
.form input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]), .form select, .form textarea,
.filters input, .filters select, .row input:not([type=checkbox]):not([type=file]), .row select, .linkbox input, textarea, .input {
  display: block; width: 100%; margin-top: 6px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-weight: 400; font-size: 14px; transition: border-color .15s, box-shadow .15s;
}
.row input, .row select, .linkbox input, .filters input, .filters select { margin-top: 0; }
textarea { resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand) !important; box-shadow: 0 0 0 3px rgba(192,86,59,.14); }
input[type=color] { display: block; width: 56px; height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 3px; margin-top: 6px; background: #fff; }
input[type=file] { display: block; margin-top: 6px; font-size: 13px; }
.check { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 500 !important; color: var(--ink) !important; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--brand); flex: none; }
.prefix-input { display: flex; align-items: stretch; margin-top: 6px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.prefix-input span { background: var(--soft); padding: 9px 10px; font-weight: 400; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; border-right: 1px solid var(--line); }
.form .prefix-input input { border: 0 !important; margin: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
.linkbox { display: flex; gap: 6px; margin: 6px 0 12px; }
.sticky-save { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 35%); padding: 16px 0 8px; z-index: 3; display: flex; gap: 8px; }
.copy-source { font-family: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace; font-size: 13px; }
.lang-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.lang-cols > .card { margin-bottom: 0; }
.lang-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; background: var(--soft); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; color: var(--muted); }
.help { background: #fafaf9; box-shadow: none; }
.help ul { margin: 0 0 8px; padding-left: 18px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; align-items: center; }
.filters input[type=search] { flex: 1; min-width: 220px; width: auto; }
.filters select { width: auto; }

/* Caricamento foto con anteprima */
.upload { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.upload-preview { width: 96px; height: 72px; border-radius: 10px; background: var(--soft) center/cover; border: 1px solid var(--line); display: grid; place-items: center; color: #a1a1aa; flex: none; }
.upload-preview.big { width: 100%; height: 160px; }
.upload-body { flex: 1; min-width: 0; }

/* ---------- Pulsanti ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: 600 13.5px var(--font); cursor: pointer; white-space: nowrap; box-shadow: 0 1px 1px rgba(24,24,27,.03); transition: background .15s, border-color .15s; }
.btn:hover { border-color: #d6d3d1; background: #fafaf9; color: var(--ink); }
.btn:disabled { opacity: .4; cursor: default; }
.btn .ic { width: 16px; height: 16px; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.btn-soft { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-600); }
.btn-soft:hover { background: var(--brand-100); color: var(--brand-600); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--soft); }
.btn-danger { color: var(--err); border-color: #fecaca; }
.btn-danger:hover { background: var(--err-50); color: var(--err); }
.btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
.btn-icon { padding: 6px; min-width: 32px; }
.btn-block { width: 100%; }
.switch { min-width: 92px; }
.switch.on { background: var(--ok-50); border-color: #bbf7d0; color: var(--ok); }

/* ---------- Avvisi e badge ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; font-size: 14px; }
.alert .ic { margin-top: 1px; }
.alert-ok { background: var(--ok-50); color: #14532d; border: 1px solid #bbf7d0; }
.alert-err { background: var(--err-50); color: #7f1d1d; border: 1px solid #fecaca; }
.alert-warn { background: var(--warn-50); color: #78350f; border: 1px solid #fde68a; }
.alert-info { background: var(--info-50); color: #1e3a8a; border: 1px solid #bfdbfe; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--soft); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.badge-ok { background: var(--ok-50); color: var(--ok); border-color: #bbf7d0; }
.badge-err { background: var(--err-50); color: var(--err); border-color: #fecaca; }
.badge-warn { background: var(--warn-50); color: var(--warn); border-color: #fde68a; }
.badge-info { background: var(--info-50); color: var(--info); border-color: #bfdbfe; }
.badge-brand { background: var(--brand-50); color: var(--brand-600); border-color: var(--brand-100); }

/* ---------- Tabelle e liste ---------- */
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
.card-flush .table-wrap { margin: 0; padding: 0; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fafaf9; }
.table td { padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:hover td { background: #fcfcfb; }
.table tr:last-child td { border-bottom: 0; }
.table-compact td, .table-compact th { padding: 7px 8px; font-size: 13px; }
.table th.right { text-align: right; }
.cell-main { display: flex; align-items: center; gap: 12px; }
.cell-main strong { display: block; }
.list { list-style: none; padding: 0; margin: 0 0 10px; }
.list li { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.list li:last-child { border-bottom: 0; }
.list .right { margin-left: auto; }
.sortable { list-style: none; margin: 0; padding: 0; }
.sortable li { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.sortable li:last-child { border-bottom: 0; }
.sortable li.off { opacity: .5; }
.sortable a.grow { color: inherit; }
.sortable small, .sortable .grow small { display: block; }
.sec-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--brand-50); color: var(--brand); flex: none; }
.thumb-sm { width: 56px; height: 44px; border-radius: 9px; background: var(--soft) center/cover; border: 1px solid var(--line); flex: none; display: grid; place-items: center; color: #a1a1aa; }
.empty-state { text-align: center; padding: 34px 20px; color: var(--muted); }
.empty-state .ic { width: 34px; height: 34px; color: #d4d4d8; margin-bottom: 8px; }
.empty-state strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }

/* ---------- Schede e filtri ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tab { display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; color: var(--muted); font-weight: 600; font-size: 13.5px; border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.tab .ic { width: 16px; height: 16px; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); border-color: var(--brand); }
.tab.active .ic { color: var(--brand); }
.tab-ext { margin-left: auto; color: var(--brand); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); font-size: 13.5px; font-weight: 500; }
.pill .ic { width: 15px; height: 15px; color: var(--brand); }
.pill small { background: var(--soft); border-radius: 999px; padding: 0 7px; color: var(--muted); font-size: 11.5px; }
.pill:hover { color: var(--ink); border-color: #d6d3d1; }
.pill.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.pill.active .ic { color: #fff; }
.pill.active small { background: rgba(255,255,255,.18); color: #fff; }
.seg { display: inline-flex; background: #ecebe9; border-radius: 10px; padding: 3px; gap: 2px; }
.seg a, .seg span { padding: 6px 13px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 13px; }
.seg a.active { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.seg-kind { display: flex; margin-bottom: 16px; }
.seg-kind label { flex: 1; margin: 0 !important; }
.seg-kind input { position: absolute; opacity: 0; }
.seg-kind span { display: block; text-align: center; padding: 8px; cursor: pointer; }
.seg-kind input:checked + span { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.seg-kind label:first-child input:checked + span { color: var(--in); }
.seg-kind label:last-child input:checked + span { color: var(--out); }

/* ---------- KPI e grafici ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); position: relative; }
.stat-ic { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--brand-50); color: var(--brand); }
.stat-ic .ic { width: 17px; height: 17px; }
.stat span { display: block; font-size: 13px; color: var(--muted); font-weight: 500; }
.stat > span:not(.stat-ic) { padding-right: 40px; }
.stat strong { display: block; font-size: 24px; font-weight: 700; margin: 4px 0 2px; letter-spacing: -.02em; }
.stat small { color: var(--muted); font-size: 12.5px; }
.stat-in .stat-ic { background: #e7f8f1; color: var(--in); }
.stat-out .stat-ic { background: #fdeee9; color: var(--out); }
.chart { width: 100%; height: auto; display: block; margin: 4px 0 12px; overflow: visible; }
.chart .grid { stroke: var(--line-2); stroke-width: 1; }
.chart .axis { fill: #a1a1aa; font-size: 11px; font-family: var(--font); }
.chart .line { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: url(#areaGrad); }
.chart .dot { fill: #fff; stroke: var(--brand); stroke-width: 2; }
.chart .bar-brand { fill: var(--brand); }
.chart .lbl { fill: var(--ink-2); font-size: 11px; font-weight: 600; font-family: var(--font); }
.bar-in { fill: var(--in); background: var(--in); }
.bar-out { fill: var(--out); background: var(--out); }
.bar-brand { background: var(--brand); }
.legend { font-size: 12.5px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 10px; }
.dot-in { background: var(--in); }
.dot-out { background: var(--out); }
.dot-brand { background: var(--brand); }
.hbar { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; margin-bottom: 12px; font-size: 13.5px; }
.hbar i { grid-column: 1 / -1; height: 7px; border-radius: 4px; min-width: 3px; }
.hbar-track { grid-column: 1 / -1; background: var(--soft); border-radius: 4px; }
.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.donut-legend { list-style: none; padding: 0; margin: 0; font-size: 13.5px; }
.donut-legend li { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.donut-legend i { width: 10px; height: 10px; border-radius: 3px; }

/* ---------- Strutture ---------- */
.props { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; margin-bottom: 18px; }
.prop { padding: 0; overflow: hidden; margin: 0; transition: box-shadow .2s, transform .2s; }
.prop:hover { box-shadow: var(--shadow-lg); }
.prop-cover { height: 150px; background: linear-gradient(135deg, var(--c), #e8c3a4) center/cover; position: relative; }
.prop-cover .badge { position: absolute; top: 12px; left: 12px; }
.prop-body { padding: 16px 18px 18px; }
.prop-body h2 { margin: 0 0 2px; font-size: 17px; }
.prop-meta { display: flex; gap: 14px; color: var(--muted); font-size: 13px; margin-bottom: 12px; flex-wrap: wrap; }
.prop-meta span { display: inline-flex; align-items: center; gap: 5px; }
.prop-meta .ic { width: 15px; height: 15px; }
.add-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 260px; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--muted); background: transparent; box-shadow: none; }

/* ---------- Luoghi ---------- */
.place-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.place-row:last-child { border-bottom: 0; }
.nearby-results ul { list-style: none; padding: 0; margin: 12px 0; max-height: 440px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.nearby-results li { padding: 9px 12px; border-bottom: 1px solid var(--line-2); }
.nearby-results li:last-child { border-bottom: 0; }
.nearby-results label { margin: 0; cursor: pointer; }
.shared-list { display: grid; gap: 10px; }
.shared-item { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.shared-item p { margin: 2px 0 0; font-size: 12.5px; }

/* ---------- Condivisione ---------- */
.qr-box { width: 220px; height: 220px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.qr-box img, .qr-box canvas { width: 100% !important; height: 100% !important; display: block; }
.poster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.poster-item { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; }
.poster-item .ic-lg { width: 26px; height: 26px; color: var(--brand); margin-bottom: 6px; }
.poster-item p { font-size: 13px; margin: 6px 0 12px; flex: 1; }
.guest-name { display: block; font-weight: 600; max-width: 360px; margin: 10px 0; }
.msg textarea { margin: 6px 0 10px; font-size: 14px; }

/* ---------- Prenotazioni ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-2); align-items: center; }
.timeline li:last-child { border-bottom: 0; }
.date-chip { width: 52px; text-align: center; border: 1px solid var(--line); border-radius: 10px; padding: 4px 0; flex: none; background: #fff; }
.date-chip b { display: block; font-size: 18px; line-height: 1.1; }
.date-chip small { display: block; font-size: 10.5px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.guest-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.guest-card h3 { margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 16px; font-size: 13.5px; }
.kv-grid small { display: block; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }
.doc-thumb { max-width: 220px; border-radius: 10px; border: 1px solid var(--line); display: block; margin-top: 8px; }
.doc-thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.doc-thumbs .doc-thumb { max-width: 200px; max-height: 140px; object-fit: cover; }
.stars { color: #f59e0b; letter-spacing: 1px; }

/* ---------- Accesso e installazione ---------- */
.auth-body { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; background: radial-gradient(1200px 600px at 10% -10%, var(--brand-50), transparent), var(--bg); }
.auth-card { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 32px; box-shadow: var(--shadow-lg); }
.auth-card.install { max-width: 580px; }
.auth-card h1 { margin-top: 0; }
.brand-center { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; font-weight: 700; font-size: 20px; padding: 0 0 22px; }
.brand-center .brand-mark { width: 44px; height: 44px; border-radius: 12px; }
.brand-center .brand-mark .ic { width: 22px; height: 22px; }
.err-code { font-size: 56px; margin: 0; color: var(--brand); }
.checks { list-style: none; padding: 0; columns: 2; font-size: 13.5px; }
.checks .ok { color: var(--ok); }
.checks .ko { color: var(--err); font-weight: 600; }

/* Modulo ospiti (stesso markup del check-in online) */
.guests-form .mode { border: 0; padding: 0; margin: 0 0 16px; display: flex; gap: 18px; flex-wrap: wrap; }
.guests-form legend { font-weight: 650; margin-bottom: 8px; width: 100%; }
.guest-block { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 14px; }
.guest-head { display: flex; justify-content: space-between; align-items: center; }
.guest-head h3 { margin: 0 0 12px; }
.guest-block h4 { margin: 4px 0 10px; font-size: 13px; color: var(--brand); text-transform: uppercase; letter-spacing: .05em; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 14px; }
.link-btn { border: 0; background: none; color: var(--err); cursor: pointer; font-size: 13px; font-weight: 600; }
.btn-add { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 10px; border: 1.5px dashed var(--line); border-radius: 12px; background: transparent; color: var(--brand); font-weight: 600; cursor: pointer; margin-bottom: 16px; }
.ic-lg { width: 26px; height: 26px; }
.check[hidden] { display: none !important; }

/* Scheda Aspetto: impostazioni a sinistra, anteprima del telefono a destra */
.design-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
@media (max-width: 1100px) { .design-layout { grid-template-columns: 1fr; } .phone-wrap { display: none; } }
.phone-wrap { position: sticky; top: 20px; }
.phone { width: 360px; height: 740px; border-radius: 44px; background: #111; padding: 12px; box-shadow: 0 30px 60px rgba(0,0,0,.18), inset 0 0 0 2px #333; }
.phone iframe { width: 100%; height: 100%; border: 0; border-radius: 34px; background: #fff; }
.design-upload { display: flex; gap: 16px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.design-upload:last-child { border-bottom: 0; }
.design-upload .upload-body { display: grid; gap: 4px; }
.design-upload .upload-body strong { font-size: 14px; }
.upload-preview.cover { width: 150px; height: 96px; }
.upload-preview.logo { width: 96px; height: 96px; background-size: contain; background-repeat: no-repeat; background-color: #3f3f46; background-origin: content-box; padding: 8px; }
.upload-preview.avatar { width: 84px; height: 84px; border-radius: 50%; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 3px solid #fff; background: var(--sw); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.swatch.on, .swatch:hover { box-shadow: 0 0 0 2px var(--ink); }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.theme-opt { margin: 0 !important; }
.theme-opt input { position: absolute; opacity: 0; }
.theme-card { display: grid; gap: 2px; padding: 14px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; height: 100%; }
.theme-card b { font-size: 13.5px; }
.theme-card small { color: var(--muted); font-weight: 400; font-size: 12px; }
.theme-sample { font-size: 30px; line-height: 1.1; color: var(--ink); }
.theme-opt input:checked + .theme-card { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(192,86,59,.14); }

/* Importazione dall'annuncio */
.import-list { display: grid; gap: 10px; }
.import-item { display: flex !important; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; margin: 0 !important; font-weight: 400 !important; cursor: pointer; }
.import-item input { margin-top: 4px; width: 17px; height: 17px; accent-color: var(--brand); flex: none; }
.import-item:has(input:checked) { border-color: var(--brand-100); background: var(--brand-50); }
.import-item b { display: block; color: var(--ink); margin-bottom: 4px; }
.import-text { display: block; color: var(--ink-2); font-size: 13.5px; margin-top: 4px; }
.import-text p { margin: 0 0 6px; }
.import-text ul { margin: 0 0 6px; padding-left: 18px; }
.import-text .lang-tag { margin-right: 6px; }
.import-img { max-width: 100%; border-radius: 10px; margin-top: 6px; display: block; }
.steps { padding-left: 20px; margin: 0 0 10px; }
.steps li { margin-bottom: 8px; }
.loading-overlay { position: fixed; inset: 0; background: rgba(255,255,255,.88); display: grid; place-items: center; z-index: 100; text-align: center; padding: 20px; font-weight: 600; }
.spinner { width: 38px; height: 38px; border: 3px solid var(--brand-100); border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Editor del sito pubblico */
.check-row { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 6px 0 4px; }
.block-ed { padding: 0; }
.block-ed > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 18px; cursor: pointer; }
.block-ed > summary::-webkit-details-marker { display: none; }
.block-ed[open] > summary { border-bottom: 1px solid var(--line); }
.block-ed > :not(summary) { margin-left: 18px; margin-right: 18px; }
.block-ed > .form { padding-bottom: 18px; }
.block-ed.is-hidden > summary { opacity: .6; }
.block-ed .grip { color: var(--muted); display: inline-flex; }
.site-img, .repeater { display: grid; gap: 8px; margin: 8px 0; }
.site-img img { max-width: 240px; max-height: 140px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.label { font-weight: 600; font-size: 13.5px; }
.rep-row { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.rep-fields { flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.rep-fields label { margin: 0; }
.sticky-save select { max-width: 240px; }
.pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding: 12px 16px; flex-wrap: wrap; }
.pager .muted { margin-right: auto; }

/* Firma Le Favi Web */
.credit { color: inherit; text-decoration: none; }
.credit:hover strong { text-decoration: underline; }
.side-credit { font-size: 11.5px; color: var(--muted); padding: 4px 12px 0; }
.side-version { font-size: 11px; color: var(--muted); opacity: .8; padding: 2px 12px 0; font-variant-numeric: tabular-nums; }
.auth-credit { width: 100%; max-width: 420px; text-align: center; font-size: 12.5px; color: var(--muted); margin: 18px 0 0; }
.auth-credit a { color: var(--ink-2, inherit); text-decoration: none; }
.auth-credit a:hover { text-decoration: underline; }

/* Collaboratori: permessi */
.perm-check { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; margin: 6px 0; }
.perm-check input { margin-top: 3px; }
