/* HFC Dashboard — Linee guida HFC + HFC Glass */
:root {
  /* Variabili di brand: HFC/01_Brand/Linee guida design/brand.css */
  --hfc-red: #E3000F;
  --hfc-red-dark: #B8140F;
  --hfc-bg: #09090B;
  --hfc-black: #09090B;
  --hfc-surface-1: #121216;
  --hfc-surface: #121216;
  --hfc-surface-high: #1E1E24;
  --hfc-white: #F4F2EE;
  --hfc-text: #FFFFFF;
  --hfc-text-sec: #D4D4D8;
  --hfc-muted: #A1A1AA;
  --hfc-border: rgba(255, 255, 255, 0.09);
  --hfc-border-strong: rgba(255, 255, 255, 0.16);
  --hfc-pilates: #D98CC8;       /* Pilates su fondo scuro */
  --hfc-pilates-light: #A8478F; /* Pilates su fondo chiaro e in stampa */
  --hfc-error: #DC2626;
  --hfc-alert-text: #FCA5A5;    /* rosso chiaro ad alto contrasto per avvisi piccoli su scuro */
  --hfc-success: #10B981;
  --hfc-warning: #F59E0B;
  --hfc-whatsapp: #1FA855;
  --hfc-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --hfc-radius: 16px;
  --hfc-radius-pill: 999px;
  --hfc-space: 8px;
  --hfc-radius-sm: 8px;
  --hfc-pill: var(--hfc-radius-pill);
  --hfc-ink: 255, 255, 255;
  --hfc-accent-rgb: 227, 0, 15;
  --hfc-brand-red: #E3000F;
  --hfc-on-accent: #fff;
  --hfc-glass-bg: rgba(20, 20, 24, 0.82);
  --hfc-glass-border: rgba(255, 255, 255, 0.09);
  --hfc-glass-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 30px rgba(0, 0, 0, 0.35);
  --hfc-surface-solid: rgba(18, 18, 22, 0.94);
  --hfc-input-bg: rgba(30, 30, 36, 0.92);
  --hfc-sticky-bg: #121216;
  color-scheme: dark;
}

/* Tema chiaro: stile Pilates (fondo caldo #F4F2EE e malva #A8478F, senza rosso) */
:root[data-theme="light"] {
  --hfc-bg: #F4F2EE;
  --hfc-black: #F4F2EE;
  --hfc-surface-1: #F4F2EE;
  --hfc-surface: #FFFFFF;
  --hfc-surface-high: #EFEDE8;
  --hfc-white: #09090B;
  --hfc-text: #09090B;
  --hfc-text-sec: #3F3F46;
  --hfc-muted: #52525B;
  --hfc-border: rgba(9, 9, 11, 0.09);
  --hfc-border-strong: rgba(9, 9, 11, 0.20);
  --hfc-ink: 9, 9, 11;
  --hfc-red: #A8478F;
  --hfc-red-dark: #8C3A77;
  --hfc-accent-rgb: 168, 71, 143;
  --hfc-pilates: #A8478F;
  --hfc-error: #DC2626;
  --hfc-alert-text: #B8140F;
  --hfc-success: #0B8A5F;
  --hfc-warning: #B45309;
  --hfc-glass-bg: rgba(255, 255, 255, 0.84);
  --hfc-glass-border: rgba(9, 9, 11, 0.09);
  --hfc-glass-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 8px 30px rgba(9, 9, 11, 0.07);
  --hfc-surface-solid: rgba(255, 255, 255, 0.94);
  --hfc-input-bg: rgba(255, 255, 255, 0.92);
  --hfc-sticky-bg: #FFFFFF;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --hfc-bg: #F4F2EE;
    --hfc-black: #F4F2EE;
    --hfc-surface-1: #F4F2EE;
    --hfc-surface: #FFFFFF;
    --hfc-surface-high: #EFEDE8;
    --hfc-white: #09090B;
    --hfc-text: #09090B;
    --hfc-text-sec: #3F3F46;
    --hfc-muted: #52525B;
    --hfc-border: rgba(9, 9, 11, 0.09);
    --hfc-border-strong: rgba(9, 9, 11, 0.20);
    --hfc-ink: 9, 9, 11;
    --hfc-red: #A8478F;
    --hfc-red-dark: #8C3A77;
    --hfc-accent-rgb: 168, 71, 143;
    --hfc-pilates: #A8478F;
    --hfc-alert-text: #B8140F;
    --hfc-success: #0B8A5F;
    --hfc-warning: #B45309;
    --hfc-glass-bg: rgba(255, 255, 255, 0.84);
    --hfc-glass-border: rgba(9, 9, 11, 0.09);
    --hfc-glass-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 8px 30px rgba(9, 9, 11, 0.07);
    --hfc-surface-solid: rgba(255, 255, 255, 0.94);
    --hfc-input-bg: rgba(255, 255, 255, 0.92);
    --hfc-sticky-bg: #FFFFFF;
    color-scheme: light;
  }
}
[data-theme="light"] .pilates .btn-primary { color: #fff; }
[data-theme="light"] .pilates .btn-primary:hover:not(:disabled) { background: var(--hfc-pilates); filter: brightness(0.92); }
[data-theme="light"] .input::placeholder { color: #5C5C66; }
[data-theme="light"] .pill.bozza { color: #3F3F46; }
[data-theme="light"] .modal-back { background: rgba(9, 9, 11, 0.45); }
[data-theme="light"] .light.grigio { background: #A1A1AA; }
[data-theme="light"] .cal-day.out .cal-num, [data-theme="light"] .cal-empty { color: #5C5C66; }
[data-theme="light"] .count.orange { color: #fff; }
[data-theme="light"] .notice { background: rgba(217, 119, 6, 0.08); border-color: rgba(217, 119, 6, 0.35); }
[data-theme="light"] .ig-avatar { border-color: rgba(9, 9, 11, 0.2); }

/* Aspetto: scelta del tema */
.theme-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.theme-opt { position: relative; display: flex; flex-direction: column; gap: 16px; padding: 16px; border-radius: var(--hfc-radius); border: 1px solid var(--hfc-border-strong); cursor: pointer; }
.theme-opt:hover { border-color: rgba(var(--hfc-ink), 0.4); }
.theme-opt.on { border-color: var(--hfc-red); box-shadow: 0 6px 22px rgba(var(--hfc-accent-rgb), 0.25); }
.theme-opt input { position: absolute; opacity: 0; }
.theme-opt input:focus-visible + .theme-swatch { outline: 2px solid var(--hfc-red); outline-offset: 2px; }
.theme-opt b { display: block; font-size: 15px; }
.theme-opt small { display: block; font-size: 13px; color: var(--hfc-muted); }
.theme-swatch { display: flex; gap: 6px; height: 72px; padding: 12px; border-radius: var(--hfc-radius-sm); align-items: flex-end; }
.theme-swatch i { display: block; flex: 1; border-radius: 4px; }
.theme-swatch i:nth-child(1) { height: 100%; }
.theme-swatch i:nth-child(2) { height: 60%; }
.theme-swatch i:nth-child(3) { height: 28%; flex: .6; }
.sw-dark { background: #09090B; border: 1px solid rgba(255, 255, 255, 0.12); }
.sw-dark i:nth-child(1), .sw-dark i:nth-child(2) { background: #1E1E22; }
.sw-dark i:nth-child(3) { background: #E3000F; }
.sw-light { background: #F4F2EE; border: 1px solid rgba(9, 9, 11, 0.12); }
.sw-light i:nth-child(1), .sw-light i:nth-child(2) { background: #FFFFFF; }
.sw-light i:nth-child(3) { background: #A8478F; }
.sw-auto { background: linear-gradient(135deg, #F4F2EE 50%, #09090B 50%); border: 1px solid rgba(127, 127, 127, 0.3); }
.sw-auto i:nth-child(1) { background: #FFFFFF; }
.sw-auto i:nth-child(2) { background: #1E1E22; }
.sw-auto i:nth-child(3) { background: linear-gradient(90deg, #A8478F 50%, #E3000F 50%); }

* { box-sizing: border-box; }
*:focus-visible { outline: 2px solid var(--hfc-red); outline-offset: 2px; }
html { margin: 0; background-color: var(--hfc-bg); color: var(--hfc-white); font-family: var(--hfc-font); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body { margin: 0; background: transparent; color: var(--hfc-white); font-family: var(--hfc-font); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; position: relative; min-height: 100vh; }

/* ---------- sfondo animato HFC Glass (via di mezzo bilanciata: sfondo nitido che si sfoca sotto i pannelli in vetro) */
.hfc-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; background: var(--hfc-bg); }
.hfc-bg-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hfc-bg-svg .bg { fill: #09090B; }
.hfc-bg-svg .r0 { stop-color: #E3000F; stop-opacity: 0.22; }
.hfc-bg-svg .r1 { stop-color: #E3000F; stop-opacity: 0.07; }
.hfc-bg-svg .r2 { stop-color: #E3000F; stop-opacity: 0; }
.hfc-bg-svg .d0 { stop-color: #8A0009; stop-opacity: 0.32; }
.hfc-bg-svg .d1 { stop-color: #8A0009; stop-opacity: 0; }
.hfc-bg-svg .h0 { stop-color: #3F3F46; stop-opacity: 0.35; }
.hfc-bg-svg .h1 { stop-color: #3F3F46; stop-opacity: 0; }
.hfc-bg-svg .bar { fill: #E3000F; opacity: 0.09; }
.hfc-bg-svg .grid { stroke: #FFFFFF; stroke-opacity: 0.035; stroke-width: 1; fill: none; }
:root[data-theme="light"] .hfc-bg-svg .bg { fill: #F4F2EE; }
:root[data-theme="light"] .hfc-bg-svg .r0 { stop-color: #A8478F; stop-opacity: 0.12; }
:root[data-theme="light"] .hfc-bg-svg .r1 { stop-color: #A8478F; stop-opacity: 0.04; }
:root[data-theme="light"] .hfc-bg-svg .r2 { stop-color: #A8478F; stop-opacity: 0; }
:root[data-theme="light"] .hfc-bg-svg .d0 { stop-color: #A1A1AA; stop-opacity: 0.22; }
:root[data-theme="light"] .hfc-bg-svg .d1 { stop-color: #A1A1AA; stop-opacity: 0; }
:root[data-theme="light"] .hfc-bg-svg .h0 { stop-color: #FFFFFF; stop-opacity: 0.70; }
:root[data-theme="light"] .hfc-bg-svg .h1 { stop-color: #FFFFFF; stop-opacity: 0; }
:root[data-theme="light"] .hfc-bg-svg .bar { fill: #A8478F; opacity: 0.08; }
:root[data-theme="light"] .hfc-bg-svg .grid { stroke: #09090B; stroke-opacity: 0.04; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .hfc-bg-svg .bg { fill: #F4F2EE; }
  :root:not([data-theme="dark"]) .hfc-bg-svg .r0 { stop-color: #A8478F; stop-opacity: 0.12; }
  :root:not([data-theme="dark"]) .hfc-bg-svg .r1 { stop-color: #A8478F; stop-opacity: 0.04; }
  :root:not([data-theme="dark"]) .hfc-bg-svg .r2 { stop-color: #A8478F; stop-opacity: 0; }
  :root:not([data-theme="dark"]) .hfc-bg-svg .d0 { stop-color: #A1A1AA; stop-opacity: 0.22; }
  :root:not([data-theme="dark"]) .hfc-bg-svg .d1 { stop-color: #A1A1AA; stop-opacity: 0; }
  :root:not([data-theme="dark"]) .hfc-bg-svg .h0 { stop-color: #FFFFFF; stop-opacity: 0.70; }
  :root:not([data-theme="dark"]) .hfc-bg-svg .h1 { stop-color: #FFFFFF; stop-opacity: 0; }
  :root:not([data-theme="dark"]) .hfc-bg-svg .bar { fill: #A8478F; opacity: 0.08; }
  :root:not([data-theme="dark"]) .hfc-bg-svg .grid { stroke: #09090B; stroke-opacity: 0.04; }
}
.hfc-bg-svg .a { animation: driftA 46s ease-in-out infinite alternate; will-change: transform; }
.hfc-bg-svg .b { animation: driftB 58s ease-in-out infinite alternate; will-change: transform; }
.hfc-bg-svg .c { animation: driftC 39s ease-in-out infinite alternate; will-change: transform; }
.hfc-bg-svg .e { animation: driftE 64s ease-in-out infinite alternate; will-change: transform; }
.hfc-bg-svg .bars { animation: slideBars 30s ease-in-out infinite alternate; will-change: transform; }
@keyframes driftA { from { transform: translate(0px, 0px); } to { transform: translate(220px, 140px); } }
@keyframes driftB { from { transform: translate(0px, 0px); } to { transform: translate(-260px, -120px); } }
@keyframes driftC { from { transform: translate(0px, 0px); } to { transform: translate(-140px, 180px); } }
@keyframes driftE { from { transform: translate(0px, 0px); } to { transform: translate(180px, -160px); } }
@keyframes slideBars { from { transform: translate(0px, 0px); } to { transform: translate(-40px, 0px); } }
@media (prefers-reduced-motion: reduce) {
  .hfc-bg-svg .a, .hfc-bg-svg .b, .hfc-bg-svg .c, .hfc-bg-svg .e, .hfc-bg-svg .bars { animation: none !important; }
}
a { color: var(--hfc-white); }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- marchio */
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo { height: 44px; width: auto; display: block; }
.brand-word { display: flex; flex-direction: column; gap: 2px; }
.brand-word small { font-size: 9px; font-weight: 600; letter-spacing: 0.22em; color: var(--hfc-muted); }

.label { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--hfc-muted); }
.sl { color: var(--hfc-red); }
.sl-pilates { color: var(--hfc-pilates); }
.label .sl, .label .sl-pilates { font-weight: 800; }
.bar { width: 24px; height: 3px; background: var(--hfc-red); margin-top: 8px; }
h1.title { margin: 8px 0 0; font-size: 40px; line-height: 1.05; font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: -0.01em; }
h2.section { margin: 0; font-size: 20px; font-weight: 700; font-style: normal; }

/* ---------- pulsanti */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 24px; border-radius: var(--hfc-pill); border: 1px solid transparent; background: transparent; font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, filter .15s, opacity .15s; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--hfc-red); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--hfc-red-dark); filter: none; }
.btn-secondary { border-color: rgba(var(--hfc-ink), 0.2); color: var(--hfc-text); }
.btn-secondary:hover:not(:disabled) { border-color: rgba(var(--hfc-ink), 0.45); background: rgba(var(--hfc-ink), 0.04); }
.btn-ghost { color: var(--hfc-muted); padding: 0 16px; }
.btn-ghost:hover { color: var(--hfc-text); }
.btn-danger { color: var(--hfc-white); border-color: rgba(227,0,15,0.6); }
.btn-danger:hover { background: rgba(227,0,15,0.12); }
.btn-ghost.danger svg { color: var(--hfc-brand-red); }
.btn-ghost.danger:hover { color: var(--hfc-text); }
.btn-success { border-color: rgba(22,163,74,0.5); color: var(--hfc-success); }
.btn-success:hover { background: rgba(22,163,74,0.08); }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: 50%; color: var(--hfc-muted); }
.btn-icon:hover { color: var(--hfc-text); background: rgba(var(--hfc-ink), 0.06); }
.btn svg, .btn-icon svg { width: 18px; height: 18px; flex: none; }
/* Linea Pilates: malva solo dove compare Pilates */
.pilates .btn-primary { background: var(--hfc-pilates); color: #09090B; }
.pilates .btn-primary:hover:not(:disabled) { background: var(--hfc-pilates); filter: brightness(0.92); }
.pilates .sl { color: var(--hfc-pilates); }
.pilates .bar { background: var(--hfc-pilates); }
.pilates .input:focus { border-color: var(--hfc-pilates); box-shadow: 0 0 0 3px rgba(168,71,143,0.2); }

/* ---------- campi */
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--hfc-muted); }
.input, select.input, textarea.input { width: 100%; height: 48px; padding: 0 16px; border-radius: var(--hfc-radius-sm); border: 1px solid var(--hfc-border-strong); background: var(--hfc-input-bg); color: var(--hfc-white); outline: none; }
select.input { padding: 11px 14px; line-height: 1.4; cursor: pointer; }
textarea.input { height: auto; min-height: 88px; padding: 12px 16px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: rgba(var(--hfc-accent-rgb), 0.7); box-shadow: 0 0 0 3px rgba(var(--hfc-accent-rgb), 0.18); }
.input::placeholder { color: #71717A; }
.input-sm { height: 36px; padding: 0 10px; }
select.input.input-sm { height: 36px; padding: 6px 10px; }
.input[type="date"] { padding: 0 8px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.help { font-size: 13px; color: var(--hfc-muted); margin: 0; }
.radio-row { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-pill { position: relative; }
.radio-pill input { position: absolute; opacity: 0; }
.radio-pill span { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: var(--hfc-pill); border: 1px solid var(--hfc-border-strong); font-weight: 600; font-size: 14px; cursor: pointer; }
.radio-pill input:checked + span { background: var(--hfc-white); color: var(--hfc-black); border-color: var(--hfc-white); }
.radio-pill input:focus-visible + span { box-shadow: 0 0 0 3px rgba(var(--hfc-accent-rgb), 0.35); }

/* ---------- login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: transparent; }
.login-card { width: 100%; max-width: 400px; background: var(--hfc-glass-bg); -webkit-backdrop-filter: blur(28px) saturate(110%); backdrop-filter: blur(28px) saturate(110%); border: 1px solid var(--hfc-glass-border); box-shadow: var(--hfc-glass-shadow); border-radius: var(--hfc-radius); padding: 40px 32px; display: flex; flex-direction: column; gap: 24px; }
.login-card .brand { justify-content: center; }
.login-card form { display: flex; flex-direction: column; gap: 16px; }
.login-card .btn { width: 100%; margin-top: 8px; }
.login-title { text-align: center; }
.login-title h1 { margin: 8px 0 0; font-size: 28px; font-weight: 800; font-style: italic; text-transform: uppercase; }
.form-error { color: var(--hfc-white); font-size: 14px; font-weight: 600; min-height: 1em; margin: 0; }
.form-error:not(:empty) { border-left: 3px solid var(--hfc-error); padding-left: 8px; }

/* ---------- layout app */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 248px; flex: none; --hfc-text: #FFFFFF; --hfc-white: #F4F2EE; --hfc-muted: #A1A1AA; --hfc-ink: 255, 255, 255; --hfc-border: rgba(255, 255, 255, 0.09); --hfc-border-strong: rgba(255, 255, 255, 0.16); --hfc-surface-high: #1E1E24; color: #F4F2EE; background: rgba(18, 18, 22, 0.90); -webkit-backdrop-filter: blur(28px) saturate(110%); backdrop-filter: blur(28px) saturate(110%); border-right: 1px solid rgba(255, 255, 255, 0.09); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 8px 30px rgba(0, 0, 0, 0.35); padding: 20px 14px; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 0; height: 100vh; overflow: hidden; z-index: 20; }
.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; margin-right: -10px; padding-right: 10px; padding-bottom: 16px; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: rgba(var(--hfc-ink), 0.22) transparent; }
.nav::-webkit-scrollbar { width: 4px; }
.nav::-webkit-scrollbar-track { background: transparent; }
.nav::-webkit-scrollbar-thumb { background: rgba(var(--hfc-ink), 0.22); border-radius: 4px; }
.nav::-webkit-scrollbar-thumb:hover { background: rgba(var(--hfc-ink), 0.4); }
.nav a, .nav-group { flex: none; }
.nav a { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: var(--hfc-radius-sm); text-decoration: none; color: var(--hfc-muted); font-weight: 600; font-size: 14px; white-space: nowrap; }
.nav a:hover { color: var(--hfc-text); background: rgba(var(--hfc-ink), 0.05); }
.nav a.active { color: var(--hfc-text); font-weight: 700; background: var(--hfc-surface-high); }
.nav a.active svg { color: var(--hfc-red); }
.nav a svg { width: 18px; height: 18px; flex: none; }
/* gruppi del menu con sotto-voci */
.nav-group-btn { display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; padding: 0 12px; border: 0; border-radius: var(--hfc-radius-sm); background: transparent; color: var(--hfc-muted); font-weight: 600; font-size: 14px; cursor: pointer; text-align: left; flex: none; white-space: nowrap; }
.nav-group-btn:hover { color: var(--hfc-text); background: rgba(var(--hfc-ink), 0.04); }
.nav-group-btn > svg { width: 18px; height: 18px; flex: none; }
.nav-group.has-active .nav-group-btn { color: var(--hfc-text); font-weight: 700; }
.nav-group.has-active .nav-group-btn > svg { color: var(--hfc-red); }
.nav-chev { margin-left: auto; display: inline-flex; transition: transform .15s; }
.nav-chev svg { width: 16px; height: 16px; }
.nav-group-btn[aria-expanded="true"] .nav-chev { transform: rotate(90deg); }
.nav-group-badge { margin-left: auto; display: flex; }
.nav-group-badge + .nav-chev { margin-left: 8px; }
.nav-group-btn[aria-expanded="true"] .nav-group-badge { display: none; }
.nav-sub { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 4px 25px; padding-left: 16px; border-left: 1px solid var(--hfc-border); }
.nav-sub a, .nav-soon { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: var(--hfc-radius-sm); text-decoration: none; color: var(--hfc-muted); font-weight: 600; font-size: 14px; flex: none; }
.nav-sub a:hover { color: var(--hfc-text); background: rgba(var(--hfc-ink), 0.05); }
.nav-sub a.active { color: var(--hfc-text); font-weight: 700; background: var(--hfc-surface-high); }
.nav-soon { border: 0; background: transparent; color: #52525B; cursor: not-allowed; width: 100%; text-align: left; font-family: inherit; }
.nav-soon:hover { color: #71717A; }
.nav-soon-tag { margin-left: auto; padding: 2px 8px; border-radius: var(--hfc-pill); background: rgba(var(--hfc-ink), 0.05); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.nav .count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: var(--hfc-pill); font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.count.orange { background: var(--hfc-warning); color: var(--hfc-black); }
.count.red { background: var(--hfc-brand-red); color: #fff; }
.pw-wrap { position: relative; display: block; }
.pw-wrap .input { width: 100%; padding-right: 48px; }
.pw-toggle { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); width: 40px; height: 40px; display: grid; place-items: center;
             border: 0; border-radius: var(--hfc-radius-sm); background: transparent; color: var(--hfc-muted); cursor: pointer; }
.pw-toggle:hover { color: var(--hfc-text); background: rgba(var(--hfc-ink), 0.05); }
.pw-toggle:focus-visible { outline: 2px solid var(--hfc-red); outline-offset: -2px; }
.pw-toggle svg { width: 18px; height: 18px; }
.cf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.cf-item { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; text-align: left; border-radius: var(--hfc-radius-sm); border: 1px solid var(--hfc-border); background: var(--hfc-surface-high); color: var(--hfc-text); cursor: pointer; font: inherit; }
.cf-item:hover:not(:disabled) { border-color: var(--hfc-border-strong); }
.cf-item.on { border-color: var(--hfc-red); box-shadow: 0 6px 22px rgba(var(--hfc-accent-rgb), 0.25); }
.cf-item.zero { opacity: .5; cursor: default; }
.cf-item b { font-size: 22px; font-weight: 900; font-style: italic; line-height: 1; }
.cf-top { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--hfc-muted); font-weight: 600; }
.mt-esito { white-space: nowrap; }
.mt-esito .light { width: 9px; height: 9px; margin-right: 8px; box-shadow: none; vertical-align: middle; }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex: none; }
.menu-close { display: none; }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding-top: 16px; border-top: 1px solid var(--hfc-border); flex: none; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--hfc-surface-high); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.sidebar-foot .who { display: flex; flex-direction: column; min-width: 0; font-size: 13px; line-height: 1.3; }
.sidebar-foot .who small { color: var(--hfc-muted); }
.sidebar-foot .btn-icon { margin-left: auto; }

.main { flex: 1; min-width: 0; padding: 32px 40px 64px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.card { background: var(--hfc-glass-bg); -webkit-backdrop-filter: blur(28px) saturate(110%); backdrop-filter: blur(28px) saturate(110%); border: 1px solid var(--hfc-glass-border); box-shadow: var(--hfc-glass-shadow); border-radius: var(--hfc-radius); padding: 24px; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 16px; }

/* ---------- KPI */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpi { background: var(--hfc-glass-bg); -webkit-backdrop-filter: blur(28px) saturate(110%); backdrop-filter: blur(28px) saturate(110%); border: 1px solid var(--hfc-glass-border); box-shadow: var(--hfc-glass-shadow); border-radius: var(--hfc-radius); padding: 16px 20px; display: flex; flex-direction: column; gap: 8px; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s; min-width: 0; overflow: hidden; }
.kpi:hover { border-color: var(--hfc-border-strong); }
.kpi.selected { border-color: var(--hfc-red); box-shadow: 0 6px 22px rgba(var(--hfc-accent-rgb), 0.25); }
.kpi-top { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--hfc-muted); }
.kpi-num { font-size: clamp(20px, 2.1vw, 32px); line-height: 1.05; font-weight: 900; font-style: italic; white-space: nowrap; }
.kpi-sub { font-size: 13px; color: var(--hfc-muted); }

/* ---------- semaforo */
.light { width: 12px; height: 12px; border-radius: 50%; flex: none; display: inline-block; }
.light.verde { background: var(--hfc-success); box-shadow: 0 0 0 3px rgba(22,163,74,0.18); }
.light.arancione { background: var(--hfc-warning); box-shadow: 0 0 0 3px rgba(217,119,6,0.2); }
.light.rosso { background: var(--hfc-brand-red); box-shadow: 0 0 0 3px rgba(227,0,15,0.22); }
.light.grigio { background: #52525B; }
.status-text.verde { color: var(--hfc-success); }
.status-text.arancione { color: var(--hfc-warning); }
.status-text.rosso { color: var(--hfc-white); } /* il rosso è sul pallino: niente testo rosso piccolo su nero */
.status-text.grigio { color: var(--hfc-muted); }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--hfc-pill); font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.pill.bozza { background: var(--hfc-surface-high); color: var(--hfc-text-sec); }
.pill.inviato { background: rgba(var(--hfc-ink), 0.1); color: var(--hfc-text); }
.pill.accettato { background: rgba(22,163,74,0.16); color: var(--hfc-success); }
.pill.pilates { background: var(--hfc-pilates); color: #fff; }
.pill.rifiutato { background: rgba(161,161,170,0.12); color: var(--hfc-muted); }

/* ---------- filtri e tabella */
.toolbar { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 40px; padding: 0 16px; border-radius: var(--hfc-pill); border: 1px solid var(--hfc-border-strong); background: transparent; color: var(--hfc-muted); font-weight: 600; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.chip:hover { color: var(--hfc-text); }
.chip.active { background: var(--hfc-white); border-color: var(--hfc-white); color: var(--hfc-black); }
.chip .n { font-size: 11px; opacity: .7; }
.search { position: relative; width: 300px; max-width: 100%; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--hfc-muted); }
.search .input { padding-left: 40px; border-radius: var(--hfc-pill); }

.table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--hfc-border); border-radius: var(--hfc-radius); background: var(--hfc-surface-solid); scrollbar-width: auto; scrollbar-color: rgba(var(--hfc-ink), 0.35) transparent; }
/* barre di scorrimento sempre visibili (sul Mac di solito si nascondono) */
.table-wrap::-webkit-scrollbar { width: 12px; height: 12px; }
.table-wrap::-webkit-scrollbar-track { background: rgba(var(--hfc-ink), 0.04); }
.table-wrap::-webkit-scrollbar-thumb { background: rgba(var(--hfc-ink), 0.28); border-radius: 6px; border: 3px solid transparent; background-clip: padding-box; }
.table-wrap::-webkit-scrollbar-thumb:hover { background-color: rgba(var(--hfc-ink), 0.45); }
.table-wrap::-webkit-scrollbar-corner { background: transparent; }
.table-wrap.can-drag { cursor: grab; }
.table-wrap.dragging { cursor: grabbing; user-select: none; }
.table-wrap.dragging tbody tr { cursor: grabbing; }
.th-scroll { justify-content: flex-end; margin: 0 0 8px; }
.th-scroll[hidden] { display: none; }
.th-scroll .help { margin: 0 4px 0 0; font-size: 12px; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--hfc-muted); padding: 16px; border-bottom: 1px solid var(--hfc-border); white-space: nowrap; }
table.list td { padding: 16px; border-bottom: 1px solid var(--hfc-border); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list tbody tr { cursor: pointer; }
table.list tbody tr:hover td { background: rgba(var(--hfc-ink), 0.025); }
table.list .num { text-align: right; white-space: nowrap; }
.q-num { font-weight: 700; white-space: nowrap; }
.q-client { font-weight: 600; }
.q-sub { font-size: 12px; color: var(--hfc-muted); max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.money { font-weight: 900; font-style: italic; white-space: nowrap; }
.empty { text-align: center; padding: 56px 20px; color: var(--hfc-muted); }
.empty b { display: block; color: var(--hfc-text); font-size: 17px; margin-bottom: 6px; }

/* ---------- editor */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 344px; gap: 24px; align-items: start; }
.side { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 16px; }
.lines { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.line { background: var(--hfc-black); border: 1px solid var(--hfc-border); border-radius: var(--hfc-radius); padding: 8px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.line-top { display: flex; align-items: center; gap: 10px; }
.line-n { width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--hfc-surface-high); display: grid; place-items: center; font-size: 11px; font-weight: 800; color: var(--hfc-muted); }
.line .input.line-name { flex: 1; min-width: 0; font-weight: 700; font-size: 15px; }
.line-grid { display: grid; grid-template-columns: minmax(120px, 1.6fr) minmax(56px, .6fr) minmax(96px, 1fr) minmax(70px, .7fr) minmax(100px, 1fr); gap: 8px; align-items: end; }
.lf { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lf > span { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--hfc-muted); padding-left: 2px; }
.lf-tot { text-align: right; }
.lf-tot b { height: 40px; display: flex; align-items: center; justify-content: flex-end; font-size: 17px; font-weight: 900; font-style: italic; white-space: nowrap; }
.line .input { height: 40px; padding: 0 10px; background: var(--hfc-surface); border-color: var(--hfc-border); }
.line .input:hover { border-color: var(--hfc-border-strong); }
.line .input:focus { background: var(--hfc-surface-high); }
.line .input.code { font-family: Menlo, monospace; font-size: 13px; }
.line .input.right { text-align: right; }
.stock { font-size: 11px; font-weight: 700; color: var(--hfc-muted); white-space: nowrap; }
.stock.ok { color: var(--hfc-success); }
.stock.low { color: var(--hfc-warning); }
.stock.none { color: var(--hfc-muted); }

.picker { position: relative; }
.picker-results { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; right: 0; background: var(--hfc-glass-bg); -webkit-backdrop-filter: blur(28px) saturate(110%); backdrop-filter: blur(28px) saturate(110%); border: 1px solid var(--hfc-glass-border); border-radius: var(--hfc-radius-sm); box-shadow: var(--hfc-glass-shadow); max-height: 340px; overflow-y: auto; padding: 6px; }
.picker-item { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; padding: 10px 12px; border-radius: 8px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.picker-item:hover, .picker-item.focus { background: rgba(var(--hfc-ink), 0.06); }
.picker-item code { font-size: 12px; color: var(--hfc-muted); overflow: hidden; text-overflow: ellipsis; }
.picker-item .pn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.picker-item .pp { font-weight: 900; font-style: italic; white-space: nowrap; }
.picker-empty { padding: 14px; color: var(--hfc-muted); font-size: 14px; }

.totals { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.totals .row { display: flex; justify-content: space-between; gap: 12px; color: var(--hfc-muted); }
.totals .row b { color: var(--hfc-white); font-weight: 600; }
.totals .grand { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--hfc-border); }
.totals .grand span { font-weight: 700; }
.totals .grand b { font-size: 32px; line-height: 1; font-weight: 900; font-style: italic; }
.status-box { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: var(--hfc-radius-sm); background: var(--hfc-surface-high); }
.status-box .t { font-weight: 700; font-size: 14px; }
.status-box .s { font-size: 13px; color: var(--hfc-muted); }
.actions-col { display: flex; flex-direction: column; gap: 8px; }
.actions-col .btn { width: 100%; }
.actions-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.timeline { display: flex; flex-direction: column; gap: 12px; font-size: 13px; max-height: 260px; overflow-y: auto; }
.timeline div { display: grid; grid-template-columns: 10px 1fr; gap: 10px; }
.timeline i { width: 8px; height: 8px; border-radius: 50%; background: var(--hfc-red); margin-top: 6px; }
.timeline small { display: block; color: var(--hfc-muted); }

/* ---------- chiusura serale */
.cnt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(285px, 1fr)); gap: 24px; }
.cnt-row { display: grid; grid-template-columns: 64px auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--hfc-border); }
.cnt-name { font-weight: 800; font-style: italic; font-size: 16px; white-space: nowrap; }
.cnt-step { display: flex; align-items: center; gap: 6px; }
.cnt-step .input { width: 62px; height: 38px; text-align: center; padding: 0 6px; font-weight: 700; }
.cnt-step .btn-icon { width: 36px; height: 36px; border: 1px solid var(--hfc-border-strong); color: var(--hfc-white); font-size: 20px; font-weight: 700; }
.cnt-tot { text-align: right; font-weight: 900; font-style: italic; white-space: nowrap; font-size: 15px; }
.out-box { display: flex; align-items: center; background: transparent; cursor: default; }
.out-box b { font-size: 18px; font-weight: 900; font-style: italic; }
.altri-row { display: grid; grid-template-columns: minmax(0, 1fr) 140px 110px 40px; gap: 8px; margin-bottom: 8px; }
.chk-res { font-size: 13px; font-weight: 800; white-space: nowrap; }
.chk-res.ok { color: var(--hfc-success); }
.chk-res.ko { color: var(--hfc-brand-red); }
.chk-more { margin-top: 12px; font-size: 13px; }
.chk-more summary { cursor: pointer; color: var(--hfc-muted); font-weight: 600; }
.chk-row .mini-main span { white-space: normal; }
.chk-row .mini-main .chk-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14px; color: var(--hfc-white); overflow: visible; }

/* ---------- calendario social */
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-month { min-width: 200px; text-align: center; }
.cal-next svg { transform: rotate(180deg); }
.cal-sum { margin: -8px 0 16px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--hfc-border); border-radius: var(--hfc-radius); overflow: hidden; background: var(--hfc-border); gap: 1px; }
.cal-head { background: var(--hfc-surface); padding: 8px 16px; font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--hfc-muted); }
.cal-day { background: var(--hfc-surface); min-height: 128px; padding: 8px; display: flex; flex-direction: column; gap: 4px; min-width: 0; transition: background .15s; }
.cal-day.out { background: var(--hfc-black); }
.cal-day.out .cal-num { color: #52525B; }
.cal-day.drop, .cal-ideas.drop { background: var(--hfc-surface-high); outline: 2px dashed var(--hfc-border-strong); outline-offset: -4px; }
.cal-num { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 32px; padding: 0 8px; border: 0; border-radius: var(--hfc-radius-sm); background: transparent; color: var(--hfc-muted); font-weight: 700; font-size: 14px; cursor: pointer; }
.cal-num:hover { background: rgba(var(--hfc-ink), 0.05); color: var(--hfc-text); }
.cal-plus { opacity: 0; display: inline-flex; }
.cal-plus svg { width: 16px; height: 16px; }
.cal-num:hover .cal-plus, .cal-num:focus-visible .cal-plus { opacity: 1; }
.cal-day.today .cal-num { color: var(--hfc-text); }
.cal-day.today .cal-num::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--hfc-red); margin-right: auto; order: 2; }
.cal-day.today { box-shadow: inset 0 3px 0 var(--hfc-red); }
.cal-post { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; padding: 8px; border-radius: var(--hfc-radius-sm); border: 1px solid var(--hfc-border); border-left: 3px solid var(--hfc-brand-red); background: var(--hfc-surface-high); cursor: grab; min-width: 0; }
.cal-post:hover { border-color: var(--hfc-border-strong); border-left-color: inherit; }
.cal-post.linea-hfc { border-left-color: var(--hfc-brand-red); }
.cal-post.linea-tekkfit { border-left-color: var(--hfc-white); }
.cal-post.linea-pilates { border-left-color: var(--hfc-pilates); }
.cal-post.done { opacity: .55; }
.cal-post-top { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--hfc-muted); }
.cal-post-top .light { width: 8px; height: 8px; box-shadow: none; }
.cal-ora { font-weight: 700; color: var(--hfc-white); }
.cal-fmt { margin-left: auto; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.cal-title { font-size: 13px; font-weight: 600; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cal-ch { font-size: 11px; color: var(--hfc-muted); }
.cal-ideas { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; min-height: 56px; border-radius: var(--hfc-radius-sm); }
.cal-agenda { display: none; }
.modal.post-modal { max-width: 1040px; }
/* viste, filtri, semaforo */
.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: var(--hfc-pill); background: var(--hfc-surface); border: 1px solid var(--hfc-border); margin-right: 8px; }
.seg button { height: 32px; padding: 0 16px; border: 0; border-radius: var(--hfc-pill); background: transparent; color: var(--hfc-muted); font-weight: 600; font-size: 13px; cursor: pointer; }
.seg button:hover { color: var(--hfc-text); }
.seg button.active { background: var(--hfc-white); color: var(--hfc-black); }
.cal-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }
.cal-filter select { height: 40px; border-radius: var(--hfc-pill); padding: 0 16px; width: auto; }
.cal-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.link-btn { border: 0; background: none; padding: 0; color: var(--hfc-white); font-weight: 700; text-decoration: underline; cursor: pointer; font-size: inherit; }
.cal-ev { display: block; font-size: 11px; font-weight: 600; color: var(--hfc-warning); line-height: 1.3; padding: 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev::before { content: '★ '; }
.cal-ev.mine { color: var(--hfc-white); }
.cal-thumb { display: block; margin: -8px -8px 4px -5px; height: 56px; overflow: hidden; border-radius: 6px 6px 0 0; background: var(--hfc-black); }
.cal-thumb img, .cal-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.cal-post.urg-arancione { box-shadow: 0 0 0 1px var(--hfc-warning); }
.cal-post.urg-rosso { box-shadow: 0 0 0 1px var(--hfc-brand-red); }
.cal-state { font-size: 12px; color: var(--hfc-muted); }
.urg-arancione .cal-state { color: var(--hfc-warning); }
.urg-rosso .cal-state { color: var(--hfc-white); font-weight: 700; }
/* settimana */
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cal-wday { background: var(--hfc-surface); border: 1px solid var(--hfc-border); border-radius: var(--hfc-radius); padding: 8px; display: flex; flex-direction: column; gap: 8px; min-height: 360px; min-width: 0; }
.cal-wday.today { box-shadow: inset 0 3px 0 var(--hfc-red); }
.cal-wday.drop { background: var(--hfc-surface-high); outline: 2px dashed var(--hfc-border-strong); outline-offset: -4px; }
.cal-wday-head { display: flex; align-items: center; gap: 8px; padding: 0 0 0 8px; }
.cal-wday-head b { font-size: 20px; font-weight: 800; font-style: italic; }
.cal-wday-head .btn-icon { margin-left: auto; width: 32px; height: 32px; }
.cal-wday .cal-ev { padding: 0 8px; }
.cal-post.big .cal-thumb { height: auto; aspect-ratio: 4 / 5; }
.cal-post.big .cal-title { -webkit-line-clamp: 3; font-size: 14px; }
.cal-empty { color: #52525B; padding: 0 8px; }
/* griglia instagram */
.ig-grid-card { max-width: 760px; }
.ig-profile { display: flex; gap: 16px; align-items: center; margin-bottom: 24px; }
.ig-profile b { font-size: 17px; }
.ig-avatar { width: 56px; height: 56px; flex: none; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: var(--hfc-black); border: 1px solid var(--hfc-border-strong); }
.ig-avatar.linea-tekkfit { background: #fff; }
.ig-avatar img { width: 80%; height: auto; }
.ig-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.ig-tile { position: relative; aspect-ratio: 3 / 4; padding: 0; border: 0; background: var(--hfc-surface-high); overflow: hidden; cursor: pointer; display: block; }
.ig-tile img, .ig-tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-tile.future::after { content: 'In programma'; position: absolute; top: 8px; left: 8px; padding: 2px 8px; border-radius: var(--hfc-pill); background: rgba(9,9,11,0.8); color: #fff; font-size: 11px; font-weight: 700; }
.ig-icon { position: absolute; top: 6px; right: 8px; color: #fff; font-size: 16px; text-shadow: 0 1px 4px rgba(0,0,0,0.6); }
.ig-tile-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 8px 8px; font-size: 12px; font-weight: 600; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,0.75)); text-align: left; opacity: 0; transition: opacity .15s; }
.ig-tile:hover .ig-tile-info, .ig-tile:focus-visible .ig-tile-info { opacity: 1; }
.ig-ph { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 16px; text-align: left; background: var(--hfc-surface-high); border-top: 3px solid var(--hfc-brand-red); }
.ig-ph.linea-tekkfit { border-top-color: var(--hfc-white); }
.ig-ph.linea-pilates { border-top-color: var(--hfc-pilates); }
.ig-ph b { font-size: 14px; font-weight: 800; font-style: italic; text-transform: uppercase; line-height: 1.2; color: #fff; }
.ig-ph small { font-size: 12px; color: var(--hfc-muted); }
/* finestra del post: modulo a sinistra, anteprima a destra */
.pm-grid { display: grid; grid-template-columns: minmax(0, 1fr) 344px; gap: 24px; align-items: start; }
.pm-side { position: sticky; top: 0; display: flex; flex-direction: column; gap: 16px; }
.pm-model { justify-content: space-between; }
.ig { background: #000; border: 1px solid var(--hfc-border-strong); border-radius: var(--hfc-radius); overflow: hidden; font-size: 14px; color: #F5F5F5; }
.ig-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; }
.ig-head .ig-avatar { width: 32px; height: 32px; }
.ig-head b { font-size: 14px; }
.ig-more { margin-left: auto; color: var(--hfc-muted); letter-spacing: 1px; }
.ig-media { position: relative; aspect-ratio: 4 / 5; background: var(--hfc-surface-high); }
.ig.vertical .ig-media { aspect-ratio: 9 / 16; max-height: 520px; margin: 0 auto; }
.ig-media img, .ig-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.85); color: #000; font-size: 20px; line-height: 1; cursor: pointer; }
.ig-arrow.prev { left: 8px; } .ig-arrow.next { right: 8px; }
.ig-count { position: absolute; top: 8px; right: 8px; padding: 2px 8px; border-radius: var(--hfc-pill); background: rgba(0,0,0,0.7); font-size: 12px; font-weight: 600; }
.ig-dots { display: flex; justify-content: center; gap: 4px; padding-top: 8px; }
.ig-dots i { width: 6px; height: 6px; border-radius: 50%; background: #52525B; }
.ig-dots i.on { background: #fff; }
.ig-actions { display: flex; gap: 16px; padding: 8px 12px 4px; }
.ig-actions svg { width: 22px; height: 22px; }
.ig-caption { padding: 4px 12px 12px; line-height: 1.45; overflow-wrap: anywhere; }
.ig-tag { color: #E0E7FF; }
.ig-altro { border: 0; background: none; padding: 0; color: var(--hfc-muted); cursor: pointer; font-size: 14px; }
.ig-note { min-height: 1em; }
.pm-media { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pm-media:empty { display: none; }
.pm-m { position: relative; aspect-ratio: 1; border-radius: var(--hfc-radius-sm); overflow: hidden; background: var(--hfc-black); }
.pm-m img, .pm-m video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pm-m-btn { position: absolute; top: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(9,9,11,0.8); color: #fff; display: grid; place-items: center; cursor: pointer; font-size: 12px; padding: 0; }
.pm-m-btn { left: 4px; } .pm-m-btn.del { left: auto; right: 4px; }
.pm-m-btn svg { width: 14px; height: 14px; }
.pm-cover { position: absolute; left: 4px; bottom: 4px; padding: 2px 6px; border-radius: var(--hfc-pill); background: rgba(9,9,11,0.8); font-size: 10px; font-weight: 700; }
.pm-drop { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: var(--hfc-radius-sm); border: 1px dashed var(--hfc-border-strong); cursor: pointer; }
.pm-drop:hover, .pm-drop.drop { background: var(--hfc-surface-high); border-color: rgba(var(--hfc-ink), 0.4); }
.pm-drop svg { width: 24px; height: 24px; flex: none; color: var(--hfc-muted); }
.pm-drop span { display: flex; flex-direction: column; font-size: 14px; }
.pm-drop small { color: var(--hfc-muted); font-size: 12px; }
#pm-ev { color: var(--hfc-warning); margin-top: -8px; }
#pm-ev:empty { display: none; }
#pm-foot-left { display: flex; gap: 8px; margin-right: auto; align-items: center; }
/* piano tipo */
.modal.plan-modal { max-width: 880px; }
/* scheda prodotto (Magazzino) */
table.list tbody tr:focus-visible { outline: 2px solid var(--hfc-red); outline-offset: -2px; }
.modal.product-modal { max-width: 880px; gap: 20px; }
/* tabella del magazzino (stile foglio Excel) */
.mt-toolbar { align-items: flex-end; }
.mt-count { margin: 4px 0 0; }
.mt-count b { color: var(--hfc-text); }
.mt-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mt-tools .btn svg { width: 16px; height: 16px; }
.mt-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.mt-filters .chip { height: 34px; padding: 0 14px; }
.mt-fchip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 6px 0 14px; border-radius: var(--hfc-pill); background: rgba(var(--hfc-accent-rgb), 0.12); border: 1px solid rgba(var(--hfc-accent-rgb), 0.4); font-size: 13px; max-width: 100%; }
.mt-fchip b { font-weight: 700; }
.mt-fchip button { display: inline-grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 50%; background: transparent; color: var(--hfc-muted); cursor: pointer; }
.mt-fchip button:hover { color: var(--hfc-text); background: rgba(var(--hfc-ink), 0.08); }
.mt-fchip svg { width: 14px; height: 14px; }
.mt-wrap { max-height: 72vh; overflow: auto; scrollbar-width: auto; scrollbar-color: rgba(var(--hfc-ink), 0.35) transparent; }
/* barre di scorrimento sempre visibili (sul Mac di solito si nascondono) */
.mt-wrap::-webkit-scrollbar { width: 12px; height: 12px; }
.mt-wrap::-webkit-scrollbar-track { background: rgba(var(--hfc-ink), 0.04); }
.mt-wrap::-webkit-scrollbar-thumb { background: rgba(var(--hfc-ink), 0.28); border-radius: 6px; border: 3px solid transparent; background-clip: padding-box; }
.mt-wrap::-webkit-scrollbar-thumb:hover { background-color: rgba(var(--hfc-ink), 0.45); }
.mt-wrap::-webkit-scrollbar-corner { background: transparent; }
.mt-frame { position: relative; }
/* cartellini: caratteristiche prese dal sito */
.spec-auto { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.spec-auto .btn svg { width: 15px; height: 15px; }
.spec-more { display: grid; gap: 6px; }
/* vendite online */
.on-cassa td { vertical-align: top; }
.on-cassa-wrap { max-height: 460px; overflow: auto; }
#on-cassa .cf-item:disabled { cursor: default; }
.on-cassa .on-prod { max-width: 280px; white-space: normal; }
#on-cassa .cf-grid { margin-bottom: 4px; }
.spec-warn { display: block; margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: rgba(245, 158, 11, .12); color: inherit; }
.spec-more .chips { flex-wrap: wrap; }
.spec-more .chip { gap: 4px; }
.spec-more .chip svg { width: 13px; height: 13px; }
/* a destra: le righe sfumano nello sfondo dove ci sono altre colonne */
.mt-frame::after { content: ''; position: absolute; top: 1px; right: 13px; bottom: 13px; width: 40px; pointer-events: none; opacity: 0;
                   transition: opacity .15s; z-index: 2; border-radius: 0 var(--hfc-radius) 0 0; background: linear-gradient(to left, var(--hfc-surface), rgba(var(--hfc-ink), 0) ); }
.mt-frame.more-right::after { opacity: .9; }
/* a sinistra: quando si è scorso, la colonna del codice (ferma) ha un'ombra leggera sul suo bordo */
.mt-frame.more-left .mt-table th.mt-code, .mt-frame.more-left .mt-table td.mt-code { box-shadow: 8px 0 8px -8px rgba(0, 0, 0, 0.35); clip-path: inset(0 -16px 0 0); }
.mt-hscroll { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.mt-hscroll .btn-icon { width: 34px; height: 34px; }
.mt-hscroll .btn-icon svg { width: 16px; height: 16px; }
.mt-hscroll .mt-right svg { transform: rotate(180deg); }
.mt-hscroll .btn:disabled { opacity: .35; cursor: default; }
.mt-table { font-size: 13px; }
.mt-table th { position: sticky; top: 0; z-index: 2; background: var(--hfc-sticky-bg); padding: 0 4px 0 12px; height: 44px; font-size: 10.5px; letter-spacing: 0.05em; }
.mt-table td { padding: 10px 12px; }
.mt-table th.mt-code, .mt-table td.mt-code { position: sticky; left: 0; z-index: 2; background: var(--hfc-sticky-bg); }
.mt-table th.mt-code { z-index: 4; }
.mt-table td.mt-code { white-space: nowrap; max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.mt-table td.mt-code code { font-size: 12px; }
table.list.mt-table tbody tr:hover td.mt-code { background-color: var(--hfc-sticky-bg); background-image: linear-gradient(rgba(var(--hfc-ink), 0.04), rgba(var(--hfc-ink), 0.04)); }
.mt-th { display: inline-flex; align-items: center; gap: 2px; }
th.num .mt-th { flex-direction: row-reverse; }
.mt-sort { border: 0; background: transparent; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; padding: 6px 2px; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.mt-sort:hover { color: var(--hfc-text); }
th[aria-sort="ascending"], th[aria-sort="descending"] { color: var(--hfc-text); }
.mt-arrow { font-size: 9px; color: var(--hfc-red); }
.mt-fbtn { display: inline-grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 6px; background: transparent; color: var(--hfc-muted); cursor: pointer; opacity: .55; }
.mt-fbtn svg { width: 13px; height: 13px; }
.mt-fbtn:hover, th:hover .mt-fbtn { opacity: 1; background: rgba(var(--hfc-ink), 0.06); }
.mt-fbtn.on { opacity: 1; color: var(--hfc-on-accent); background: var(--hfc-red); }
.mt-name { min-width: 190px; max-width: 320px; }
.mt-table .stock { font-size: 11px; }
.mt-text { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-money { font-weight: 600; font-variant-numeric: tabular-nums; }
.mt-empty { color: var(--hfc-muted); opacity: .5; }
.mt-more { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.mt-pop { position: absolute; z-index: 60; width: 300px; max-width: calc(100vw - 16px); padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--hfc-glass-bg); -webkit-backdrop-filter: blur(28px) saturate(110%); backdrop-filter: blur(28px) saturate(110%); border: 1px solid var(--hfc-glass-border); border-radius: var(--hfc-radius-sm); box-shadow: var(--hfc-glass-shadow); font-size: 14px; }
.mt-pop-t { font-size: 15px; }
.mt-pop-sort { display: flex; gap: 6px; flex-wrap: wrap; }
.mt-pop-sort .btn { flex: 1; justify-content: center; }
.mt-pop-search { width: 100%; }
.mt-vals { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; border: 1px solid var(--hfc-border); border-radius: var(--hfc-radius-sm); padding: 4px; }
.mt-val { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.mt-val:hover { background: rgba(var(--hfc-ink), 0.05); }
.mt-val[hidden] { display: none; }
.mt-val span:first-of-type { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-val .n { font-size: 12px; color: var(--hfc-muted); }
.mt-val input { accent-color: var(--hfc-red); }
.mt-all { font-weight: 600; }
.mt-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mt-pop-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; }
.mt-pop-cols .mt-vals { max-height: 360px; }
@media (max-width: 640px) {
  .mt-tools { width: 100%; }
  .mt-tools .search { width: 100%; }
  .mt-wrap { max-height: 65vh; }
  .mt-name { min-width: 180px; }
}
.pd-head { display: flex; gap: 16px; align-items: flex-start; min-width: 0; }
.pd-head .label code { font-size: 12px; color: var(--hfc-text); }
.pd-img { width: 88px; height: 88px; object-fit: contain; flex: none; border-radius: var(--hfc-radius-sm); background: #fff; }
.pd-title { margin: 6px 0 0; font-size: 22px; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.pd-ean { margin-top: 6px; font-size: 13px; color: var(--hfc-muted); }
.pd-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.pd-kpi { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: var(--hfc-radius-sm); background: var(--hfc-surface-high); }
.pd-kpi > span { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--hfc-muted); }
.pd-kpi b { font-size: 24px; }
.pd-kpi small { font-size: 12px; color: var(--hfc-muted); }
.pd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.pd-sec { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pd-h { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--hfc-muted); display: flex; align-items: center; gap: 8px; }
.pd-count { padding: 1px 8px; border-radius: var(--hfc-pill); background: var(--hfc-surface-high); color: var(--hfc-text); letter-spacing: 0; }
.pd-list { margin: 0; display: flex; flex-direction: column; }
.pd-row { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--hfc-border); font-size: 14px; }
.pd-row:last-child { border-bottom: 0; }
.pd-row dt { color: var(--hfc-muted); text-transform: capitalize; }
.pd-row dd { margin: 0; text-align: right; font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.pd-links { display: flex; flex-direction: column; border: 1px solid var(--hfc-border); border-radius: var(--hfc-radius-sm); }
.pd-links a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; color: var(--hfc-text); text-decoration: none; font-size: 14px; border-bottom: 1px solid var(--hfc-border); }
.pd-links a:last-child { border-bottom: 0; }
.pd-links a:hover { background: rgba(var(--hfc-ink), 0.04); }
.pd-links a svg { width: 16px; height: 16px; color: var(--hfc-muted); }
.pd-links a > span:nth-of-type(1) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-q, .pd-date { color: var(--hfc-muted); font-size: 13px; white-space: nowrap; }
.pd-tech summary { cursor: pointer; font-size: 13px; color: var(--hfc-muted); }
.pd-tech .pd-list { margin-top: 8px; }
@media (max-width: 640px) {
  .pd-img { width: 64px; height: 64px; }
  .pd-date { display: none; }
  .pd-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pd-kpi { padding: 12px; }
  .pd-kpi b { font-size: 19px; }
}
.plan-h { margin-top: 8px; }
.plan-rub { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: var(--hfc-radius); background: var(--hfc-black); border: 1px solid var(--hfc-border); }
.plan-rub-top { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 120px 40px; gap: 8px; align-items: center; }
.plan-rub-top:nth-child(2) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2.4fr); }
.plan-rub .input { height: 40px; }
.plan-rub textarea.input { height: auto; min-height: 64px; }
.plan-ev { display: grid; grid-template-columns: 200px minmax(0, 1fr) 40px; gap: 8px; }
.radio-pill input[type="checkbox"] { position: absolute; opacity: 0; }
#pm-count.over { color: var(--hfc-warning); font-weight: 700; }

/* ---------- home */
.home-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.home-grid .card + .card { margin-top: 0; }
.home-sub { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 12px; }
.mini-list { display: flex; flex-direction: column; }
.mini-row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-top: 1px solid var(--hfc-border); color: var(--hfc-white); }
.mini-row:first-child { border-top: 0; }
a.mini-row:hover .mini-main b { text-decoration: underline; }
.mini-main { flex: 1; min-width: 0; display: flex; flex-direction: column; text-decoration: none; color: var(--hfc-white); }
.mini-main b { font-size: 15px; font-weight: 600; line-height: 1.35; }
.mini-main span { margin-top: 2px; font-size: 13px; color: var(--hfc-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.light.rosa { background: var(--hfc-pilates); }
.shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.shortcuts a { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: var(--hfc-radius); background: var(--hfc-surface-high); border: 1px solid var(--hfc-border); text-decoration: none; color: var(--hfc-white); transition: border-color .15s; }
.shortcuts a:hover { border-color: var(--hfc-border-strong); }
.shortcuts a svg { width: 40px; height: 40px; padding: 10px; border-radius: 50%; background: var(--hfc-black); color: var(--hfc-red); margin-bottom: 8px; }
.shortcuts b { font-size: 14px; }
.shortcuts span { font-size: 12px; color: var(--hfc-muted); }

.steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.steps li::marker { color: var(--hfc-red); font-weight: 800; }

/* ---------- integrazioni */
.int-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.int-grid .card + .card { margin-top: 0; }
.int-card { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.int-top { display: flex; align-items: flex-start; gap: 10px; width: 100%; }
.int-top .light { margin-top: 5px; }
.int-top b { flex: 1; font-size: 15px; line-height: 1.35; }
.int-det { margin: 0; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.int-card .btn { margin-top: auto; }
.int-card.idea { background: transparent; border-style: dashed; }

/* ---------- cartellini */
.tg-title { font-family: var(--hfc-font); font-size: 28.25px; font-weight: 900; font-style: italic; fill: #111; letter-spacing: -0.02em; }
.tg-slash { font-weight: 700; font-style: normal; letter-spacing: -0.08em; }
.tg-label { font-family: var(--hfc-font); font-size: 21px; font-weight: 500; fill: #111; letter-spacing: -0.01em; }
.tg-val { font-family: var(--hfc-font); font-size: 21px; font-weight: 800; font-style: italic; fill: #111; letter-spacing: -0.01em; }
.tg-price { font-family: var(--hfc-font); font-size: 21px; font-weight: 900; font-style: italic; fill: #111; }
.tags-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.tag-card { background: var(--hfc-glass-bg); -webkit-backdrop-filter: blur(28px) saturate(110%); backdrop-filter: blur(28px) saturate(110%); border: 1px solid var(--hfc-glass-border); box-shadow: var(--hfc-glass-shadow); border-radius: var(--hfc-radius); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.tag-card.selected { border-color: var(--hfc-red); box-shadow: 0 6px 22px rgba(var(--hfc-accent-rgb), 0.25); }
.tag-card.pilates.selected { border-color: var(--hfc-pilates); box-shadow: 0 0 0 1px var(--hfc-pilates); }
.tag-card.pilates .tag-check input { accent-color: var(--hfc-pilates); }
.tag-prev { display: block; background: #E4E4E7; padding: 14px; }
.tag-prev svg, .tag-live svg { display: block; width: 100%; height: auto; border-radius: 4px; background: #fff; }
.tag-meta { display: flex; align-items: center; gap: 16px; padding: 16px; }
.tag-meta .pill { margin-left: auto; }
.tag-meta b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag-meta span { font-size: 12px; color: var(--hfc-muted); }
.tag-check input { width: 20px; height: 20px; accent-color: var(--hfc-red); cursor: pointer; }
.tag-editor { grid-template-columns: minmax(0, 1fr) 480px; }
.tag-live { background: #E4E4E7; border-radius: var(--hfc-radius); padding: 16px; }
.spec-rows { display: flex; flex-direction: column; gap: 8px; }
.spec-row { display: grid; grid-template-columns: 24px minmax(0, 1.3fr) minmax(0, 1fr); gap: 8px; align-items: center; }
.sheets { display: flex; flex-direction: column; align-items: center; gap: 24px; }
@media screen { .sheets .sheet { width: min(640px, 100%) !important; height: auto !important; box-shadow: 0 20px 50px rgba(0,0,0,0.5); } }

/* ---------- modale */
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: grid; place-items: center; padding: 20px; z-index: 50; }
.modal { width: 100%; max-width: 620px; max-height: calc(100vh - 40px); overflow-y: auto; background: var(--hfc-glass-bg); -webkit-backdrop-filter: blur(28px) saturate(110%); backdrop-filter: blur(28px) saturate(110%); border: 1px solid var(--hfc-glass-border); box-shadow: var(--hfc-glass-shadow); border-radius: var(--hfc-radius); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.modal-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.notice { padding: 12px 14px; border-radius: var(--hfc-radius-sm); background: rgba(217,119,6,0.1); border: 1px solid rgba(217,119,6,0.3); color: var(--hfc-warning); font-size: 13px; }

/* ---------- toast */
.toasts { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 10px; z-index: 60; }
.toast { background: var(--hfc-white); color: var(--hfc-black); padding: 12px 16px; border-radius: var(--hfc-radius-sm); font-weight: 600; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,0.4); max-width: 380px; animation: tin .2s ease-out; }
.toast.err { background: var(--hfc-brand-red); color: #fff; }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- documento preventivo (anteprima e stampa) */
.doc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.doc { background: #fff; color: #111; max-width: 820px; margin: 0 auto; border-radius: var(--hfc-radius); padding: 48px 52px; font-size: 13px; }
.doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding-bottom: 24px; border-bottom: 3px solid var(--hfc-brand-red); }
.doc .brand-word small { color: #71717A; }
.doc-company { text-align: right; font-size: 12px; color: #52525B; line-height: 1.6; }
.doc-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin: 28px 0 22px; }
.doc-title h1 { margin: 8px 0 0; font-size: 32px; line-height: 1; font-weight: 800; font-style: italic; text-transform: uppercase; }
.doc .label { color: #71717A; }
.doc .label .sl { color: var(--hfc-red-dark); }
.doc-meta { text-align: right; font-size: 12px; color: #52525B; line-height: 1.7; }
.doc-meta b { color: #111; }
.doc-client { background: #F4F2EE; border-radius: 10px; padding: 16px 18px; margin-bottom: 22px; line-height: 1.6; }
.doc-client b { font-size: 15px; }
.doc table { width: 100%; border-collapse: collapse; }
.doc th { background: #09090B; color: #fff; text-align: left; padding: 9px 10px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.doc td { padding: 10px; border-bottom: 1px solid #E4E4E7; vertical-align: top; }
.doc td.r, .doc th.r { text-align: right; white-space: nowrap; }
.doc td code { font-size: 11px; color: #52525B; }
.doc-totals { margin: 18px 0 0 auto; width: 300px; display: flex; flex-direction: column; gap: 6px; }
.doc-totals div { display: flex; justify-content: space-between; color: #52525B; }
.doc-totals .g { padding-top: 10px; margin-top: 4px; border-top: 2px solid #111; color: #111; align-items: baseline; }
.doc-totals .g b { font-size: 28px; font-weight: 900; font-style: italic; }
.doc-notes { margin-top: 28px; font-size: 12px; color: #3F3F46; line-height: 1.6; }
.doc-notes h4 { margin: 0 0 4px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #71717A; }
.doc-foot { margin-top: 36px; padding-top: 16px; border-top: 1px solid #E4E4E7; font-size: 11px; color: #71717A; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.doc-sign { margin-top: 36px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; font-size: 12px; color: #52525B; }
.doc-sign div { border-top: 1px solid #A1A1AA; padding-top: 6px; }

@media print {
  @page { size: A4; margin: 12mm; }
  html, body { background: #fff !important; }
  .sidebar, .doc-actions, .toasts, .mobile-top, .hfc-bg { display: none !important; }
  .main { padding: 0 !important; }
  .doc { padding: 0; max-width: none; border-radius: 0; }
  .doc, .doc * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sheets { display: block; }
  .sheets .sheet { display: block; page-break-after: always; break-after: page; }
  .sheets .sheet:last-child { page-break-after: auto; break-after: auto; }
}

/* ---------- responsive */
.mobile-top { display: none; }
@media (max-width: 1360px) {
  .main { padding: 28px 24px 56px; }
  table.list:not(.mt-table) th, table.list:not(.mt-table) td { padding: 12px 8px; }
  table.list.mt-table th, table.list.mt-table td { padding: 12px 10px; }
  .q-sub { max-width: 240px; }
}
@media (max-width: 1100px) {
  .editor { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tag-editor { grid-template-columns: minmax(0, 1fr); }
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .cnt-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .cal-day { min-height: 104px; padding: 4px; }
  .cal-post-top .cal-fmt, .cal-ch { display: none; }
  .cal-week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pm-grid { grid-template-columns: minmax(0, 1fr); }
  .pm-side { position: static; }
}
@media (max-width: 820px) {
  .app { flex-direction: column; }
  /* menu laterale a scomparsa (☰) */
  .sidebar { position: fixed; top: 0; left: 0; bottom: 0; z-index: 60; width: min(300px, 86vw); height: 100%; overflow-y: auto; gap: 24px;
             transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s; box-shadow: 0 0 40px rgba(0,0,0,.4); }
  .app.menu-open .sidebar { transform: none; visibility: visible; transition: transform .2s ease; }
  .menu-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.5); }
  .menu-close { display: inline-flex; }
  .nav a, .nav-group-btn { height: 44px; }
  .nav-sub a, .nav-soon { height: 40px; }
  .mobile-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; --hfc-text: #FFFFFF; --hfc-white: #F4F2EE; --hfc-muted: #A1A1AA; --hfc-ink: 255, 255, 255; --hfc-border-strong: rgba(255, 255, 255, 0.16); color: #F4F2EE; background: rgba(18, 18, 22, 0.90); -webkit-backdrop-filter: blur(28px) saturate(110%); backdrop-filter: blur(28px) saturate(110%); border-bottom: 1px solid rgba(255, 255, 255, 0.09); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35); position: sticky; top: 0; z-index: 30; }
  .menu-btn { position: relative; width: 44px; height: 44px; color: var(--hfc-text); border: 1px solid var(--hfc-border-strong); }
  .menu-btn svg { width: 22px; height: 22px; }
  /* più spazio utile su telefono */
  .card { padding: 16px; }
  .page-head { margin-bottom: 20px; gap: 12px; }
  .page-head > div:first-child { min-width: 0; }
  .page-head .page-actions { width: 100%; }
  .page-head .page-actions > .btn { flex: 1 1 auto; padding-left: 14px; padding-right: 14px; gap: 6px; font-size: 13px; }
  .page-head .page-actions > .btn-icon { flex: none; padding: 0; }
  .page-head .page-actions > .input { flex: 1 1 140px; min-width: 0; }
  .kpis { gap: 8px; margin-bottom: 16px; }
  .kpi { padding: 12px 14px; gap: 6px; }
  .kpi-num { font-size: 24px; }
  .chips-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-right: 24px; min-width: 0; max-width: 100%;
                  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); }
  .chips-scroll::-webkit-scrollbar { display: none; }
  .chips-scroll .chip { flex: none; }
  .mt-tools .btn { flex: 1 1 0; }
  .cf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cf-item { padding: 10px 12px; }
  .cf-top { font-size: 12px; align-items: flex-start; }
  .cf-top .light { margin-top: 3px; }
  .cf-item b { font-size: 20px; }
  .sv-dates { width: 100%; }
  .sv-dates .input { flex: 1; width: auto; min-width: 0; }
  .menu-dot { position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--hfc-brand-red); box-shadow: 0 0 0 2px var(--hfc-surface); }
  .main { padding: 20px 16px 48px; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  h1.title { font-size: 28px; }
  .search { width: 100%; }
  .doc { padding: 24px 18px; }
  .doc-head, .doc-title { flex-direction: column; align-items: flex-start; }
  .doc-company, .doc-meta { text-align: left; }
  .doc-totals { width: 100%; }
  .line-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lf-tot { text-align: left; }
  .lf-tot b { justify-content: flex-start; }
  .cnt-row { grid-template-columns: 56px auto minmax(0, 1fr); gap: 8px; }
  .cnt-name { font-size: 15px; }
  .cnt-step { gap: 4px; }
  .cnt-step .input { width: 56px; }
  .cnt-tot { font-size: 14px; }
  .altri-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 40px; }
  .altri-row .input:first-child { grid-column: 1 / -1; }
  .cal { display: none; }
  .cal-agenda { display: flex; flex-direction: column; gap: 8px; }
  .cal-agenda-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; align-items: start; }
  .cal-agenda-day { font-size: 13px; font-weight: 700; color: var(--hfc-muted); padding-top: 8px; text-transform: capitalize; }
  .cal-month { flex: 1; min-width: 0; font-size: 16px; }
  .cal-week { display: none; }
  .cal-nav { flex-wrap: wrap; width: 100%; }
  .cal-nav > .seg { flex: 0 0 100%; margin: 0 0 6px; }
  .seg { margin: 0 0 8px; }
  .chart-head { flex-direction: column; gap: 10px; }
  .chart-head-ctrl { width: 100%; justify-content: flex-start; }
  .plan-rub-top, .plan-rub-top:nth-child(2), .plan-ev { grid-template-columns: minmax(0, 1fr); }
  .cal-thumb { height: 120px; }
  .ig-ph { padding: 8px; gap: 4px; }
  .ig-ph b { font-size: 11px; }
  .ig-ph small { display: none; }
  .ig-tile.future::after { content: 'Prog.'; top: 4px; left: 4px; font-size: 10px; padding: 1px 6px; }
  .ig-profile { align-items: flex-start; }
}
@media (max-width: 640px) {
  .theme-opts { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .kpi-spark { width: 52px; height: 20px; }
  .kpi-num { font-size: 20px; }
}

/* ---------- vendite (storico casse) */
.sv-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sv-dates { display: flex; align-items: center; gap: 8px; color: var(--hfc-muted); }
.sv-dates .input { width: 160px; height: 40px; }
.sv-search { width: 360px; max-width: 100%; }
.sv-sync { margin-bottom: 16px; }
.sv-progress { height: 8px; border-radius: 4px; background: rgba(var(--hfc-ink), 0.08); margin-top: 12px; overflow: hidden; }
.sv-progress span { display: block; height: 100%; background: var(--hfc-red); border-radius: 4px; transition: width .3s; }
.sv-kpis .kpi-num { font-size: clamp(22px, 2.2vw, 32px); }
.sv-delta { display: block; font-weight: 700; }
.sv-delta.su { color: var(--hfc-success); }
.sv-delta.giu { color: var(--hfc-warning); }
.sv-delta-vs { color: var(--hfc-muted); font-weight: 400; }
.sv-chart { width: 100%; min-height: 260px; }
.sv-chart svg { display: block; max-width: 100%; height: auto; }
.sv-chart text { fill: var(--hfc-muted); font-size: 11px; font-family: var(--hfc-font); font-variant-numeric: tabular-nums; }
.sv-grid { stroke: var(--hfc-border); stroke-width: 1; }
.sv-cur { fill: var(--hfc-red); }
.sv-prev { fill: rgba(var(--hfc-ink), 0.26); }
.sv-hit, .sv-hit-area { fill: transparent; cursor: crosshair; }
.sv-hit.on { fill: rgba(var(--hfc-ink), 0.05); }
.sv-line-cur { fill: none; stroke: var(--hfc-red); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.sv-line-prev { fill: none; stroke: rgba(var(--hfc-ink), 0.35); stroke-width: 1.8; stroke-dasharray: 5 4; stroke-linecap: round; }
.sv-guide { stroke: rgba(var(--hfc-ink), 0.22); stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.sv-dot { fill: var(--hfc-red); stroke: var(--hfc-surface); stroke-width: 2; pointer-events: none; transition: r .12s; }
.sv-dot-prev { fill: var(--hfc-muted); stroke: var(--hfc-surface); stroke-width: 1.5; pointer-events: none; }
.kpi-row-num { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.kpi-spark { flex: none; overflow: visible; opacity: .92; }

/* ciambella (donut), heatmap, barra semaforo, imbuto clienti */
.dn-wrap { display: grid; grid-template-columns: 156px minmax(0, 1fr); gap: 20px; align-items: center; margin-top: 12px; }
.dn-ring { position: relative; width: 156px; height: 156px; margin: 0 auto; }
.dn-ring svg { display: block; overflow: visible; }
.dn-arc { transition: stroke-width .15s, opacity .15s; cursor: pointer; }
.dn-arc.on { stroke-width: 21; }
.dn-center { position: absolute; inset: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; gap: 2px; }
.dn-center span { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--hfc-muted); }
.dn-center b { font-size: 14.5px; font-weight: 900; font-style: italic; line-height: 1.15; white-space: nowrap; }
.dn-legend { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dn-item { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 6px; font-size: 13px; cursor: default; }
.dn-item:hover, .dn-item.on { background: rgba(var(--hfc-ink), 0.05); }
.dn-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dn-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dn-val { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dn-val small { font-weight: 400; color: var(--hfc-muted); margin-left: 4px; }

.hm-grid { display: grid; grid-template-columns: 82px repeat(7, minmax(0, 1fr)); gap: 5px; align-items: center; margin-top: 12px; }
.hm-day { text-align: center; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--hfc-muted); padding-bottom: 2px; }
.hm-label { display: flex; flex-direction: column; line-height: 1.15; padding-right: 4px; }
.hm-label b { font-size: 12.5px; font-weight: 600; }
.hm-label small { font-size: 11px; color: var(--hfc-muted); }
.hm-cell { height: 38px; border-radius: 6px; border: 1px solid var(--hfc-border); display: grid; place-items: center; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: default; transition: transform .1s, border-color .12s; }
.hm-cell.zero { color: var(--hfc-muted); font-weight: 400; }
.hm-cell.strong { color: #fff; border-color: transparent; }
.hm-cell:hover, .hm-cell:focus-visible { border-color: var(--hfc-white); transform: scale(1.04); outline: none; }

.sem-wrap { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 8px; }
.sem-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; gap: 2px; background: rgba(var(--hfc-ink), 0.06); }
.sem-seg { display: block; height: 100%; border-radius: 2px; transition: width .25s; }
.sem-leg { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--hfc-muted); }
.sem-item { display: inline-flex; align-items: center; gap: 6px; }
.sem-item i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.sem-item b { color: var(--hfc-text); font-weight: 700; font-variant-numeric: tabular-nums; }
.sem-item small { opacity: .8; }

.fn-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.fn-step { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: var(--hfc-radius-sm); border: 1px solid var(--hfc-border); background: var(--hfc-surface-high); color: inherit; font: inherit; text-align: left; }
.fn-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 600; color: var(--hfc-muted); }
.fn-pct { font-variant-numeric: tabular-nums; color: var(--hfc-text); font-weight: 700; }
.fn-num { font-size: 24px; font-weight: 900; font-style: italic; line-height: 1; }
.fn-track { height: 6px; border-radius: 999px; background: rgba(var(--hfc-ink), 0.08); overflow: hidden; }
.fn-fill { display: block; height: 100%; border-radius: 999px; background: var(--hfc-red); }
.fn-fill.gold { background: linear-gradient(90deg, #8A6A2E, #E5C878, #A8803A); }
.fn-sub { font-size: 12px; color: var(--hfc-muted); }
@media (max-width: 960px) {
  .fn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .dn-wrap { grid-template-columns: minmax(0, 1fr); }
  .hm-grid { grid-template-columns: 64px repeat(7, minmax(0, 1fr)); gap: 3px; }
  .hm-cell { height: 32px; font-size: 11px; }
}
.sv-legend { display: flex; gap: 16px; font-size: 13px; color: var(--hfc-muted); }
.sv-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.chart-head-main { flex: 1; min-width: 0; }
.chart-head-main .help { margin: 2px 0 0; }
.chart-head-ctrl { display: flex; align-items: center; gap: 8px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.chart-head-ctrl .seg { margin: 0; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--hfc-muted); margin-bottom: 10px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend:empty { display: none; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.sw.cur { background: var(--hfc-red); }
.sw.prev { background: rgba(var(--hfc-ink), 0.26); }
.sv-table { margin-top: 12px; font-size: 13px; }
.sv-table summary { cursor: pointer; color: var(--hfc-muted); font-weight: 600; margin-bottom: 8px; }
.sv-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 16px 0; }
.sv-grid2 .card { margin: 0; }
.hb { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.hb-row { display: grid; grid-template-columns: minmax(80px, 34%) minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 4px; border-radius: 6px; }
.hb-row:hover, .hb-row:focus-visible { background: rgba(var(--hfc-ink), 0.05); outline: none; }
.hb-name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-track { height: 14px; }
.hb-bar { display: block; height: 14px; background: rgba(var(--hfc-ink), 0.26); border-radius: 0 4px 4px 0; }
.hb-bar.top { background: var(--hfc-red); }
.hb-val { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hb-val small { font-weight: 400; color: var(--hfc-muted); margin-left: 4px; }
.sv-rank { width: 24px; text-align: center; font-weight: 900; font-style: italic; color: var(--hfc-muted); }
.sv-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--hfc-muted); cursor: pointer; }
.sv-prod td { vertical-align: top; }
.sv-notes { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--hfc-muted); }
.sv-tip { position: fixed; z-index: 1000; pointer-events: none; background: var(--hfc-glass-bg); -webkit-backdrop-filter: blur(28px) saturate(110%); backdrop-filter: blur(28px) saturate(110%); color: var(--hfc-text); border: 1px solid var(--hfc-glass-border); border-radius: 10px; padding: 8px 12px; font-size: 13px; box-shadow: var(--hfc-glass-shadow); min-width: 160px; }
.sv-tip-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; color: var(--hfc-muted); }
.sv-tip-row b { margin-left: auto; color: var(--hfc-text); font-variant-numeric: tabular-nums; }
.sv-tip-sub { margin-top: 4px; color: var(--hfc-muted); font-size: 12px; }
@media (max-width: 900px) {
  .sv-grid2 { grid-template-columns: minmax(0, 1fr); }
  .sv-search { width: 100%; }
  .sv-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) { .sidebar { transition: none !important; } }

/* ------------------------------------------------------------ cassa del giorno */
.ca-add { display: flex; gap: 8px; align-items: flex-start; }
.ca-items { display: flex; flex-direction: column; gap: 8px; }
.ca-item { display: grid; grid-template-columns: minmax(0, 1fr) 72px 110px 96px 40px; gap: 8px; align-items: end; padding: 10px 12px; border: 1px solid var(--hfc-border); border-radius: var(--hfc-radius-sm); }
.ca-item-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; align-self: center; }
.ca-item-name code { font-size: 12px; color: var(--hfc-muted); }
.ca-item-name span { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.ca-q, .ca-p { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--hfc-muted); font-weight: 600; }
.ca-lt { text-align: right; white-space: nowrap; align-self: center; font-style: italic; font-weight: 900; }
.ca-check { display: flex; align-items: center; gap: 8px; min-height: 48px; font-size: 14px; cursor: pointer; }
.ca-check input { width: 18px; height: 18px; accent-color: var(--hfc-red); }
.ca-split { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 4px; }
.ca-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ca-table td { vertical-align: top; }
.ca-table tr.editing td { background: rgba(var(--hfc-accent-rgb), 0.08); }
.ca-txt { line-height: 1.45; }
.ca-txt b { font-weight: 700; font-size: 12px; color: var(--hfc-muted); }
.ca-who { display: block; margin-top: 4px; }
.ca-voci { display: flex; flex-direction: column; gap: 8px; }
.ca-voce { display: grid; grid-template-columns: minmax(0, 1fr) 100px 40px; gap: 8px; align-items: center; }
#ca-totals .totals + .totals { padding-top: 12px; border-top: 1px solid var(--hfc-border); }
#ca-totals .ca-strong span, #ca-totals .ca-strong b { color: var(--hfc-white); font-weight: 700; }
@media (max-width: 640px) {
  .ca-add { flex-direction: column; align-items: stretch; }
  .ca-item { grid-template-columns: 60px minmax(0, 1fr) 100px 40px; }
  .ca-item-name { grid-column: 1 / -1; }
  .ca-voce { grid-template-columns: minmax(0, 1fr) 90px 40px; }
}

/* tessera fedeltà */
.tessera-prev { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.tessera-prev svg { width: 100%; height: auto; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,.35); }
.tessere svg { display: block; width: 85.6mm; height: 54mm; margin: 0 0 16px; box-shadow: 0 2px 10px rgba(0,0,0,.35); }
@media (max-width: 1100px) { .tessera-prev { grid-template-columns: minmax(0, 1fr); } }
@media print { .tessere svg { box-shadow: none; margin: 0; page-break-after: always; break-after: page; } .tessere svg:last-child { page-break-after: auto; break-after: auto; } }

/* cassa: cliente con tessera */
.ca-cl-chip { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border: 1px solid var(--hfc-border-strong); border-radius: 12px; background: var(--hfc-surface); }
.ca-cl-form { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--hfc-border-strong); border-radius: 12px; background: var(--hfc-surface); }
.ca-cl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.ca-cl-grid .field { margin: 0; }
.ca-cl-indirizzo { grid-column: 1 / -1; }
.ca-cl-form-act { display: flex; flex-wrap: wrap; gap: 8px; }
#ca-cl-nuovo { margin-left: 8px; }
#ca-cl-nuovo svg, .ca-cl-crea svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.ca-cl-crea { border-top: 1px solid var(--hfc-border); color: rgb(var(--hfc-accent-rgb)); }
@media (max-width: 600px) { .ca-cl-grid { grid-template-columns: minmax(0, 1fr); } }

/* preventivi di Fatture in Cloud: esito segnato a mano */
.fq-esito { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 6px; max-width: 150px; }
.fq-esito .link-btn { color: var(--hfc-muted); font-size: 12px; font-weight: 600; }
.fq-esito .link-btn:hover { color: var(--hfc-text); }

/* tessera Gold (da 1000 punti): l'oro compare solo qui */
.pill.gold { background: linear-gradient(135deg, #8A6A2E, #E5C878 55%, #A8803A); color: #09090B; border-color: transparent; }

/* clienti preferiti */
.star-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: none; margin: -6px 0 -6px -6px; border: 0; border-radius: 50%; background: transparent; color: var(--hfc-text); opacity: .55; cursor: pointer; }
.star-btn:hover, .star-btn.on { opacity: 1; }
.star-label svg { margin-right: 6px; }
.star-label.on { color: #E5C878; border-color: #E5C878; }
.star-btn:hover { color: var(--hfc-text); background: rgba(var(--hfc-ink), 0.06); }
.star-btn.on { color: #E5C878; }

/* cassa: prezzi alternativi di un articolo (web, riservato, offerta…) */
.ca-prezzi { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ca-chip { border: 1px solid var(--hfc-border); background: transparent; color: var(--hfc-text); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.ca-chip:hover { border-color: var(--hfc-red); }
.ca-chip.on { background: var(--hfc-red); border-color: var(--hfc-red); color: #fff; }

/* ---------- calendario eventi */
.ev { display: flex; flex-direction: column; gap: 2px; width: 100%; overflow-wrap: anywhere; text-align: left; padding: 6px 8px; border-radius: var(--hfc-radius-sm); border: 1px solid var(--hfc-border); border-left: 3px solid var(--hfc-border-strong); background: var(--hfc-surface-high); color: inherit; font: inherit; cursor: grab; min-width: 0; }
.ev:hover { border-color: var(--hfc-border-strong); }
.ev:focus-visible { outline: 2px solid var(--hfc-red); outline-offset: 1px; }
.ev-top { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--hfc-muted); min-width: 0; }
.ev-ora { color: var(--hfc-white); font-weight: 700; }
.ev-tipo { text-transform: uppercase; letter-spacing: .06em; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-auto { margin-left: auto; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; border: 1px solid var(--hfc-border-strong); border-radius: 999px; padding: 0 6px; }
.ev-title { font-size: 13px; font-weight: 600; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ev-sub { font-size: 12px; color: var(--hfc-muted); overflow-wrap: anywhere; }
.ev-big .ev-title { -webkit-line-clamp: unset; display: block; font-size: 14px; }
.ev-t-negozio { border-left-color: var(--hfc-brand-red); }
.ev-t-marketing { border-left-color: var(--hfc-white); }
.ev-t-consegna { border-left-color: var(--hfc-success); }
.ev-t-ordine { border-left-color: var(--hfc-warning); }
.ev-t-scadenza { border-left-color: var(--hfc-brand-red); border-left-style: dashed; }
.ev-t-appuntamento { border-left-color: var(--hfc-muted); }
.ev-s-previsto { border-style: dashed; border-left-style: solid; }
.ev-s-fatto { opacity: .55; }
.ev-s-annullato { opacity: .5; }
.ev-s-annullato .ev-title { text-decoration: line-through; }
.ev-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ev-elenco { display: flex; flex-direction: column; gap: 12px; }
.ev-elenco .cal-agenda-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; align-items: start; }
.ev-elenco .cal-agenda-day { font-size: 13px; font-weight: 700; color: var(--hfc-muted); padding-top: 8px; text-transform: capitalize; }
.cal-agenda-row.today .cal-agenda-day { color: var(--hfc-white); }
.cal-agenda-day small { font-weight: 600; text-transform: none; }
.ev-cal .ev { padding: 4px 6px; }
.ev-cal .ev-top { font-size: 10px; }
@media (max-width: 820px) {
  .ev-elenco .cal-agenda-row { grid-template-columns: 64px minmax(0, 1fr); gap: 8px; }
}
.modal.pa-modal { max-width: 760px; }
.pa-h { margin: 8px 0 4px; font-size: 13px; font-weight: 700; color: var(--hfc-muted); text-transform: uppercase; letter-spacing: .08em; }
.pa-list { max-height: 340px; overflow-y: auto; }
.pa-list .mini-row { align-items: flex-start; }
.pa-list .mini-main span { white-space: normal; }
.pa-skip { opacity: .5; }
.pa-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; max-width: 45%; }
.pa-b { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--hfc-border-strong); color: var(--hfc-muted); white-space: nowrap; }
.pa-hr { border: 0; border-top: 1px solid rgba(217,119,6,0.3); margin: 8px 0; }
.pa-modal code { font-size: 12px; }
.ev-blocca { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 1px 7px; border-radius: 999px; background: var(--hfc-brand-red); color: #fff; white-space: nowrap; }
.ev-top .ev-blocca { margin-left: auto; }
.ev-top .ev-blocca + .ev-auto { margin-left: 4px; }
.ev-bloccato { border-color: var(--hfc-brand-red); }
.ev-s-in_attesa { border-style: dotted; border-left-style: solid; }
.ev-sub-blocca { color: var(--hfc-alert-text); font-weight: 600; }
.em-attesa { border: 1px solid var(--hfc-border); border-radius: var(--hfc-radius-sm); padding: 12px 14px 8px; margin: 0; min-width: 0; }
.em-attesa legend { padding: 0 6px; font-size: 13px; font-weight: 600; color: var(--hfc-muted); }
.em-attesa .field { margin-bottom: 8px; }
.pa-red { border-color: var(--hfc-brand-red); color: var(--hfc-alert-text); }
.ev-chi { font-size: 10px; font-weight: 700; padding: 0 7px; border-radius: 999px; border: 1px solid var(--hfc-border-strong); color: var(--hfc-white); max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-top .ev-chi { margin-left: auto; }
.ev-top .ev-chi ~ .ev-blocca, .ev-top .ev-chi ~ .ev-auto { margin-left: 4px; }
.ev-cal .ev-top { flex-wrap: nowrap; overflow: hidden; }
.ev-cal .ev-chi { max-width: 64px; padding: 0 5px; font-size: 9.5px; }
.hv-more-wrap { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--hfc-border); }
/* Home: eventi di oggi e dei prossimi giorni */
.hv { margin-bottom: 24px; }
.hv .card-head { align-items: flex-start; }
.hv-sum { margin: 4px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.cal-sum .light, .hv-sum .light { margin-right: 4px; vertical-align: -1px; }
.hv-late-t { color: var(--hfc-alert-text); }
.hv-block { margin-top: 8px; }
.hv-h { margin: 12px 0 2px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--hfc-muted); }
.hv-h.today { color: var(--hfc-white); }
.hv-h-late { color: var(--hfc-alert-text); }
.hv-block-late { border: 1px solid var(--hfc-brand-red); border-radius: var(--hfc-radius-sm); padding: 0 12px 4px; margin: 8px 0 12px; }
.hv-row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-top: 1px solid var(--hfc-border); min-width: 0; }
.hv-h + .hv-row { border-top: 0; }
.hv-main { flex: 1; min-width: 0; display: flex; flex-direction: column; text-decoration: none; color: var(--hfc-white); }
.hv-main b { font-size: 15px; font-weight: 600; line-height: 1.35; }
.hv-main:hover b { text-decoration: underline; }
.hv-main span { margin-top: 2px; font-size: 13px; color: var(--hfc-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hv-main .hv-blocca-txt { color: var(--hfc-alert-text); font-weight: 600; }
.hv-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; }
.hv-badges .ev-chi, .hv-badges .ev-blocca { margin: 0; }
.hv-late-b { font-size: 11px; font-weight: 700; color: var(--hfc-alert-text); white-space: nowrap; }
.hv-row.done .hv-main b { text-decoration: line-through; color: var(--hfc-muted); }
.hv-row.done { opacity: .6; }
.hv-row.late .hv-main b { color: var(--hfc-white); }
.hv-check { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--hfc-border-strong); background: transparent; color: transparent; display: inline-grid; place-items: center; cursor: pointer; padding: 0; transition: background .12s, border-color .12s, color .12s; }
.hv-check svg { width: 16px; height: 16px; }
.hv-check:hover { border-color: var(--hfc-white); color: var(--hfc-muted); }
.hv-check:focus-visible { outline: 2px solid var(--hfc-red); outline-offset: 2px; }
.hv-check.on { background: var(--hfc-success); border-color: var(--hfc-success); color: #fff; }
.hv-check:disabled { opacity: .5; cursor: default; }
@media (max-width: 820px) {
  .hv-row { flex-wrap: wrap; }
  .hv-badges { flex-basis: 100%; justify-content: flex-start; padding-left: 44px; }
}
/* eventi ripetuti: giorni da spuntare nel modulo */
.em-days { display: flex; flex-wrap: wrap; gap: 6px; max-height: 168px; overflow-y: auto; padding: 2px; }
.em-day { height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--hfc-border-strong); background: transparent; color: var(--hfc-text); font-weight: 600; font-size: 13px; cursor: pointer; text-transform: capitalize; }
.em-day:hover { border-color: var(--hfc-white); }
.em-day[aria-pressed="true"] { background: var(--hfc-success); border-color: var(--hfc-success); color: #fff; }
.em-day[aria-pressed="true"]::before { content: '✓ '; }
.em-day:disabled { opacity: .5; cursor: default; }
/* Home: scheda eventi che si apre e si chiude */
.hv-toggle { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 4px 8px 4px 0; margin: 0 0 0 -2px; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: var(--hfc-radius-sm); }
.hv-toggle:hover .section { text-decoration: underline; }
.hv-toggle:focus-visible { outline: 2px solid var(--hfc-red); outline-offset: 2px; }
.hv-toggle .section { margin: 0; }
.hv-chev { display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none; color: var(--hfc-muted); transition: transform .15s; transform: rotate(90deg); }
.hv-toggle[aria-expanded="false"] .hv-chev { transform: rotate(0deg); }
.hv-chev svg { width: 18px; height: 18px; }
.hv-body[hidden] { display: none; }
.hv-sum { padding-left: 34px; }

/* ---------------------------------------------------------- consegne e ritiri */
.co-grid > div > .card + .card { margin-top: 16px; }
.co-grid > div > .card { margin-bottom: 0; }
.co-doc { margin-bottom: 16px; }
.co-doc-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.co-doc-actions + .co-doc-actions { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hfc-border); }
.pill.co-st.da_fare { background: rgba(217,119,6,0.16); color: var(--hfc-warning); }
.pill.co-st.fatta { background: rgba(22,163,74,0.16); color: var(--hfc-success); }
.pill.co-st.annullata { background: rgba(161,161,170,0.12); color: var(--hfc-muted); }
.co-late { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; }
.co-late::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--hfc-brand-red); }
.co-check { flex-direction: row; align-items: center; gap: 10px; align-self: end; min-height: 48px; }
.co-check input, .co-radio input { width: 20px; height: 20px; accent-color: var(--hfc-red); flex: none; }
.co-art-row { padding: 12px; border: 1px solid var(--hfc-border); border-radius: var(--hfc-radius-sm); display: grid; gap: 10px; }
.co-art-row + .co-art-row { margin-top: 8px; }
.co-art-top { display: grid; grid-template-columns: minmax(0, 1fr) 40px; gap: 8px; align-items: center; }
.co-art-top .input { font-weight: 600; }
.co-art-num { display: grid; grid-template-columns: 72px minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.co-art-num .field { gap: 4px; }
.co-art-num .field > span { font-size: 12px; }
.co-eur { text-align: right; }
.co-pay { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--hfc-border); display: grid; gap: 10px; }
.co-radio { display: flex; align-items: center; gap: 10px; cursor: pointer; min-height: 40px; }
.co-pay .chips { margin-left: 30px; }
.co-pay .chips[hidden] { display: none; }
.co-tot { margin-top: 16px; padding: 12px 16px; border-radius: var(--hfc-radius-sm); background: rgba(var(--hfc-ink), 0.04); }
.co-tot > div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; color: var(--hfc-muted); font-size: 14px; }
.co-tot > div.g { color: var(--hfc-text); font-weight: 700; border-top: 1px solid var(--hfc-border-strong); margin-top: 4px; padding-top: 8px; }
.co-tot > div.big { color: var(--hfc-text); font-weight: 700; align-items: baseline; }
.co-tot > div.big span:last-child { font-size: 26px; font-weight: 900; font-style: italic; }
.co-save { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.co-cl-item { grid-template-columns: minmax(0, 1fr); }
/* cassa: casella «Programma consegna o ritiro» */
.ca-cons { border: 1px dashed var(--hfc-border-strong); border-radius: var(--hfc-radius-sm); padding: 4px 14px; }
.ca-cons.on { border-style: solid; border-color: var(--hfc-red); background: rgba(var(--hfc-accent-rgb), 0.06); box-shadow: 0 6px 22px rgba(var(--hfc-accent-rgb), 0.25); padding-bottom: 12px; }
.ca-cons .help { display: block; line-height: 1.5; }

/* consegne: cosa è pagato in negozio e incasso alla consegna */
.co-radio > span { display: grid; gap: 1px; }
.co-radio small { font-weight: 400; }
#co-metodi-box { display: grid; gap: 6px; margin-left: 30px; }
#co-metodi-box[hidden] { display: none; }
#co-metodi-box .chips { margin-left: 0; }
.co-inc { border-color: var(--hfc-red); box-shadow: 0 6px 22px rgba(var(--hfc-accent-rgb), 0.25); }
.co-inc p { margin: 0 0 12px; }
.co-inc-row { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-start; margin-bottom: 14px; }
.co-inc-row .field { margin: 0; }
.co-inc.done { border-color: var(--hfc-glass-border); box-shadow: var(--hfc-glass-shadow); }
.co-ok { color: var(--hfc-success); font-weight: 700; }
.co-inc-btn { margin-top: 6px; }
.co-inc-btn svg { width: 16px; height: 16px; }
.co-inc-tr td { background: rgba(var(--hfc-accent-rgb), 0.05); }
.co-inc-panel { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; padding: 4px 0; }
.co-inc-panel .co-inc-row { margin: 0; }

/* avviso «questo cliente c'è già» */
.simili { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--hfc-border-strong); border-radius: 12px; background: rgba(var(--hfc-ink), 0.03); margin-top: 4px; }
.simili.forte { border-color: var(--hfc-warning); background: rgba(217, 119, 6, 0.08); }
.simili[hidden] { display: none; }
.simili-tit { font-size: 14px; }
.simili.forte .simili-tit::before { content: "⚠ "; color: var(--hfc-warning); }
.simili-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 8px; border-top: 1px solid var(--hfc-border); }
.simili-row .btn { flex: none; }
.simili-mot { color: var(--hfc-muted); }
.simili-mot.on { color: var(--hfc-warning); font-weight: 700; }
@media (max-width: 600px) { .simili-row { flex-direction: column; align-items: stretch; } }

/* cassa: vendita web presa da un ordine del sito */
.ca-ord-lista { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--hfc-border-strong); border-radius: 12px; background: var(--hfc-surface-solid); max-height: 420px; overflow: auto; }
.ca-ord-item { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border: 1px solid var(--hfc-border); border-radius: 10px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.ca-ord-item:hover, .ca-ord-item:focus-visible { border-color: rgba(var(--hfc-accent-rgb), 0.7); background: rgba(var(--hfc-accent-rgb), 0.05); }
.ca-ord-item.gia { opacity: .7; }
.ca-ord-top { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.ca-ord-tot { margin-left: auto; }
.ca-ord-gia { color: var(--hfc-warning); font-weight: 600; }
.ca-ord-altri summary { cursor: pointer; color: var(--hfc-muted); font-size: 13px; padding: 4px 2px; }
.ca-ord-altri[open] { display: grid; gap: 6px; }
.ca-ord-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 2px 2px 0; }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card, .kpi, .modal, .login-card, .tag-card, .mt-pop, .picker-results, .sv-tip {
    background: var(--hfc-surface);
  }
  .sidebar, .mobile-top {
    background: #0C0C0F;
  }
}

/* ------------------------------------------------------------ utenti, permessi e account */
.sidebar-foot a.who { color: inherit; text-decoration: none; border-radius: var(--hfc-radius-sm); }
.sidebar-foot a.who:hover b { text-decoration: underline; text-underline-offset: 3px; }
.u-sub { display: block; margin-top: 2px; font-size: 12px; color: var(--hfc-muted); }
.users-table td { vertical-align: middle; }
.perm-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.perm-box { border: 1px solid var(--hfc-border); border-radius: var(--hfc-radius-sm); padding: 12px 16px 14px; margin: 0; min-width: 0; }
.perm-box legend, .or-also legend { padding: 0 6px; font-size: 13px; font-weight: 600; color: var(--hfc-muted); }
.perm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; margin-bottom: 8px; }
.perm-check { display: flex; align-items: center; gap: 10px; min-height: 36px; font-size: 14px; cursor: pointer; }
.perm-check input, .or-also-day input { width: 18px; height: 18px; accent-color: var(--hfc-red); flex: none; }

/* ------------------------------------------------------------ orari di lavoro */
.or-week { min-width: 240px; }
.or-card { padding: 0; overflow: hidden; }
.or-grid { display: grid; min-width: 0; }
.or-row { display: grid; grid-template-columns: minmax(120px, 1.1fr) repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--hfc-border); }
.or-row.or-head { border-top: 0; }
.or-row.mia { background: rgba(var(--hfc-ink), 0.025); }
.or-hd { padding: 12px 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--hfc-muted); text-align: center; }
.or-hd.oggi { color: var(--hfc-text); box-shadow: inset 0 3px 0 var(--hfc-red); }
.or-name { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 12px 16px; min-width: 0; }
.or-head .or-name { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--hfc-muted); }
.or-name b { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.or-name-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.or-name .pill { height: 20px; padding: 0 8px; font-size: 10px; flex: none; }
.or-name small { font-size: 12px; color: var(--hfc-muted); font-variant-numeric: tabular-nums; }
.or-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 64px; padding: 8px 4px; border: 0; border-left: 1px solid var(--hfc-border); background: transparent; color: var(--hfc-text); font: inherit; text-align: center; min-width: 0; }
button.or-cell { cursor: pointer; transition: background .15s; }
button.or-cell:hover, button.or-cell:focus-visible { background: rgba(var(--hfc-ink), 0.06); }
.or-cell.oggi { background: rgba(var(--hfc-accent-rgb), 0.05); }
.or-fascia { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.or-none { color: var(--hfc-muted); font-size: 13px; display: inline-flex; }
.or-none svg { width: 16px; height: 16px; opacity: 0; transition: opacity .15s; }
button.or-cell:hover .or-none svg, button.or-cell:focus-visible .or-none svg { opacity: 1; }
.or-note { display: block; max-width: 100%; font-size: 11px; color: var(--hfc-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.or-tipo { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: var(--hfc-pill); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; background: rgba(var(--hfc-ink), 0.08); color: var(--hfc-text-sec); }
.or-tipo.ferie { background: rgba(16, 185, 129, 0.16); color: var(--hfc-success); }
.or-tipo.permesso { background: rgba(245, 158, 11, 0.16); color: var(--hfc-warning); }
.or-tipo.malattia { background: rgba(220, 38, 38, 0.14); color: var(--hfc-alert-text); }
[data-theme="light"] .or-tipo.ferie { color: #047857; }
[data-theme="light"] .or-tipo.permesso { color: #B45309; }
[data-theme="light"] .or-tipo.malattia { color: #B91C1C; }

/* i miei orari: una riga per giorno */
.or-mine { padding: 8px 20px; max-width: 720px; }
.or-mine-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--hfc-border); }
.or-mine-row:first-child { border-top: 0; }
.or-mine-row.oggi { box-shadow: inset 3px 0 0 var(--hfc-red); padding-left: 12px; margin-left: -12px; }
.or-mine-day { display: flex; flex-direction: column; gap: 2px; }
.or-mine-day b { font-size: 15px; font-weight: 600; }
.or-mine-day span { font-size: 13px; color: var(--hfc-muted); }
.or-mine-val { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; min-width: 0; }
.or-mine-val b { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.or-mine-val small { font-size: 12px; color: var(--hfc-muted); }

/* giorno per giorno: al posto della griglia sul telefono */
.or-days { display: none; }
.or-day { padding: 14px 16px; }
.or-day.oggi { box-shadow: var(--hfc-glass-shadow), inset 0 3px 0 var(--hfc-red); }
.or-day-title { margin: 0 0 6px; font-size: 15px; font-weight: 700; }
.or-day-title span { font-weight: 500; color: var(--hfc-muted); }
.or-day-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 10px 0; border: 0; border-top: 1px solid var(--hfc-border); background: transparent; color: var(--hfc-text); font: inherit; text-align: left; min-height: 48px; }
button.or-day-row { cursor: pointer; }
.or-day-name { font-size: 14px; font-weight: 600; }
.or-day-name .pill { height: 20px; padding: 0 8px; font-size: 10px; }
.or-day-val { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 14px; text-align: right; font-variant-numeric: tabular-nums; min-width: 0; }

/* finestra del giorno e delle persone */
.modal.or-modal { max-width: 560px; }
.or-seg { flex-wrap: wrap; margin-right: 0; border-radius: var(--hfc-radius); }
.or-fasce { display: flex; flex-direction: column; gap: 10px; }
.or-fasce[hidden] { display: none; }
.or-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.or-quick .chip { height: 36px; padding: 0 12px; }
.or-fascia-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; }
.or-fascia-row > span:first-child { font-size: 13px; font-weight: 600; color: var(--hfc-muted); }
.or-fascia-row input { width: 100%; font-variant-numeric: tabular-nums; }
.or-also { border: 1px solid var(--hfc-border); border-radius: var(--hfc-radius-sm); padding: 10px 12px 12px; margin: 0; min-width: 0; }
.or-also-day { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: var(--hfc-pill); border: 1px solid var(--hfc-border-strong); font-size: 13px; font-weight: 600; cursor: pointer; text-transform: capitalize; }
.or-also-day:has(input:checked) { border-color: var(--hfc-red); }
.or-people { display: flex; flex-direction: column; gap: 8px; }
.or-person { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.or-person-new { padding-top: 12px; border-top: 1px solid var(--hfc-border); }
.or-person-act { display: inline-flex; gap: 2px; }
.or-person-act .btn-icon { width: 36px; height: 36px; }
.or-person-act svg { width: 16px; height: 16px; }
.or-down { display: inline-flex; transform: rotate(90deg); }
.or-up { display: inline-flex; transform: rotate(-90deg); }

/* Home: i miei orari dei prossimi giorni */
.ho-card { margin-bottom: 24px; }
.ho-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.ho-day { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: var(--hfc-radius-sm); border: 1px solid var(--hfc-border); color: var(--hfc-text); text-decoration: none; min-width: 0; }
.ho-day:hover { border-color: var(--hfc-border-strong); }
.ho-day.oggi { border-color: rgba(var(--hfc-accent-rgb), 0.6); box-shadow: inset 0 3px 0 var(--hfc-red); }
.ho-dow { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--hfc-muted); }
.ho-day b { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.35; }
.ho-day.vuoto b { color: var(--hfc-muted); font-weight: 500; }
.ho-day.riposo b, .ho-day.ferie b, .ho-day.permesso b, .ho-day.malattia b { color: var(--hfc-text-sec); }
.ho-day.ferie { border-color: rgba(16, 185, 129, 0.35); }
.ho-note { font-size: 11px; color: var(--hfc-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 1100px) {
  .ho-days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .or-card { display: none; }
  .or-days { display: flex; flex-direction: column; gap: 12px; }
  .or-days .card + .card { margin-top: 0; }
  .or-nav { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 8px; width: 100%; }
  .or-nav .or-week { min-width: 0; font-size: 17px; text-align: center; }
  .or-nav #or-today { grid-column: 1 / -1; justify-self: center; }
  .or-mine { padding: 4px 16px; }
  .ho-days { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .ho-day { flex-direction: row; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; padding: 10px 2px; border: 0; border-top: 1px solid var(--hfc-border); border-radius: 0; }
  .ho-day:first-child { border-top: 0; }
  .ho-day.oggi { border-color: var(--hfc-border); box-shadow: inset 3px 0 0 var(--hfc-red); padding-left: 10px; }
  .ho-day b { font-size: 14px; text-align: right; }
  .ho-note { flex-basis: 100%; text-align: right; }
  .perm-2, .perm-grid { grid-template-columns: minmax(0, 1fr); }
  .or-fascia-row { grid-template-columns: 1fr 1fr; }
  .or-fascia-row > span:first-child { grid-column: 1 / -1; }
  .or-fascia-row > span[aria-hidden] { display: none; }
  .or-person { grid-template-columns: minmax(0, 1fr) auto; }
  .or-person select { grid-column: 1 / -1; grid-row: 2; }
  .or-person-new .btn { grid-column: 1 / -1; }
}
