/* Aquardens Operations CMS — stile dell'interfaccia admin.
   Palette dal Brand Book 1.2: Deep Indigo #232F47 (#34466A, #B7C3DC), Silver Mist #9EB5BD
   (#A2C1CE, #B6D3DD), Pure Aqua #98D0D0 (#A7DAD8, #BBEAE9); secondaria: Amber Seam #E5A74C,
   Warm Haze #EBD8BF, Cedar Wood #B88665, Deep Earth #483222, Quiet Green #779D75. */
:root {
  --indigo: #232f47;
  --indigo-2: #34466a;
  --indigo-3: #b7c3dc;
  --mist: #9eb5bd;
  --mist-2: #a2c1ce;
  --mist-3: #b6d3dd;
  --aqua: #98d0d0;
  --aqua-2: #a7dad8;
  --aqua-3: #bbeae9;
  --amber: #e5a74c;
  --haze: #ebd8bf;
  --cedar: #b88665;
  --earth: #483222;
  --green: #779d75;

  --bg: #f3f6f8;
  --panel: #ffffff;
  --text: #1f2a3d;
  --muted: #5d6b80;
  --line: #d8e0e8;
  --brand: var(--indigo);
  --brand-dark: #182238;
  --accent: var(--aqua);
  --ok: #4f7f4d;
  --ok-bg: #e6f0e5;
  --warn: #b07a1f;
  --warn-bg: #fbf1df;
  --error: #b3261e;
  --error-bg: #fcebe9;
  --info: var(--indigo-2);
  --info-bg: #e9eef8;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(35, 47, 71, 0.06), 0 4px 16px rgba(35, 47, 71, 0.06);
  --font: "Degular Sans", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --topbar-h: 64px;
}

* { box-sizing: border-box; }
html, body, #root { height: 100%; margin: 0; }
body { font: 14px/1.45 var(--font); color: var(--text); background: var(--bg); }
a { color: var(--indigo-2); }
h1 { font-size: 24px; margin: 0 0 4px; color: var(--indigo); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 17px; margin: 0 0 6px; color: var(--indigo); font-weight: 700; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
pre { background: #f6f8fa; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; overflow: auto; max-height: 60vh; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.text-error { color: var(--error); }
.text-ok { color: var(--ok); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 700px) { .grid-2 { grid-template-columns: 1fr; } }

/* Struttura: barra alta blu, menu bianco a sinistra, contenuto */
.shell { min-height: 100%; display: flex; flex-direction: column; }
.shell-bare { align-items: center; justify-content: center; padding: 24px; background: linear-gradient(160deg, var(--indigo) 0%, var(--indigo-2) 60%, #4a5f8a 100%); }
.shell-bare .card { box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25); }
.topbar { height: var(--topbar-h); background: var(--indigo); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15); }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: 0.02em; }
.brand-logo { height: 38px; width: auto; display: block; }
.brand-text { font-family: Georgia, "Times New Roman", serif; font-size: 22px; letter-spacing: 0.08em; text-transform: uppercase; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-user { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; padding: 6px 10px; border-radius: 30px; }
.topbar-user:hover, .topbar-user.active { background: rgba(255, 255, 255, 0.12); }
.topbar-user-text { display: flex; flex-direction: column; line-height: 1.15; font-size: 12px; }
.topbar-user-text strong { font-size: 13px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--aqua); color: var(--indigo); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.btn-ghost { background: transparent; border-color: rgba(255, 255, 255, 0.35); color: #fff; }
.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); border-color: #fff; }
.badge { display: inline-block; background: var(--amber); color: var(--earth); border-radius: 10px; padding: 1px 8px; font-size: 11px; text-transform: uppercase; font-weight: 700; }
.body { display: flex; flex: 1; min-height: 0; }
.sidebar { width: 232px; flex: 0 0 232px; background: #fff; border-right: 1px solid var(--line); padding: 18px 12px; position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h)); overflow: auto; }
.sidebar-title { font-weight: 800; color: var(--indigo); font-size: 15px; padding: 4px 12px 14px; letter-spacing: 0.01em; }
.sidebar-title span { display: block; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.nav-group { margin-bottom: 14px; }
.nav-group-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding: 6px 12px 4px; font-weight: 700; }
.sidebar nav a { display: block; color: var(--indigo); text-decoration: none; padding: 9px 12px; border-radius: 10px; font-weight: 600; margin: 1px 0; }
.sidebar nav a:hover { background: #eef3f7; }
.sidebar nav a.active { background: var(--indigo); color: #fff; box-shadow: var(--shadow); }
.content { flex: 1; min-width: 0; padding: 22px 26px; display: flex; flex-direction: column; gap: 12px; }

.page { display: flex; flex-direction: column; gap: 12px; min-height: 0; flex: 1; }
.page-grid { flex: none; height: calc(100vh - var(--topbar-h) - 44px); }
.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card.narrow { width: 100%; max-width: 420px; }
.login h1 { margin: 16px 0 12px; }
.login .brand { color: var(--indigo); }
.login .brand-text { display: inline !important; }
.steps { padding-left: 20px; }
.steps li { margin-bottom: 6px; }
.qr-box { display: flex; gap: 16px; align-items: flex-start; margin: 12px 0; }
.qr-box img { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.secret { display: block; margin-top: 6px; word-break: break-all; background: #f6f8fa; padding: 6px; border-radius: 4px; }

/* Controlli */
.btn { font: inherit; font-weight: 600; padding: 7px 13px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--indigo); cursor: pointer; white-space: nowrap; }
.btn:hover:not(:disabled) { border-color: var(--mist); background: #f6f9fb; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-primary { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-danger { color: var(--error); border-color: #e7b9b5; }
.btn-danger-solid { background: var(--error); border-color: var(--error); color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn-block { width: 100%; margin-top: 8px; }
.btn-link { border: none; background: none; color: var(--indigo-2); padding: 4px 6px; text-decoration: underline; font-weight: 500; }
.btn-icon { border: none; background: none; font-size: 20px; line-height: 1; padding: 2px 8px; }
input, select, textarea { font: inherit; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(152, 208, 208, 0.6); border-color: var(--indigo-2); }
textarea { width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
input[type="date"] { padding: 5px 8px; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field-label { font-weight: 700; font-size: 12px; color: var(--indigo); text-transform: uppercase; letter-spacing: 0.04em; }
.field-hint { color: var(--muted); font-size: 12px; text-transform: none; letter-spacing: 0; font-weight: 400; }
.check { display: inline-flex; align-items: center; gap: 6px; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; box-shadow: var(--shadow); }
.toolbar .sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.daterange { display: flex; gap: 6px; align-items: center; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs a, .tabs button { padding: 8px 12px; border: none; background: none; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; cursor: pointer; font: inherit; font-weight: 600; }
.tabs .active { color: var(--indigo); border-bottom-color: var(--indigo); }

/* Messaggi */
.box { padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid; }
.box-error { background: var(--error-bg); border-color: #efc1bd; color: #7a1a15; }
.box-warn { background: var(--warn-bg); border-color: #efd39b; color: #6b4400; }
.box-info { background: var(--info-bg); border-color: var(--indigo-3); color: var(--indigo); }
.box-ok { background: var(--ok-bg); border-color: #bfd7bd; color: #2f4f2e; }
.issues ul { margin: 6px 0 0; padding-left: 18px; }
.spinner { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 20px; }
.spinner-dot { width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--indigo); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 1000; max-width: 420px; }
.toast { padding: 10px 14px; border-radius: var(--radius-sm); color: #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18); cursor: pointer; font-weight: 500; }
.toast-ok { background: var(--green); }
.toast-error { background: var(--error); }
.toast-info { background: var(--indigo-2); }

/* Finestre */
.modal-backdrop { position: fixed; inset: 0; background: rgba(35, 47, 71, 0.5); display: flex; align-items: center; justify-content: center; z-index: 900; padding: 16px; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 520px; max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); }
.modal-wide { max-width: 860px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 16px 18px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }

/* Tabelle semplici */
.etable { overflow: auto; }
td.nowrap, th.nowrap { white-space: nowrap; }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.data th, table.data td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { background: #eef2f6; font-weight: 700; font-size: 12px; color: var(--indigo); text-transform: uppercase; letter-spacing: 0.04em; }
table.data tr:last-child td { border-bottom: none; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data tr.row-dirty td { background: #fffbe8; }
table.data tr.row-error td { background: var(--error-bg); }
.pill { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; background: #e6ebef; font-weight: 600; }
.pill-PUBLISHED, .pill-APPLIED, .pill-APPROVED { background: #dcebdb; color: #2f4f2e; }
.pill-DRAFT, .pill-SUBMITTED { background: var(--haze); color: #6b4400; }
.pill-ARCHIVED, .pill-CANCELLED, .pill-FAILED { background: #f2d7d5; color: #7a1a15; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat .muted { text-transform: uppercase; font-size: 11px; letter-spacing: 0.08em; font-weight: 700; }
.stat .big { font-size: 30px; font-weight: 800; color: var(--indigo); line-height: 1.1; margin: 6px 0 2px; }
.usage { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.usage-bar { flex: 1; height: 8px; background: #e6ebef; border-radius: 4px; overflow: hidden; min-width: 120px; }
.usage-bar > span { display: block; height: 100%; background: var(--aqua); }
.usage-bar.warn > span { background: var(--amber); }
.usage-bar.full > span { background: var(--error); }
.thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: #f6f8fa; }
.thumb-lg { width: 160px; height: 110px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.timeline .when { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.timeline .who { font-weight: 700; color: var(--indigo); }
.diff { margin: 4px 0 0; padding: 0; list-style: none; font-size: 12.5px; }
.diff li { padding: 1px 0; }
.diff .before { color: var(--error); text-decoration: line-through; }
.diff .after { color: var(--ok); font-weight: 600; }
.tree { display: flex; flex-direction: column; gap: 4px; }
.tree button { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 8px 10px; cursor: pointer; font: inherit; }
.tree button.active { background: var(--indigo); color: #fff; border-color: var(--indigo); }
.tree .sub { padding-left: 14px; }

/* Griglia RevoGrid */
.grid-wrap { flex: 1; min-height: 320px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.grid-wrap revo-grid { height: 100%; }
revo-grid .row-dirty .rgCell { background: #fffbe8; }
revo-grid .row-error .rgCell { background: #fff1f0; }
revo-grid .row-warn .rgCell { background: #fff8ec; }
revo-grid .row-published .rgCell:first-child { box-shadow: inset 3px 0 0 var(--green); }
revo-grid .row-archived .rgCell { color: #8a949c; text-decoration: line-through; }
revo-grid .rgCell.cell-error { background: #ffd6d3 !important; outline: 1px solid var(--error); outline-offset: -1px; }
revo-grid .rgCell.cell-locked { color: #8a949c; font-style: italic; }
revo-grid .rgCell.cell-readonly { background: #f5f7f9; }
revo-grid .rgCell.cell-closed { color: var(--error); font-weight: 600; }
revo-grid .rgCell.cell-rule { color: #5f6b76; font-style: italic; }
revo-grid .rgCell.cell-override { color: #9a5200; font-weight: 600; background: #fff3e0; }
revo-grid .list-editor { width: 100%; height: 100%; border: none; padding: 0 6px; font: inherit; outline: none; }

/* Tendina con ricerca (griglia e moduli) */
.combo-list { z-index: 10000; max-height: 260px; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(35, 47, 71, 0.18); padding: 4px 0; font-size: 13px; }
.combo-item { display: flex; flex-direction: column; gap: 1px; padding: 6px 10px; cursor: pointer; line-height: 1.3; }
.combo-item.active { background: var(--aqua-3); }
.combo-item.combo-new { color: var(--indigo); font-weight: 600; border-bottom: 1px dashed var(--line); }
.combo-hint { color: #6b7680; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
revo-grid .rgCell.cell-inherited { color: #7c8790; font-style: italic; }

/* Calendario dei programmi */
.cal { flex: 1; min-height: 360px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.cal-head { display: grid; grid-template-columns: repeat(7, 1fr); background: #f5f7f9; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--indigo); text-transform: uppercase; letter-spacing: 0.04em; }
.cal-head > div { padding: 6px 8px; }
/* Il corpo del mese non ha altezza fissa (con flex: 1 le righe restavano a 118px e il contenuto
   sbordava sotto la settimana dopo): scorre l'intero calendario, con i giorni della settimana fissi. */
.cal-month { overflow-y: auto; }
.cal-month > .cal-head { position: sticky; top: 0; z-index: 2; }
.cal-month-body { flex: none; display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: auto; align-content: start; }
.cal-cell { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px; cursor: cell; display: flex; flex-direction: column; gap: 2px; min-width: 0; min-height: 118px; height: auto; }
.cal-cell > *, .cal-list > * { flex-shrink: 0; }
.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell.cal-other { background: #fafbfc; color: #9aa4ad; }
.cal-cell.cal-past { background: #fbfbfb; }
.cal-cell.cal-today { background: #f2fbfa; }
.cal-day { align-self: flex-start; border: none; background: none; font: inherit; font-size: 12px; font-weight: 700; color: var(--indigo); padding: 2px 6px; border-radius: 10px; cursor: pointer; }
.cal-day:hover { background: var(--aqua-3); }
.cal-today .cal-day { background: var(--indigo); color: #fff; }
.cal-list { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-ev { display: flex; align-items: baseline; gap: 5px; width: 100%; min-width: 0; text-align: left; border: 1px solid transparent; border-left: 3px solid var(--ev, var(--indigo)); background: color-mix(in srgb, var(--ev, var(--indigo)) 12%, #fff); border-radius: 4px; padding: 1px 5px; font: inherit; font-size: 12px; line-height: 1.35; color: #1d2733; cursor: pointer; overflow: hidden; }
.cal-ev:hover { border-color: var(--ev, var(--indigo)); }
.cal-ev-time { font-weight: 700; font-variant-numeric: tabular-nums; flex: none; color: var(--ev, var(--indigo)); }
.cal-ev-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev-sub { color: #6b7680; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.cal-ev.cal-draft { border-style: dashed; border-color: color-mix(in srgb, var(--ev, var(--indigo)) 50%, #fff); background: #fff; }
.cal-ev.cal-archived { opacity: 0.5; text-decoration: line-through; }
.cal-ev.cal-dirty { box-shadow: 0 0 0 2px #f2d27a inset; }
.cal-ev.cal-error { box-shadow: 0 0 0 2px var(--error) inset; }
.cal-more { border: none; background: none; font: inherit; font-size: 11px; color: var(--indigo); text-decoration: underline; cursor: pointer; align-self: flex-start; padding: 0 4px; }
/* Settimana / giorno */
.cal-time-head { display: grid; border-bottom: 1px solid var(--line); background: #f5f7f9; }
.cal-allday-label { font-size: 10px; color: #6b7680; padding: 26px 4px 4px; text-align: right; }
.cal-time-day { border-left: 1px solid var(--line); min-width: 0; display: flex; flex-direction: column; }
.cal-time-day .cal-day { margin: 3px 4px 0; }
.cal-allday { min-height: 28px; padding: 2px 4px 4px; display: flex; flex-direction: column; gap: 2px; cursor: cell; }
.cal-time-scroll { flex: 1; min-height: 0; overflow-y: auto; position: relative; }
.cal-time-body { display: grid; position: relative; }
.cal-axis { position: relative; }
.cal-hour { position: absolute; right: 6px; transform: translateY(-7px); font-size: 11px; color: #6b7680; font-variant-numeric: tabular-nums; }
.cal-col { position: relative; border-left: 1px solid var(--line); cursor: cell; }
.cal-col.cal-today { background: #f2fbfa; }
.cal-col.cal-past { background: #fbfbfb; }
.cal-line { position: absolute; left: 0; right: 0; border-top: 1px solid #eef1f4; }
.cal-abs { position: absolute; padding: 0 2px 0 1px; box-sizing: border-box; }
.cal-abs .cal-ev { height: 100%; align-items: baseline; gap: 6px; padding: 1px 5px; }
.cal-abs .cal-ev-sub { display: none; }
.cal-abs.cal-tall .cal-ev { align-items: flex-start; flex-direction: column; gap: 0; padding: 2px 5px; }
.cal-abs.cal-tall .cal-ev-title { white-space: normal; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cal-abs.cal-tall .cal-ev-sub { display: block; }
.cal-single .cal-abs .cal-ev { flex-direction: row; gap: 8px; align-items: baseline; }
.cal-single .cal-abs .cal-ev-sub { display: inline; }
.cal-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-title { font-weight: 700; color: var(--indigo); min-width: 180px; text-transform: capitalize; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: none; background: #fff; padding: 5px 10px; font: inherit; font-size: 13px; cursor: pointer; color: var(--indigo); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.active { background: var(--indigo); color: #fff; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: #4b5760; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--ev); margin-right: 5px; vertical-align: -1px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }
.inherited-note { font-size: 12px; color: #7c8790; font-style: italic; margin-top: -6px; margin-bottom: 8px; }
.create-hint { display: flex; align-items: flex-start; gap: 8px; }

/* Listini */
.split { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.pricelist-list { list-style: none; margin: 10px 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.pricelist-list button { width: 100%; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 8px 10px; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.pricelist-list li.active button { border-color: var(--indigo); box-shadow: inset 3px 0 0 var(--indigo); background: #f7f9fc; }
.pricegrid td.cell-dirty input { background: #fffbe8; border-color: #e5a74c; }
.pricegrid th.num, .pricegrid td.num { text-align: right; }
/* Impostazioni */
.settings-list { display: flex; flex-direction: column; gap: 10px; }
.setting { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(220px, 320px) auto; gap: 8px 16px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.setting h3 { margin: 0 0 2px; font-size: 14px; color: var(--indigo); }
.setting h3 code { font-weight: 400; font-size: 11px; color: #7c8790; margin-left: 8px; background: #f3f5f7; padding: 1px 6px; border-radius: 4px; }
.setting .desc { font-size: 12px; color: #5f6b76; }
.setting.locked { background: #fafbfc; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.switch input { width: 40px; height: 22px; appearance: none; background: #cfd6dd; border-radius: 11px; position: relative; cursor: pointer; transition: background 0.15s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left 0.15s; }
.switch input:checked { background: var(--green); }
.switch input:checked::after { left: 21px; }
.switch input:disabled { opacity: 0.5; cursor: not-allowed; }
/* Registro */
.log-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0 12px; align-items: end; }
.log-search { display: flex; gap: 8px; align-items: center; margin: 4px 0 10px; flex-wrap: wrap; }
.log-search input { flex: 1 1 280px; min-width: 0; }
.log-search .btn { white-space: nowrap; }
.sentence strong { color: var(--indigo); }
.sentence .subject { font-weight: 600; }
.sentence .before { color: #a03b3b; text-decoration: line-through; }
.sentence .after { color: #2f6b3a; font-weight: 600; }
.nav-badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--amber, #e5a74c); color: #1d2733; font-size: 11px; font-weight: 700; text-align: center; margin-left: 6px; }
.hour-rule-controls { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.hour-rule-controls input { margin: 0 2px; }

/* Interface refresh — shared visual language and mobile-first adaptations. */
:root { --bg: #f5f7f8; --line: #e1e7eb; --radius: 16px; --shadow: 0 2px 8px rgba(35,47,71,.025); --warn: #8a5b13; --topbar-h: 76px; }
body { line-height: 1.5; }
h1 { font-size: clamp(23px, 2.1vw, 32px); letter-spacing: -.035em; font-weight: 650; }
h2 { letter-spacing: -.02em; }
:where(a, button, input, select, textarea, [tabindex]):focus-visible { outline: 3px solid #377f88; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: -100px; left: 16px; padding: 12px 18px; background: white; color: var(--indigo); z-index: 1100; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.topbar { padding: 0 28px; box-shadow: none; background: #232f47; border-bottom: 1px solid #3b4760; }
.topbar-brand { display: flex; align-items: center; gap: 24px; min-width: 0; }
.workspace-label { padding-left: 24px; border-left: 1px solid #596479; font-size: 14px; font-weight: 650; letter-spacing: .03em; }
.workspace-label span { display: block; color: #c1ceda; font-size: 11px; font-weight: 400; letter-spacing: 0; }
.topbar-user-text strong { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.menu-toggle { display: none; }
.sidebar { width: 252px; flex-basis: 252px; padding: 24px 16px 14px; display: flex; flex-direction: column; }
.sidebar-title { font-size: 13px; padding: 0 10px 18px; }
.sidebar-title span { margin-top: 4px; font-size: 10px; font-weight: 500; letter-spacing: .1em; }
.nav-search { display: block; margin-bottom: 20px; }
.nav-search input { width: 100%; background: #f5f7f8; border-color: transparent; font-size: 12px; padding: 11px 12px; }
.nav-group { margin-bottom: 20px; }
.nav-group-title { font-size: 10px; letter-spacing: .13em; padding: 0 12px 8px; }
.sidebar nav a { display: flex; gap: 11px; align-items: center; font-size: 12.5px; font-weight: 500; min-height: 40px; padding: 9px 12px; margin: 3px 0; border-radius: 8px; }
.sidebar nav a.active { background: var(--indigo); color: #fff; box-shadow: var(--shadow); font-weight: 700; }
.sidebar nav a.active .nav-icon { color: #fff; }
.sidebar nav a.active .nav-badge { background: #fff; color: var(--indigo); }
.nav-icon { width: 18px; height: 18px; flex: 0 0 18px; opacity: .85; }
.nav-empty { padding: 0 12px; color: var(--muted); font-size: 13px; }
.sidebar-footer { display: flex; align-items: center; gap: 9px; margin-top: auto; padding: 20px 8px 0; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.sidebar-footer small { display: block; font-size: 10px; margin-top: 3px; }
.sidebar-mark { width: 30px; height: 30px; display: grid; place-items: center; background: #edf3f3; border-radius: 50%; color: var(--indigo); font: 20px Georgia, serif; }
.content { padding: 30px 32px; gap: 18px; }
.page { gap: 18px; }
.page-grid { height: calc(100vh - var(--topbar-h) - 60px); }
.page-header { align-items: center; gap: 12px; padding-bottom: 5px; }
.page-header .muted { margin-top: 6px; max-width: 800px; font-size: 13px; }
.btn { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; border-radius: 8px; transition: background .15s, border-color .15s; }
.btn-sm { min-height: 32px; }
.btn-block { display: flex; }
.btn-primary { box-shadow: 0 2px 3px #232f4714; }
input:not([type=checkbox]):not([type=radio]), select { min-height: 38px; max-width: 100%; }
.field { gap: 6px; margin-bottom: 16px; }
.field-label { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; }
.toolbar { padding: 12px; box-shadow: none; gap: 10px; }
.daterange { flex-wrap: wrap; }
.tabs { gap: 8px; }
.tabs a, .tabs button { min-height: 42px; }
.card { box-shadow: none; padding: 22px; }
.table-scroll { overflow-x: auto; max-width: 100%; border-radius: 10px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-heading h2 { margin: 0; }
.section-heading a { font-size: 12px; white-space: nowrap; text-decoration: none; color: #36747a; }
table.data th { background: #f5f7f8; color: #657385; font-size: 10px; padding: 12px; letter-spacing: .07em; }
table.data td { padding: 12px; font-size: 13px; }
table.data tbody tr:hover:not(.row-dirty):not(.row-error) { background: #f8fbfb; }
.pill { padding: 4px 9px; font-size: 11px; white-space: nowrap; }
.dashboard-intro { padding: 26px 28px; background: #e7f1f0; border: 1px solid #d7e7e5; border-radius: 16px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.eyebrow { display: block; color: #39686a; font-size: 10px; text-transform: uppercase; letter-spacing: .15em; font-weight: 700; margin-bottom: 8px; }
.dashboard-intro h2 { font-size: 26px; font-weight: 500; letter-spacing: -.035em; margin: 0; }
.dashboard-intro p { margin: 6px 0 0; color: #516b70; font-size: 13px; }
.dashboard-intro .btn { background: var(--indigo); color: white; padding: 10px 16px; border-color: var(--indigo); }
.dashboard .cards { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stat { padding: 20px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; box-shadow: none; }
.stat .muted { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 500; }
.stat .big { font-size: 36px; letter-spacing: -.045em; font-weight: 600; margin: 2px 0; }
.stat .small { font-size: 11px; color: var(--muted); }
.stat > a { font-size: 11px; color: #36747a; text-decoration: none; margin-top: auto; padding-top: 5px; }
.dashboard-panels { display: grid; grid-template-columns: minmax(230px, .8fr) minmax(0, 2fr); gap: 18px; align-items: start; }
.dashboard-panels .card { min-width: 0; }
.dashboard-program table { min-width: 650px; }
.dashboard-note { color: var(--muted); font-size: 11px; margin: 0; }
.modal { border-radius: 18px; }
.modal-head, .modal-foot { padding: 18px 22px; }
.modal-body { padding: 22px; overscroll-behavior: contain; }
.modal-foot { flex-wrap: wrap; }
.shell-bare { background: radial-gradient(ellipse at 80% 80%, #466b77, transparent 60%), #232f47; }
.shell-bare .card { padding: 32px; box-shadow: 0 24px 80px #14233944; }
.login h1 { margin-top: 28px !important; margin-bottom: 24px !important; }
.password-control { display: flex; border: 1px solid var(--line); border-radius: 9px; background: white; }
.password-control input { width: 100%; min-width: 0; border: none; }
.password-control .btn { font-size: 12px; text-decoration: none; padding: 8px 12px; }
.password-control:focus-within { outline: 2px solid #98d0d0; }
.toast-ok { background: #426940; }
@media (max-width: 1200px) {
  .content { padding: 24px; }
  .sidebar { width: 228px; flex-basis: 228px; padding-inline: 12px; }
  .dashboard-panels { grid-template-columns: 1fr; }
  .dashboard-hours table { min-width: 0; }
}
@media (max-width: 900px) {
  :root { --topbar-h: 64px; }
  .topbar { padding: 0 16px; }
  .topbar-brand { gap: 12px; }
  .menu-toggle { display: inline-flex; background: transparent; color: white; border-color: #617087; width: 44px; min-height: 44px; font-size: 20px; }
  .menu-toggle:hover:not(:disabled) { background: #34466a; }
  .workspace-label { display: none; }
  .body { flex-direction: column; }
  .sidebar { display: none; position: static; width: 100%; height: auto; flex-basis: auto; padding: 20px; border-bottom: 1px solid var(--line); border-right: 0; }
  .sidebar.sidebar-open { display: flex; }
  .sidebar nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .sidebar nav a { min-height: 44px; }
  .sidebar-title, .sidebar-footer { display: none; }
  .nav-search { max-width: 400px; margin-bottom: 16px; }
  .content { padding: 22px 18px; }
  .page-grid { height: auto; min-height: calc(100dvh - var(--topbar-h) - 44px); }
  .grid-wrap { flex: none; height: 60dvh; min-height: 350px; }
  .cal-wrap { min-height: 500px; }
  .setting { grid-template-columns: minmax(0, 1fr); }
  .setting > * { min-width: 0; }
  .etable { max-width: 100%; }
  .split > * { max-width: 100%; min-width: 0 !important; }
}
@media (max-width: 600px) {
  .topbar { padding: 0 12px; }
  .topbar-right { gap: 8px; }
  .topbar-user-text { display: none; }
  .brand-logo { height: 28px; max-width: 145px; object-fit: contain; }
  .topbar .badge { font-size: 9px; padding: 2px 5px; max-width: 65px; overflow-wrap: anywhere; }
  .topbar .btn-ghost { padding: 8px; min-height: 44px; }
  .sidebar nav { grid-template-columns: 1fr; gap: 0; }
  .nav-group { margin-bottom: 14px; }
  .sidebar nav a { font-size: 14px; }
  .content { padding: 20px 12px; }
  .page { gap: 14px; }
  .page-header { gap: 14px; }
  .page-header .muted { font-size: 12px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1 1 auto; }
  .btn, .btn-sm, .seg button, .tabs button, .tabs a { min-height: 44px; }
  input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px; min-height: 44px; }
  input[type=checkbox], input[type=radio] { min-width: 20px; min-height: 20px; }
  .switch input { min-width: 40px; }
  .toolbar { gap: 8px; padding: 10px; }
  .toolbar .sep { display: none; }
  .toolbar > input, .toolbar > select { width: 100%; }
  .daterange { gap: 6px; width: 100%; }
  .daterange input[type=date] { min-width: 0; flex: 1; width: 120px; padding: 6px; font-size: 14px; }
  .daterange .btn { padding-inline: 10px; }
  .card { padding: 16px; border-radius: 12px; }
  .dashboard-intro { padding: 20px; flex-direction: column; align-items: flex-start; gap: 16px; }
  .dashboard-intro h2 { font-size: 25px; }
  .dashboard-intro .btn { width: 100%; }
  .dashboard .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 16px 12px; border-radius: 12px; }
  .stat .big { font-size: 32px; }
  .stat .muted { font-size: 11px; }
  .stat > a { min-height: 36px; display: flex; align-items: center; }
  .dashboard .stat:last-child { grid-column: 1 / -1; }
  .dashboard-panels { gap: 14px; }
  .section-heading { gap: 8px; }
  .section-heading h2 { font-size: 16px; }
  .dashboard-program .table-scroll::before { content: 'Scorri orizzontalmente per tutti i dettagli →'; display: block; font-size: 11px; color: var(--muted); padding-bottom: 10px; }
  .modal-backdrop { padding: 8px; align-items: center; }
  .modal { max-height: calc(100dvh - 16px); border-radius: 14px; }
  .modal-head, .modal-body, .modal-foot { padding: 14px; }
  .modal-foot .btn { flex: 1 1 auto; white-space: normal; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .qr-box { flex-wrap: wrap; }
  .qr-box img { max-width: 100%; height: auto; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .toasts { left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); max-width: none; }
  .toast { overflow-wrap: anywhere; }
  .shell-bare { padding: 16px; }
  .shell-bare .card { padding: 24px 20px; }
  .cal-toolbar { gap: 6px; }
  .cal-title { min-width: 0; flex: 1; }
  .cal { flex: none; height: 65dvh; min-height: 400px; overflow-x: auto; }
  .cal-head, .cal-month-body, .cal-time-head, .cal-time-scroll { min-width: 600px; }
  .cal-single .cal-time-head, .cal-single .cal-time-scroll { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }

@media (max-width: 600px) {
  .topbar-brand { gap: 8px; }
  .topbar .brand-logo { max-width: 110px; }
  .topbar-right { gap: 5px; }
  .content .card, .content .toolbar, .content .page, .content .tabs, .content .row { min-width: 0; max-width: 100%; }
  .content .box { overflow-wrap: anywhere; }
  .section-heading a { min-height: 40px; display: inline-flex; align-items: center; }
}

/* Keep navigation and calendar controls clear at every breakpoint. */
.topbar .menu-toggle { display: none; }
.mobile-agenda { display: none; }
@media (max-width: 900px) { .topbar .menu-toggle { display: inline-flex; } }
@media (max-width: 600px) {
  .cal-toolbar { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; width: 100%; }
  .cal-toolbar > .cal-title { grid-row: 1; grid-column: 1 / -1; padding: 2px 0 8px; }
  .cal-toolbar > .btn { grid-row: 2; }
  .cal-toolbar > .seg { grid-row: 3; grid-column: 1 / -1; margin-top: 4px; }
  .cal-toolbar > .seg button { flex: 1; }
  .cal-toolbar > input { grid-row: 4; grid-column: 1 / -1; width: 100%; }
  .mobile-agenda { display: grid; gap: 10px; }
  .mobile-agenda h2 { margin: 8px 0 0; font-size: 16px; }
  .agenda-event { display: grid; grid-template-columns: minmax(0, 1fr) auto; text-align: left; gap: 4px 10px; padding: 16px; background: white; border: 1px solid var(--line); border-left: 3px solid #387c81; border-radius: 12px; font: inherit; color: var(--indigo); cursor: pointer; }
  .agenda-event > strong, .agenda-event > .muted { grid-column: 1 / -1; }
  .agenda-event > .pill { grid-column: 2; grid-row: 1; }
  .agenda-time { font-size: 12px; font-weight: 650; }
  .agenda-event > .muted { font-size: 12px; }
}
.record-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.record-head h2 { margin: 2px 0 0; }
.record-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px 20px; }
.record-value { padding: 6px 0; min-height: 20px; white-space: pre-line; }
/* Scheda anagrafica stile WordPress: contenuto a sinistra, azioni a destra */
.record-layout { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 18px; align-items: start; }
.record-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.record-main .record-head { margin-bottom: 0; flex-direction: column; justify-content: flex-start; gap: 0; }
.record-fields input[type=checkbox] { align-self: flex-start; margin: 6px 0; }
.record-box { margin: 0; }
.record-box h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 15px; color: var(--indigo); }
.record-box .record-section { margin-top: 0; padding-top: 0; border-top: 0; }
.record-fields .field-wide { grid-column: 1 / -1; }
.record-fields textarea { width: 100%; font-family: inherit; font-size: inherit; }
.record-fields .field-wide input:not([type=checkbox]) { width: 100%; max-width: 560px; }
.field-hint { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.35; }
.record-side { position: sticky; top: 12px; }
.record-actions { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.record-actions .btn { width: 100%; justify-content: center; text-align: center; white-space: normal; }
.record-actions p { margin: 4px 0 0; }
@media (max-width: 900px) {
  .record-layout { grid-template-columns: 1fr; }
  .record-side { position: static; order: -1; }
}
.multi-check { display: flex; flex-wrap: wrap; gap: 2px 12px; max-width: 360px; }
.overview-today { margin: 8px 0 -4px; }
.overview-calendar { display: flex; flex-direction: column; gap: 10px; }
.overview-calendar .section-heading { flex-wrap: wrap; gap: 8px; }
.overview-day { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.overview-day-title { margin: 0 0 10px; font-size: 16px; color: var(--indigo); }
/* Tabelle di Overview: righe basse */
table.data.data-compact th { padding: 6px 10px; }
table.data.data-compact td { padding: 4px 10px; font-size: 12.5px; line-height: 1.35; vertical-align: middle; }
table.data.data-compact .pill { padding: 1px 7px; font-size: 10.5px; }
.perm-summary { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.perm { font-size: 11px; padding: 2px 7px; border-radius: 10px; background: #eef1f4; color: #4b5760; white-space: nowrap; }
.perm-none { background: #f6f6f6; color: #9aa3ab; text-decoration: line-through; }
.perm-edit { background: #e6f2f1; color: #244950; }
.perm-publish { background: #dcebdc; color: #2f5d31; font-weight: 600; }
.perm-matrix { max-width: 520px; }
.perm-matrix td, .perm-matrix th { text-align: center; }
.perm-matrix td:first-child, .perm-matrix th:first-child { text-align: left; }

/* --- Colori delle anagrafiche --------------------------------------------- */
.color-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 0; flex: none; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.color-chip { display: inline-flex; align-items: center; font-variant-numeric: tabular-nums; }
.color-field { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.color-swatch { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.color-swatch.active { box-shadow: 0 0 0 2px var(--indigo); }
.color-custom { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.color-custom input { width: 44px; height: 44px; margin: -8px; border: none; padding: 0; cursor: pointer; }

/* --- Alias nella scheda Location ------------------------------------------ */
.record-section { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.record-section h3 { margin: 0 0 4px; font-size: 15px; color: var(--indigo); }
.alias-list { display: flex; flex-wrap: wrap; gap: 6px; }
.alias-chip { display: inline-flex; align-items: center; gap: 2px; background: #eef3f6; border: 1px solid var(--line); border-radius: 14px; padding: 2px 4px 2px 10px; font-size: 13px; }
.alias-chip .btn-link { font-size: 12px; padding: 0 4px; color: var(--error); }

/* --- Scelta file (trascina e rilascia) ------------------------------------ */
.file-drop { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border: 2px dashed #b9c6d2; border-radius: var(--radius); background: #f8fafc; color: var(--indigo); cursor: pointer; transition: border-color .15s, background .15s; }
.file-drop:hover, .file-drop:focus-visible { border-color: var(--indigo); background: #f2f7fa; outline: none; }
.file-drop.over { border-color: var(--indigo); background: var(--aqua-3); }
.file-drop.has-file { border-style: solid; border-color: #9cc5c4; background: #f2fbfa; }
.file-drop-icon { flex: none; opacity: .8; }
.file-drop-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.file-drop-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-drop-link { text-decoration: underline; color: var(--indigo); font-weight: 600; }

/* --- Modifiche massive ------------------------------------------------------ */
details.bulk-changes > summary { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; cursor: pointer; list-style: none; }
details.bulk-changes > summary::-webkit-details-marker { display: none; }
details.bulk-changes > summary::before { content: "▸"; color: var(--indigo); transition: transform .15s; display: inline-block; }
details.bulk-changes[open] > summary::before { transform: rotate(90deg); }
details.bulk-changes > summary h2 { margin: 0; font-size: 16px; }
details.bulk-changes[open] > summary { margin-bottom: 10px; }
.pill-restore { background: #e8e2f3; color: #4d3d73; }
.field-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #4b5763; }
.diff-table td { vertical-align: top; }
.diff-table tr.row-changed { background: #fff8e6; }
.text-warning { color: #8a5a00; }
.box-warning { background: #fff8e6; border-color: #f0d59a; color: #6b4a00; }

/* --- Feed: generatore di link e confronto versioni ------------------------- */
.link-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.link-steps fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px 12px; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.link-steps fieldset:disabled { opacity: .55; }
.link-steps legend { font-weight: 700; color: var(--indigo); padding: 0 4px; }
.seg-wrap { flex-wrap: wrap; }
.seg button:disabled { opacity: .45; cursor: not-allowed; }
.link-result { margin-top: 14px; padding: 12px 14px; border-radius: var(--radius); background: #f2f7fa; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.link-result code { font-size: 14px; word-break: break-all; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.xml-diff { max-height: 55vh; overflow: auto; font-size: 12px; line-height: 1.45; padding: 8px 0; }
.xml-diff > div { padding: 0 10px; white-space: pre-wrap; word-break: break-all; }
.xml-diff .diff-del { background: #fde8e7; color: #7d1a14; }
.xml-diff .diff-add { background: #e5f4e3; color: #24501f; }
.xml-diff .diff-same { color: #6b7680; }
.xml-diff .diff-gap { color: #9aa4ad; text-align: center; }
.diff-del-sample { background: #fde8e7; color: #7d1a14; padding: 0 6px; border-radius: 4px; }
.diff-add-sample { background: #e5f4e3; color: #24501f; padding: 0 6px; border-radius: 4px; }
@media (max-width: 900px) { .link-steps { grid-template-columns: 1fr; } }

/* --- Generatore di link (v2) ------------------------------------------------ */
.gen { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 8px; }
.gen-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.gen-row:last-child { border-bottom: none; }
.gen-label { display: flex; align-items: flex-start; gap: 10px; padding: 16px 14px; background: #f5f7f9; font-weight: 700; color: var(--indigo); }
.gen-num { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--indigo); color: #fff; font-size: 12px; flex: none; }
.gen-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.gen-inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 16px; }
.gen-inline .field { margin: 0; min-width: 160px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: #fff; color: var(--indigo); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .12s, border-color .12s; }
.chip:hover:not(:disabled) { border-color: var(--indigo); }
.chip.active { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.chip:disabled { opacity: .4; cursor: not-allowed; }
.link-result { flex-direction: row; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.link-result-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1 1 420px; }
@media (max-width: 700px) {
  .gen-row { grid-template-columns: 1fr; }
  .gen-label { padding: 10px 14px; }
}

/* --- Menu F&B a livelli ------------------------------------------------------ */
.breadcrumb { color: #6b7680; margin: 0 0 6px; }
.breadcrumb a { color: var(--indigo); }
.menu-new-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 16px; padding: 12px 14px; margin-bottom: 12px; border: 1px dashed var(--line); border-radius: var(--radius); background: #f8fafc; }
.menu-new-form .field { margin: 0; }
.menu-head-fields { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 16px; }
.menu-head-fields .field { margin: 0; min-width: 170px; }
.menu-cats { flex-wrap: wrap; align-items: center; }
.tab-count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 10px; background: #e6ebef; color: #4b5763; font-size: 11px; font-weight: 700; text-align: center; }
.menu-cats .active .tab-count { background: var(--indigo); color: #fff; }
.tab-add { border: 1px dashed var(--line) !important; border-radius: 8px; color: var(--indigo); background: #fff; margin-left: 6px; }
.tab-new { display: inline-flex; gap: 6px; align-items: center; margin-left: 6px; }
.menu-filters { margin: 10px 0; flex-wrap: wrap; }
.menu-cat-actions { gap: 6px; margin: 4px 0 10px; align-items: center; }

/* Menu F&B: intestazione modificabile, barra categorie, piatti modificabili nella riga */
form.menu-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 16px; }
form.menu-head .field { margin: 0; min-width: 160px; }
form.menu-head .field:first-child { flex: 1 1 240px; }
.menu-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 12px 0 8px; }
.menu-toolbar .menu-filters { display: flex; align-items: center; gap: 8px; margin: 0; margin-left: auto; }
.menu-toolbar .menu-filters input[type=search] { width: 200px; }
.row-actions { display: flex; flex-wrap: nowrap; gap: 6px; justify-content: flex-end; align-items: center; }
.drag-col { width: 28px; padding-right: 0 !important; }
.drag-handle { cursor: grab; color: #9aa6b2; font-size: 16px; user-select: none; }
[draggable=true] { cursor: grab; }
[data-dragging] { opacity: .45; }
tr[data-drag-over] td { box-shadow: inset 0 2px 0 var(--indigo); }
.tabs [data-drag-over] { box-shadow: inset 2px 0 0 var(--indigo); }
.dish-name { display: flex; gap: 10px; align-items: flex-start; }
.dish-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; flex: none; }
.dish-off td { color: var(--muted); }
.tag-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.tag-chip { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #eef3f6; border: 1px solid var(--line); font-size: 12px; white-space: nowrap; }
.tag-chip-warn { background: var(--warn-bg); border-color: #f0dcb7; color: var(--warn); }
.dish-editing > td { background: #f8fafc; }
.dish-form { padding: 6px 2px; }
.dish-form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 16px; align-items: start; }
.dish-form-grid .field { margin: 0; }
.dish-available { align-self: end; padding-bottom: 8px; }
.dish-prices { display: flex; gap: 6px; margin-bottom: 6px; }
.dish-prices input { min-width: 0; flex: 1; }
.dish-prices .dish-price-label { flex: 0 0 42%; }
.dish-checks { display: flex; flex-direction: column; gap: 6px; align-self: end; padding-bottom: 6px; }
.dish-translations { margin: 10px 0 0; }
.dish-translations summary { cursor: pointer; color: var(--indigo); font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.dish-form-actions { justify-content: flex-end; margin-top: 10px; gap: 8px; }
.dish-add { margin-top: 10px; }
.import-menus input:not([type=checkbox]), .import-menus select { min-width: 130px; }
.notice-form-grid { display: grid; grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(200px, 2fr)); gap: 10px 16px; margin-bottom: 8px; }
.notice-form-grid .field { margin: 0; }
@media (max-width: 900px) { .notice-form-grid { grid-template-columns: 1fr; } }
/* Tendina a scelta multipla */
.multi-select { position: relative; display: inline-block; min-width: 180px; }
.field .multi-select { display: block; }
.multi-select-button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 38px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.multi-select-button:hover, .multi-select.open .multi-select-button { border-color: var(--indigo-3); }
.multi-select-caret { color: var(--muted); flex: none; }
.multi-select-pop { position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; min-width: 100%; width: max-content; max-width: 320px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(35,47,71,.14); padding: 8px; }
.multi-select-pop input[type=search] { width: 100%; margin-bottom: 6px; }
.multi-select-list { max-height: 260px; overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.multi-select-list .check { padding: 4px 6px; border-radius: 6px; white-space: nowrap; }
.multi-select-list .check:hover { background: #f3f6f8; }
.multi-select-foot { display: flex; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
@media (max-width: 720px) {
  .menu-toolbar .menu-filters { margin-left: 0; flex-wrap: wrap; }
  .menu-toolbar .menu-filters input[type=search] { width: 100%; }
}

/* --- Versioni e backup ------------------------------------------------------- */
.versions-table tr.version-current td { background: #f2fbfa; }
.versions-table tr.version-zero td { background: #fafbfc; border-top: 2px solid var(--line); }
.backup-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.backup-summary > div:first-child { flex: 1 1 260px; }
.backup-groups { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 14px; }
.gen-body.gen-inline { flex-direction: row; align-items: flex-end; justify-content: flex-start; }
.versions-table .cosa { min-width: 240px; }
.versions-table .cosa .subjects { max-width: 360px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.versions-table .version-actions { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.versions-table .version-actions .btn { white-space: nowrap; }

/* Avvisi › dove si usano */
.notice-links h2 { margin-top: 0; }
.notice-link-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.notice-link { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfc; }
.notice-url { font-size: 12px; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 720px) { .notice-link { grid-template-columns: 1fr; } }

/* Duplica › location da copiare (spunte, tutte attive di default) */
.dup-locations { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px 10px; margin: 0; min-width: 0; }
.dup-locations legend { font-size: 13px; font-weight: 600; padding: 0 4px; display: flex; gap: 10px; align-items: baseline; }
.dup-loc-actions { display: inline-flex; gap: 8px; font-weight: 400; }
.link-btn { border: none; background: none; padding: 0; font: inherit; font-size: 12px; color: var(--indigo); text-decoration: underline; cursor: pointer; }
.dup-loc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 12px; max-height: 220px; overflow-y: auto; }
.dup-loc-list .check { padding: 3px 0; }
.secret { font-size: 12px; background: #f5f7f9; border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; user-select: all; }

/* Operatori (più persone per attività) */
.operators-input { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 36px; padding: 3px 4px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.operators-input > input, .operators-input .combo, .operators-input > div { flex: 1 1 120px; min-width: 120px; }
.operators-input input { border: none !important; box-shadow: none !important; padding: 4px 6px; }
.op-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 10px; border-radius: 999px; background: var(--aqua-3, #e6f4f3); color: var(--indigo); font-size: 13px; font-weight: 600; }
.op-chip.op-new { background: #fff4e0; color: #8a5a00; }
.op-chip button { border: none; background: none; cursor: pointer; font-size: 15px; line-height: 1; padding: 0 4px; color: inherit; opacity: 0.7; }
.op-chip button:hover { opacity: 1; }

/* Campi personalizzati nelle schede */
.custom-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 12px; margin-top: 6px; }

/* ---------------------------------------------------------------------------
   Stampa del mese (#/stampa), A4 orizzontale: mese, una settimana per foglio,
   orari del parco e dei punti F&B. Ogni foglio ha altezza fissa (niente pagine spezzate).
   --------------------------------------------------------------------------- */
.print-controls-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 6px; }
.print-controls-row > .field { min-width: 170px; }
.print-chips { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.print-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }

/* Anteprima a video: fogli A4 orizzontali in scala reale */
.print-doc { --page-w: 297mm; --page-h: 210mm; --pad: 10mm; font-size: 10px; line-height: 1.3; color: #1f2a3d;
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.pd-page { background: #fff; width: var(--page-w); height: var(--page-h); padding: var(--pad); margin: 16px auto; box-shadow: var(--shadow);
  box-sizing: border-box; display: flex; flex-direction: column; overflow: hidden; }
.pd-header { display: flex; align-items: center; gap: 14px; background: var(--indigo); color: #fff; border-radius: 8px; padding: 7px 14px; margin-bottom: 6px; flex: none; }
.pd-logo { height: 22px; width: auto; }
.pd-title { border-left: 1px solid rgba(255, 255, 255, 0.35); padding-left: 12px; }
.pd-kicker { text-transform: uppercase; letter-spacing: 0.14em; font-size: 8.5px; color: var(--aqua); font-weight: 700; }
.pd-title h1 { color: #fff; font-size: 17px; margin: 0; line-height: 1.15; }
.pd-legend { margin-left: auto; display: flex; flex-wrap: wrap; gap: 3px 12px; justify-content: flex-end; font-size: 8.5px; }
.pd-legend .print-dot { box-shadow: 0 0 0 1.5px #fff; }
.pd-foot { flex: none; margin-top: 4px; display: flex; justify-content: space-between; font-size: 7.5px; color: var(--muted); }

/* Visione del mese */
.pd-cal { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: auto repeat(var(--weeks), minmax(0, 1fr));
  border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.pd-cal-head { background: var(--aqua-3); color: var(--indigo); font-weight: 700; font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em; padding: 3px 6px;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pd-cell { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 3px 5px; overflow: hidden; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.pd-cell-top { flex: 1; min-height: 0; overflow: hidden; }
.pd-more { font-size: 7.5px; color: var(--muted); padding-left: 7px; }
.pd-cell-counts { flex: none; display: flex; flex-wrap: wrap; gap: 1px 7px; border-top: 1px dotted var(--line); padding-top: 2px; margin-top: 2px; font-size: 8.3px; }
.pd-cell-counts span { white-space: nowrap; }
.pd-cell-counts b { color: color-mix(in srgb, var(--c) 80%, #000); }
.pd-cell.pd-weekend, .pd-wday.pd-weekend { background: #f5f9f9; }
.pd-cell.pd-out { background: #f7f8fa; }
.pd-cell-head { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; margin-bottom: 2px; }
.pd-cell-head b { font-size: 13px; color: var(--indigo); }
.pd-cell-head span { font-size: 8px; color: var(--muted); white-space: nowrap; }
.pd-line { border-left: 3px solid var(--c); padding-left: 4px; margin-top: 2px; font-size: 8.8px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-line b { color: color-mix(in srgb, var(--c) 80%, #000); }

/* Settimana: 7 colonne, attività in ordine di orario */
.pd-week-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.pd-wday { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--line); }
.pd-wday:last-child { border-right: none; }
.pd-wday.pd-other { opacity: 0.55; }
.pd-wday-head { flex: none; background: var(--aqua-3); color: var(--indigo); padding: 3px 5px; border-bottom: 1px solid var(--line); }
.pd-wday-head b { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.04em; }
.pd-wday-hours { font-size: 7.5px; color: var(--indigo-2); min-height: 9px; }
.pd-wday-list { flex: 1; min-height: 0; padding: 2px 3px; overflow: hidden; }
.pd-item { border-left: 3px solid var(--c); padding: 1px 0 1px 4px; margin-bottom: 2px; line-height: 1.2; }
.pd-item-time { display: inline-block; font-weight: 800; color: color-mix(in srgb, var(--c) 80%, #000); font-variant-numeric: tabular-nums; margin-right: 3px; font-size: 8.5px; }
.pd-item-what { font-weight: 600; font-size: 8.5px; }
.pd-item-what em { color: var(--warn); font-weight: 400; }
.pd-item-where { display: block; font-size: 7.3px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-empty { color: #c3cbd3; text-align: center; margin-top: 8px; }
/* Settimane affollate: una riga per attività */
.pd-dense .pd-item, .pd-tight .pd-item { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 1px; padding-top: 0; padding-bottom: 0; }
.pd-dense .pd-item-where, .pd-tight .pd-item-where { display: inline; margin-left: 3px; }
.pd-dense .pd-item-where::before, .pd-tight .pd-item-where::before { content: "· "; }
.pd-tight .pd-item-time, .pd-tight .pd-item-what { font-size: 7.3px; }
.pd-tight .pd-item-where { font-size: 6.6px; }
.pd-tight .pd-item { margin-bottom: 0; line-height: 1.15; }

/* Orari */
.pd-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 8.8px; }
.pd-table th { background: var(--indigo); color: #fff; text-align: left; font-weight: 700; padding: 3px 5px; font-size: 8.5px; }
.pd-table td { padding: 1.5px 5px; border-bottom: 1px solid #e8edf2; vertical-align: top; font-variant-numeric: tabular-nums; }
.pd-table tr.pd-weekend td { background: #f5f9f9; }
.pd-table .pd-day { font-weight: 700; color: var(--indigo); white-space: nowrap; }
.pd-hours-page .pd-table { flex: none; }
.pd-hours-page .pd-foot { margin-top: auto; }
.pd-closed { color: var(--error); font-weight: 600; }

@media print {
  body, #root, .body, .content, .page { background: #fff !important; }
  .topbar, .sidebar, .no-print, .skip-link, .toasts, .toast-stack { display: none !important; }
  .body { display: block !important; height: auto !important; overflow: visible !important; }
  .content { padding: 0 !important; margin: 0 !important; overflow: visible !important; height: auto !important; }
  html, body, #root { height: auto !important; overflow: visible !important; }
  /* A4 orizzontale meno i margini di pagina (10 mm ai lati, 10 + 12 mm sopra e sotto) */
  .print-doc { --page-w: 297mm; --page-h: 209.5mm; --pad: 10mm 10mm 12mm; }
  .pd-page { margin: 0; box-shadow: none; break-after: page; }
  .pd-page:last-child { break-after: auto; }
}
.embed-box { margin-top: 6px; padding: 6px 8px; border: 1px dashed var(--line); border-radius: 8px; background: #f8fbfb; }

/* Password con occhio dentro il campo e pulsante copia */
.secret-field { display: inline-flex; align-items: center; gap: 6px; }
.secret-box { display: inline-flex; align-items: center; min-width: 230px; background: #f5f7f9; border: 1px solid var(--line); border-radius: 8px; padding: 0 2px 0 10px; height: 34px; }
.secret-box code { flex: 1; font-size: 12.5px; letter-spacing: .02em; user-select: all; background: none; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; }
.icon-btn:hover { color: var(--indigo); background: #e9eef3; }
.secret-copy { width: 34px; height: 34px; border: 1px solid var(--line); background: #fff; border-radius: 8px; }

/* Modulo account dei feed: sezioni ordinate */
.account-form { display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; margin-bottom: 18px; }
.account-form-title { margin: 0; padding: 14px 20px; font-size: 16px; color: var(--indigo); border-bottom: 1px solid var(--line); }
.account-sec { padding: 14px 20px; border-bottom: 1px solid var(--line); }
.account-sec h4 { margin: 0 0 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: flex; align-items: baseline; gap: 12px; }
.account-sec-actions { display: inline-flex; gap: 10px; text-transform: none; letter-spacing: 0; font-size: 12px; }
.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 18px; align-items: start; }
.account-pw { display: flex; flex-direction: column; gap: 6px; }
.account-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 18px; }
.account-group { display: flex; flex-direction: column; gap: 6px; }
.account-group-title { font-weight: 700; font-size: 12.5px; color: var(--indigo); }
.account-formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.account-format { display: flex; align-items: flex-start; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; cursor: pointer; background: #fff; }
.account-format.on { border-color: var(--indigo-2); background: #f3f6fb; }
.account-format span { display: flex; flex-direction: column; }
.account-format small { color: var(--muted); font-size: 11.5px; }
.account-embed { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; max-width: 560px; }
.account-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px; background: #fafbfc; flex-wrap: wrap; }
.embed-preview { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.dashboard-subtitle { margin: 14px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
/* Overview: settimana e giorno mostrano 8–23, il resto a scroll */
.overview-calendar .cal-time-scroll { flex: none; height: calc(15 * 48px + 8px); }
.dashboard-panels.hours-only { grid-template-columns: minmax(260px, 520px); }
/* Accessi ai feed: formati a etichette, riga del calendario iframe sotto l'account */
.format-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.format-chip { font-size: 11.5px; padding: 2px 8px; border-radius: 10px; background: #eef2f6; color: var(--indigo); white-space: nowrap; }
table.data tr.has-embed td { border-bottom: none; }
table.data tr.embed-row td { padding-top: 0; }
.embed-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; background: #f7fafb; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.embed-label { font-weight: 700; color: var(--indigo); font-size: 12.5px; }
.embed-sites { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 12px; flex: 1; min-width: 200px; }
.site-chip { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 1px 8px; font-size: 11.5px; }
.site-chip-admin { color: var(--muted); border-style: dashed; }
.embed-actions { display: flex; gap: 6px; margin-left: auto; }
.embed-actions .btn svg { vertical-align: -3px; margin-right: 4px; }
/* Lingua dei contenuti (bandierine in alto, stile WPML) */
.flag { border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); flex: none; vertical-align: -2px; }
@media (max-width: 720px) { 