/* Presenze Ufficio — Dr System Code */
:root {
  --bg: #f1f5f9; --card: #ffffff; --ink: #0f172a; --muted: #64748b; --line: #e2e8f0; --soft: #f8fafc;
  --brand: #1e3a8a; --brand2: #2563eb; --ok: #16a34a; --err: #dc2626; --warn: #f59e0b;
  --radius: 16px; --shadow: 0 1px 2px rgba(15,23,42,.06), 0 4px 16px rgba(15,23,42,.06);
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
/* Tema scuro: la classe "dark" su <html> la mette l'app (automatico, chiaro o scuro a scelta dell'operatore) */
html.dark {
  --bg: #0b1220; --card: #131c2e; --ink: #e6edf7; --muted: #94a3b8; --line: #23304a; --soft: #0f1829;
  --brand: #3b82f6; --brand2: #60a5fa; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  color-scheme: dark;
}
html:not(.dark) { color-scheme: light; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* il carattere grande impostato sul telefono non deve ingrandire l'app (scrivanie e nomi si accavallerebbero) */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
body.noscroll { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .92em; background: var(--soft); padding: 1px 5px; border-radius: 6px; border: 1px solid var(--line); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.foot { text-align: center; color: var(--muted); font-size: 12px; margin: 16px 0 0; }
.hint { color: var(--muted); font-size: 13px; text-align: center; margin: 14px 0; }
.empty { color: var(--muted); font-size: 14px; margin: 6px 0; }
h1, h2, h3 { margin: 0 0 6px; letter-spacing: -.01em; }
h2 { font-size: 19px; } h3 { font-size: 16px; }

/* ---- Bottoni ---- */
.btn { border: 0; border-radius: 12px; padding: 11px 16px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; transition: transform .08s, filter .15s; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.primary { background: var(--brand2); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: var(--soft); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--brand2); }
.btn.danger { background: #fee2e2; color: #b91c1c; }
html.dark .btn.danger { background: #3b1219; color: #fca5a5; }
.btn.block { width: 100%; margin-top: 10px; }
.btn.sm { padding: 6px 11px; min-height: 34px; font-size: 13px; border-radius: 10px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-size: 20px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.icon-btn.sm { width: 32px; height: 32px; font-size: 12px; }
.icon-btn:disabled { opacity: .35; }
.link { background: none; border: 0; color: var(--brand2); font-weight: 600; cursor: pointer; padding: 0; font-size: 13px; }
.spin { width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: sp .7s linear infinite; }
.spin.big { width: 38px; height: 38px; color: var(--brand2); }
@keyframes sp { to { transform: rotate(360deg); } }
.loading { min-height: 50vh; display: grid; place-items: center; }

/* ---- Form ---- */
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 12px 0 0; }
input, select, textarea { width: 100%; margin-top: 5px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); min-height: 44px; outline: none; font-weight: 500; }
input:focus, select:focus { border-color: var(--brand2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand2) 20%, transparent); }
label.check { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 500; font-size: 14px; }
label.check input { width: 20px; height: 20px; min-height: 0; margin: 0; accent-color: var(--brand2); }
.pwd { display: flex; gap: 6px; align-items: center; }
.pwd input { flex: 1; }
.eye { margin-top: 5px; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--soft); cursor: pointer; flex: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.alert { border-radius: 12px; padding: 10px 12px; margin: 12px 0; font-size: 14px; }
.alert.err { background: #fee2e2; color: #991b1b; }
.alert.info { background: color-mix(in srgb, var(--brand2) 12%, var(--card)); color: var(--ink); line-height: 1.7; }
.alert.warn { background: color-mix(in srgb, var(--warn) 18%, var(--card)); font-weight: 600; text-align: center; }

/* ---- Login ---- */
.auth-wrap { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 20px 16px; background: radial-gradient(1200px 500px at 50% -10%, color-mix(in srgb, var(--brand2) 30%, transparent), transparent), var(--bg); }
.auth-card { width: 100%; max-width: 400px; background: var(--card); border-radius: 24px; padding: 28px 22px; box-shadow: var(--shadow); text-align: center; }
.auth-card form { text-align: left; }
.auth-logo { width: 76px; height: 76px; border-radius: 20px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 24px; margin-top: 10px; }

/* ---- Topbar ---- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: calc(10px + var(--safe-t)) 16px 10px; background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.brand b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand small { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11.5px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(22,163,74,.6); animation: pulse 2s infinite; }
.dot.off { background: var(--warn); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,.5); } 70% { box-shadow: 0 0 0 7px rgba(22,163,74,0); } 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); } }
.topnav { display: none; gap: 4px; }
.topnav button { border: 0; background: none; padding: 9px 14px; border-radius: 10px; font-weight: 600; color: var(--muted); cursor: pointer; }
.topnav button:hover { background: var(--soft); color: var(--ink); }
.topnav button.active { background: color-mix(in srgb, var(--brand2) 14%, transparent); color: var(--brand2); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.user-chip { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 3px 12px 3px 3px; cursor: pointer; font-weight: 600; }
.user-chip .un { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av { width: 36px; height: 36px; border-radius: 50%; color: #fff; display: inline-grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.av.lg { width: 52px; height: 52px; font-size: 18px; }
.av.sm { width: 24px; height: 24px; font-size: 10px; margin-right: 8px; vertical-align: middle; }
.demo-bar { background: #fef3c7; color: #92400e; text-align: center; font-size: 12px; font-weight: 700; padding: 5px; }

/* ---- Bottom nav (mobile) ---- */
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + var(--safe-b)); }
.bottomnav button { flex: 1; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 0; border-radius: 12px; cursor: pointer; color: var(--muted); }
.bottomnav button span { font-size: 21px; line-height: 1.1; filter: grayscale(.6); opacity: .8; }
.bottomnav button small { font-size: 11px; font-weight: 600; }
.bottomnav button.active { color: var(--brand2); }
.bottomnav button.active span { filter: none; opacity: 1; transform: translateY(-1px); }

/* ---- Vista ---- */
.view { max-width: 1100px; margin: 0 auto; padding: 14px 16px calc(96px + var(--safe-b)); }
.panel { background: var(--card); border-radius: var(--radius); padding: 18px 16px; box-shadow: var(--shadow); margin-bottom: 14px; }
.daynav { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.daytitle { flex: 1; text-align: center; position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.daytitle b { font-size: 16.5px; text-transform: capitalize; }
.daytitle input[type=date] { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; min-height: 0; height: 100%; }
.daytitle .link, .daytitle .tag { position: relative; z-index: 2; }
.tag { background: color-mix(in srgb, var(--brand2) 14%, transparent); color: var(--brand2); font-size: 11.5px; font-weight: 700; padding: 1px 9px; border-radius: 999px; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--card); border-radius: var(--radius); padding: 12px 8px; text-align: center; box-shadow: var(--shadow); border-top: 4px solid var(--g); }
.stat b { display: block; font-size: 30px; line-height: 1.1; color: var(--g); font-weight: 800; }
.stat span { font-size: 12.5px; color: var(--muted); font-weight: 600; }

/* il mio stato */
.mine { background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff; border-radius: var(--radius); padding: 14px; margin-bottom: 14px; box-shadow: var(--shadow); }
.mine-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 8px; }
.mine .muted { color: rgba(255,255,255,.85); font-size: 13px; font-weight: 600; }
.quick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.qbtn { border: 0; border-radius: 12px; background: rgba(255,255,255,.14); color: #fff; padding: 8px 2px; font-size: 11.5px; font-weight: 700; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; min-height: 58px; }
.qbtn span { font-size: 20px; }
.qbtn.on { background: #fff; color: var(--g); box-shadow: 0 2px 8px rgba(0,0,0,.2); }

/* gruppi */
.groups { display: grid; gap: 12px; }
.group { background: var(--card); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); border-left: 5px solid var(--g); }
.group h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 2px 4px 8px; }
.group .gi { font-size: 18px; }
.group .count { margin-left: auto; background: var(--g); color: #fff; border-radius: 999px; min-width: 26px; padding: 0 8px; height: 24px; display: inline-grid; place-items: center; font-size: 13px; }
.person { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 6px; border: 0; background: none; text-align: left; border-radius: 12px; cursor: pointer; }
.person:hover:not(:disabled) { background: var(--soft); }
.person:disabled { cursor: default; opacity: 1; }
.pinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pinfo b { font-size: 15px; }
.pinfo small { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.chip { background: color-mix(in srgb, var(--g) 14%, transparent); color: var(--g); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
html.dark .chip { background: color-mix(in srgb, var(--g) 24%, transparent); filter: brightness(1.25); }
.chip.nd { --g: #94a3b8; }

/* sheet modale */
#modal { position: fixed; inset: 0; z-index: 50; display: none; }
#modal.open { display: block; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(2,6,23,.5); animation: fade .2s; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow: auto; background: var(--card); border-radius: 22px 22px 0 0; padding: 18px 16px calc(18px + var(--safe-b)); animation: up .22s ease-out; }
.sheet::before { content: ''; display: block; width: 42px; height: 5px; border-radius: 9px; background: var(--line); margin: -6px auto 12px; }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
@keyframes fade { from { opacity: 0; } }
.sheet-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.sheet-actions .btn { flex: 1; min-width: 100px; }
.user-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.user-head .muted { font-size: 13px; text-transform: none; }
.menu-list { display: grid; gap: 4px; }
.help { padding-left: 20px; line-height: 1.6; }
.help li { margin-bottom: 6px; }
.stati-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.sbtn { border: 2px solid var(--line); background: var(--soft); border-radius: 14px; padding: 10px 4px; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 700; cursor: pointer; color: var(--ink); margin: 0; text-align: center; }
.sbtn span { font-size: 22px; }
.sbtn.on, .sbtn.radio:has(input:checked) { border-color: var(--g); background: color-mix(in srgb, var(--g) 14%, var(--card)); color: var(--g); }
.sbtn.radio input { position: absolute; opacity: 0; width: 0; height: 0; min-height: 0; }
.preview { font-size: 13px; margin-top: 10px; }

/* calendario */
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i, .cal i { font-style: normal; color: #fff; font-weight: 800; font-size: 10.5px; border-radius: 6px; min-width: 22px; height: 22px; display: inline-grid; place-items: center; padding: 0 3px; }
.cal-wrap { overflow-x: auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); -webkit-overflow-scrolling: touch; }
.cal { border-collapse: separate; border-spacing: 0; font-size: 12px; }
.cal th, .cal td { border-bottom: 1px solid var(--line); text-align: center; padding: 5px 2px; min-width: 32px; }
.cal thead th { font-weight: 700; color: var(--muted); }
.cal thead th small { display: block; font-size: 10px; font-weight: 600; }
.cal .sticky { position: sticky; left: 0; background: var(--card); z-index: 2; text-align: left; padding: 6px 10px; white-space: nowrap; min-width: 130px; font-weight: 700; color: var(--ink); border-right: 1px solid var(--line); }
.cal .off { background: var(--soft); }
.cal th.today { color: #fff; background: var(--brand2); border-radius: 8px 8px 0 0; }
.cal td.today { background: color-mix(in srgb, var(--brand2) 9%, transparent); }
.cal td { cursor: pointer; }
.cal i.pres { opacity: .3; }

/* report */
.rep-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.rep-actions { display: flex; gap: 6px; }
.mnav { display: flex; gap: 6px; align-items: center; }
.mnav input { margin-top: 5px; }
.mnav .icon-btn { margin-top: 5px; height: 44px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }
.kpi { background: var(--soft); border: 1px solid var(--line); border-radius: 14px; padding: 12px; border-top: 4px solid var(--g, var(--brand2)); }
.kpi span { display: block; font-size: 12px; color: var(--muted); font-weight: 700; }
.kpi b { font-size: 28px; color: var(--g, var(--brand2)); font-weight: 800; }
.kpi small { display: block; font-size: 11px; color: var(--muted); }
.bars { display: grid; gap: 8px; }
.bar { display: grid; grid-template-columns: 130px 1fr 30px; align-items: center; gap: 10px; font-size: 13.5px; }
.bt { height: 12px; background: var(--soft); border-radius: 9px; overflow: hidden; border: 1px solid var(--line); }
.bt i { display: block; height: 100%; border-radius: 9px; }
.bar b { text-align: right; }
.sub { margin-top: 18px; }
.daylist { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; }
.dl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 7px 10px; border: 1px solid var(--line); border-radius: 12px; }
.dl.off { background: var(--soft); }
.dl .dd { font-weight: 700; width: 46px; }
.dl small { width: 100%; font-size: 12px; color: var(--muted); padding-left: 54px; }
.table-wrap { overflow-x: auto; margin-top: 14px; }
.rep { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.rep th, .rep td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.rep tbody th { text-align: left; }
.rep tbody tr { cursor: pointer; }
.rep tbody tr:hover { background: var(--soft); }
.rep .colh { color: var(--g); font-size: 12px; }
.print-only { display: none; }

/* admin */
.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; padding-bottom: 2px; scrollbar-width: none; }
.tabs button { flex: none; border: 1px solid var(--line); background: var(--card); padding: 9px 14px; border-radius: 999px; font-weight: 700; font-size: 13.5px; cursor: pointer; color: var(--muted); }
.tabs button.on { background: var(--brand2); color: #fff; border-color: var(--brand2); }
.clist { display: grid; gap: 8px; margin-top: 12px; }
.crow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.crow input { flex: 1; min-width: 130px; margin: 0; }
.crow > span:not(.av) { flex: 1; }
.crow.inactive { opacity: .55; }
.cbtns { display: flex; gap: 6px; align-items: center; }
.addrow { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.addrow input { flex: 1; min-width: 140px; margin: 0; }
.grid-form { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
.grid-form .btn { margin-top: 16px; }
.acc-list { display: grid; gap: 10px; margin-top: 12px; }
.acc { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; padding: 12px; border: 1px solid var(--line); border-radius: 14px; }
.acc.inactive { opacity: .6; }
.acc-i { flex: 1; min-width: 200px; }
.acc-i .muted { font-size: 13px; margin-top: 3px; }
.acc-b { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; width: 100%; }
.role { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); }
.r-admin { background: #ede9fe; color: #6d28d9; border-color: #ddd6fe; }
.r-capo { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.r-operatore { background: #dbeafe; color: #1d4ed8; border-color: #bfdbfe; }
.r-off { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.log { margin-top: 12px; display: grid; }
.li { display: flex; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.li small { display: block; margin-top: 2px; }
.lt { font-size: 18px; width: 26px; flex: none; text-align: center; }

/* toast */
#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(86px + var(--safe-b)); z-index: 60; display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: #0f172a; color: #fff; padding: 12px 16px; border-radius: 14px; font-weight: 600; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.25); animation: up .2s; transition: opacity .4s, transform .4s; }
.toast.err { background: #b91c1c; } .toast.info { background: var(--brand2); }
.toast.out { opacity: 0; transform: translateY(10px); }
.center-box { max-width: 420px; margin: 20vh auto; text-align: center; padding: 20px; }

/* ---- Telefono stretto ---- */
@media (max-width: 380px) {
  .quick { grid-template-columns: repeat(3, 1fr); }
  .stati-grid { grid-template-columns: repeat(2, 1fr); }
  .user-chip .un { display: none; }
  .user-chip { padding: 3px; }
  .bar { grid-template-columns: 105px 1fr 26px; }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .kpi { padding: 10px 8px; } .kpi b { font-size: 24px; } .kpi small { display: none; }
  .user-chip .un { max-width: 70px; }
}

/* ---- PC / tablet ---- */
@media (min-width: 900px) {
  .topnav { display: flex; }
  .bottomnav { display: none; }
  .view { padding: 22px 24px 40px; }
  #toasts { bottom: 24px; }
  .groups { grid-template-columns: repeat(3, 1fr); align-items: start; }
  .stats { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .stat b { font-size: 36px; }
  .quick { grid-template-columns: repeat(5, 1fr); max-width: 640px; }
  .mine { display: flex; align-items: center; gap: 20px; }
  .mine-head { flex-direction: column; align-items: flex-start; margin: 0; min-width: 170px; }
  .quick { flex: 1; }
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; transform: translate(-50%, -50%); width: 520px; border-radius: 22px; animation: fade .2s; }
  .sheet::before { display: none; }
  .grid-form { grid-template-columns: 1fr 1fr 1fr; align-items: end; }
  .acc-b { width: auto; }
  .panel { padding: 22px; }
  .daytitle b { font-size: 19px; }
}

/* ---- Stampa (report) ---- */
@media print {
  .topbar, .bottomnav, .demo-bar, .no-print, #toasts, .hint { display: none !important; }
  .print-only { display: block; }
  body, .view, .panel { background: #fff !important; color: #000; box-shadow: none; padding: 0; }
  .view { max-width: none; }
  .chip, .bt i, .kpi { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---- v1.1: voci Excel, da confermare, import ---- */
.q { color: #b45309; font-weight: 800; font-size: .9em; }
.cal i.qc { outline: 2px dashed #b45309; outline-offset: 1px; }
.cogn { color: var(--muted); font-weight: 500; font-size: .88em; }
.stats.s4 { grid-template-columns: repeat(4, 1fr); }
.stats.s4 .stat b { font-size: 26px; }
.stats.s4 .stat span { font-size: 11.5px; }
.kpis.k4 { grid-template-columns: repeat(4, 1fr); }
.rep .tot { background: var(--soft); }
.filebox { display: block; margin-top: 12px; border: 2px dashed var(--line); border-radius: 14px; padding: 18px; text-align: center; cursor: pointer; color: var(--ink); font-size: 15px; }
.filebox:hover { border-color: var(--brand2); }
.filebox input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.map { display: grid; gap: 8px; margin-top: 8px; }
.maprow { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; }
.maprow select { grid-column: 1 / -1; margin-top: 4px; }
.crow input[data-cogn] { color: var(--muted); }
@media (min-width: 700px) { .maprow { grid-template-columns: 160px 80px 1fr; } .maprow select { grid-column: auto; margin: 0; } }
@media (max-width: 560px) {
  .kpis.k4 { grid-template-columns: 1fr 1fr; }
  .stats.s4 { gap: 6px; }
  .stats.s4 .stat { padding: 10px 4px; }
}

/* Dentro l'Area riservata drsystemcode.it */
html.embed .topbar { padding-top: 10px; }
html.embed .auth-wrap { min-height: 100%; padding-top: 30px; }

/* ---- Colori e tema personali ---- */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; margin-top: 8px; }
.sw { width: 100%; aspect-ratio: 1; border-radius: 12px; border: 3px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); padding: 0; }
.sw.on { border-color: var(--ink); }
.sw.custom { display: grid; place-items: center; background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); position: relative; overflow: hidden; }
.sw.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; margin: 0; min-height: 0; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 6px; }
.seg button { border: 2px solid var(--line); background: var(--soft); border-radius: 12px; padding: 10px 4px; font-weight: 700; cursor: pointer; color: var(--ink); }
.seg button.on { border-color: var(--brand2); color: var(--brand2); background: color-mix(in srgb, var(--brand2) 10%, var(--card)); }
.stcol { display: grid; gap: 8px; margin-top: 8px; }
.stcol label { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--ink); font-weight: 600; font-size: 14px; }
.stcol input[type=color] { width: 44px; height: 34px; padding: 2px; margin: 0; min-height: 0; border-radius: 8px; flex: none; }
.stcol span { flex: 1; }
.sheet h4 { margin: 18px 0 2px; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
html.dark .sw { box-shadow: inset 0 0 0 1px rgba(255,255,255,.28); }

/* ---- Congedi da confermare ---- */
.pend { background: var(--card); border: 2px solid #f59e0b; border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; box-shadow: var(--shadow); }
.pend-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pend p { margin: 4px 0 8px; font-size: 13px; }
.pend-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line); }
.pend-row .pd { font-weight: 700; min-width: 92px; }
.pend-row .pb { margin-left: auto; display: flex; gap: 6px; }
.conf-lock { margin-top: 12px; font-size: 13.5px; background: color-mix(in srgb, #f59e0b 14%, var(--card)); border-radius: 12px; padding: 10px 12px; color: var(--ink); }
.stats.s5 .stat b { font-size: 22px; }
.stats.s5 .stat span { font-size: 10.5px; line-height: 1.2; display: block; }
@media (max-width: 560px) { .stats.s5 { gap: 4px; } .stats.s5 .stat { padding: 8px 2px; } }

/* ---- Tasto Oggi, Cerca collega ---- */
.toolrow { display: flex; gap: 8px; justify-content: center; margin: -4px 0 12px; flex-wrap: wrap; }
.toolrow .btn { min-width: 120px; }
.qmain { border-left: 5px solid var(--g); background: var(--soft); border-radius: 14px; padding: 12px; margin-top: 12px; display: grid; gap: 6px; }
.qhead { display: flex; gap: 10px; align-items: center; }
.qstato { font-size: 18px; font-weight: 800; color: var(--g); }
.qweek { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.qday { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 6px 2px; display: grid; justify-items: center; gap: 2px; cursor: pointer; color: var(--ink); }
.qday small { font-size: 10px; color: var(--muted); } .qday b { font-size: 14px; }
.qday.on { border: 2px solid var(--brand2); } .qday.off { background: var(--soft); }
.qday i { font-style: normal; color: #fff; font-weight: 800; font-size: 9.5px; border-radius: 6px; min-width: 22px; height: 18px; display: inline-grid; place-items: center; padding: 0 2px; }
.qday i.pres { opacity: .35; } .qday i.vuoto { color: var(--muted); background: none; }
@media (max-width: 420px) { .toolrow .btn { min-width: 0; flex: 1; padding: 6px 6px; font-size: 12.5px; } }

/* ---- Etichette ---- */
.vnew { display: grid; grid-template-columns: 70px 1fr; gap: 0 10px; align-items: end; }
.vnew .vt { grid-column: 1 / -1; }
.vnew input[type=color] { height: 44px; padding: 3px; }
.vnew .btn { grid-column: 1 / -1; margin-top: 14px; }
.vlist { display: grid; gap: 8px; margin-top: 10px; }
.vrow { display: grid; grid-template-columns: 52px 1fr 48px auto; gap: 8px; align-items: center; }
.vrow input { margin: 0; }
.vrow .vic { text-align: center; font-size: 18px; padding: 8px 4px; }
.vrow input[type=color] { height: 44px; padding: 3px; }
.vrow .vtipo { grid-column: 2 / -1; margin-top: -4px; font-size: 11.5px; }
.vrow.inactive { opacity: .55; }
@media (min-width: 900px) {
  .vnew { grid-template-columns: 80px 1fr 80px 1.2fr auto; }
  .vnew .vt { grid-column: auto; } .vnew .btn { grid-column: auto; margin-top: 0; }
  .vrow { grid-template-columns: 60px 1fr 60px 260px auto; } .vrow .vtipo { grid-column: auto; margin: 0; }
}
.vrow > .btn { grid-row: 1; grid-column: 4; }

/* ---- Zona / localita' ---- */
.pinfo small.zona, .zrow .zona { color: var(--brand2); font-weight: 700; }
.qzona { font-size: 17px; font-weight: 800; color: var(--ink); }
.seg.seg2 { grid-template-columns: 1fr 1fr; margin-bottom: 4px; }
.zlist { display: grid; gap: 6px; margin-top: 6px; }
.zrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 8px 10px; cursor: pointer; text-align: left; color: var(--ink); }
.zrow .pd { font-weight: 700; min-width: 92px; } .zrow .av.sm { margin: 0; }
.zrow .zona { width: 100%; padding-left: 100px; }
@media (max-width: 480px) { .zrow .zona { padding-left: 0; } }
textarea { width: 100%; margin-top: 5px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; }
.cal th.fest small { font-size: 11px; }
.festlist { margin-top: 12px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; display: grid; gap: 4px; font-size: 14px; border-left: 5px solid #f59e0b; }
.congedo-top { margin-bottom: 14px; } .congedo-top .group { box-shadow: var(--shadow); }
@media (min-width: 900px) { .congedo-top .group { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 16px; } .congedo-top .group h3 { grid-column: 1 / -1; } }
.r-referente { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
/* Festivita' in rosso nel calendario */
.cal th.fest { color: #fff; background: #dc2626; }
.cal td.fest { background: #fee2e2; }
html.dark .cal th.fest { color: #fca5a5; background: #3b1219; }
html.dark .cal td.fest { background: #2a0f15; }
.festlist { border-left-color: #dc2626; }
.festlist b { color: #dc2626; }
.qday.fest { border-color: #fca5a5; background: #fef2f2; color: #dc2626; }
.kpis.k5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 560px) { .kpis.k5 { grid-template-columns: 1fr 1fr; } .kpis.k5 .kpi:last-child { grid-column: 1 / -1; } .kpis.k5 .kpi small { display: block; } }
/* Orario d'ufficio */
.orario { text-align: center; font-size: 13px; color: var(--muted); margin: -4px 0 10px; }
.orario.aperto b { color: #16a34a; } .orario.chiuso b { color: #dc2626; }
.orario .link { margin-left: 6px; }
.chip small { font-weight: 600; opacity: .8; margin-left: 2px; }
/* v1.5.2 — stato lungo (es. ½ congedo pomeriggio) su due righe, non copre più il nome */
.person .pinfo { flex: 1 1 0; min-width: 56px; }
.person .pinfo b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .chip { flex: 0 0 auto; min-width: 0; max-width: 70%; white-space: normal; text-align: right; line-height: 1.3; border-radius: 12px; }
.person .chip.two { display: flex; flex-direction: column; align-items: flex-end; white-space: normal; line-height: 1.25; border-radius: 12px; padding: 5px 11px; text-align: right; }
.person .chip.two .cl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.person .chip.two small { margin-left: 0; white-space: nowrap; font-size: 11.5px; }
/* v1.6.0 — avvisi forzatura diaria (capi) */
.avvisi { background: var(--card); border: 2px solid #ef4444; border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; box-shadow: var(--shadow); }
.avvisi .pend-head b { color: #ef4444; }
.avv-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.avv-row > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.avv-row small { font-size: 13px; }
.avv-row .btn { flex-shrink: 0; }
.avvisi > .btn { margin-top: 8px; }
.avv-perm { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.role.r-avv { background: #fee2e2; color: #b91c1c; }
html.dark .role.r-avv { background: #7f1d1d; color: #fecaca; }
/* v1.7.0 — app Android */
.apk-up { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.apk-up .btn, .apk-up .ab { margin-left: auto; }
.apk-up .ab { display: flex; gap: 6px; }
.apk-up .apk-stato { flex-basis: 100%; font-size: 13px; line-height: 1.4; color: var(--muted); }
.apk-up .apk-stato .btn { margin: 6px 0 0; display: inline-flex; }
.apk-up .apk-stato a:not(.btn) { color: var(--accent, #4f46e5); font-weight: 700; }
.role.r-app { background: #dcfce7; color: #166534; }
html.dark .role.r-app { background: #14532d; color: #bbf7d0; }
html.nativa .install-btn { display: none !important; }
/* v1.7.0 — grafica Service Desk IT (ferroviaria) */
.auth-card { overflow: hidden; padding-top: 0; }
.auth-hero { margin: 0 -22px 16px; padding: 26px 22px 22px; display: flex; align-items: center; gap: 14px; text-align: left; color: #fff;
  background: url(../icons/banner-arte.svg) right center / cover no-repeat, linear-gradient(180deg, #081534, #1d4ed8); min-height: 150px; }
.auth-hero .auth-logo { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 6px 18px rgba(0,0,0,.35); flex-shrink: 0; }
.auth-hero small { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: 2.5px; color: #93c5fd; }
.auth-hero h1 { margin: 2px 0 0; font-size: 22px; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.4); }

/* ============================================================
   v1.7.0 — Tema "Service Desk IT · ferrovia"
   (resta il colore personale dell'operatore: --brand / --brand2)
   ============================================================ */
:root { --notte: #081534; --tab-bg: #0a1226; --tab-ink: #fbbf24; --rail: #93c5fd; }
body { background:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='120'%3E%3Cg fill='none' stroke='%2393a5c8' stroke-opacity='.18' stroke-width='1.4'%3E%3Cpath d='M10 20 L70 50 L140 25 L210 60'/%3E%3Cpath d='M70 50 L95 105'/%3E%3Cpath d='M140 25 L160 95'/%3E%3C/g%3E%3Cg fill='%2393a5c8' fill-opacity='.25'%3E%3Ccircle cx='10' cy='20' r='2.5'/%3E%3Ccircle cx='70' cy='50' r='3'/%3E%3Ccircle cx='140' cy='25' r='2.5'/%3E%3Ccircle cx='210' cy='60' r='3'/%3E%3Ccircle cx='95' cy='105' r='2'/%3E%3Ccircle cx='160' cy='95' r='2'/%3E%3C/g%3E%3C/svg%3E") top center / 440px auto repeat-x fixed,
  var(--bg); }

/* Barra in alto: sala operativa */
.topbar { background: linear-gradient(115deg, var(--notte) 0%, color-mix(in srgb, var(--brand) 85%, var(--notte)) 70%, color-mix(in srgb, var(--brand2) 80%, var(--notte)) 100%); border-bottom: 0; color: #fff; box-shadow: 0 6px 20px rgba(8,21,52,.25); }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 6px; pointer-events: none;
  background: linear-gradient(#cbd5e1, #cbd5e1) 0 0 / 100% 1.5px no-repeat, linear-gradient(#cbd5e1, #cbd5e1) 0 100% / 100% 1.5px no-repeat,
  repeating-linear-gradient(90deg, rgba(148,163,184,.75) 0 3px, transparent 3px 14px); opacity: .55; }
.brand img { box-shadow: 0 3px 10px rgba(0,0,0,.35); }
.brand b { color: #fff; }
.brand small { color: #bfdbfe; }
.brand-tag { display: block; font-style: normal; font-size: 9.5px; font-weight: 800; letter-spacing: 2px; color: #fbbf24; line-height: 1.1; }
.topnav button { color: #cbd5e1; }
.topnav button:hover { background: rgba(255,255,255,.1); color: #fff; }
.topnav button.active { background: rgba(255,255,255,.16); color: #fff; box-shadow: inset 0 -3px 0 #fbbf24; }
.topbar .user-chip { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.22); color: #fff; }
.topbar .icon-btn { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.22); color: #fff; }
.demo-bar { margin-top: 6px; }

/* Tabellone partenze (data + orario) */
.tabellone { background: linear-gradient(180deg, #0f1a33, var(--tab-bg)); border-radius: var(--radius); padding: 10px 12px 12px; margin-bottom: 12px; box-shadow: 0 8px 22px rgba(8,21,52,.28), inset 0 0 0 1px rgba(148,163,184,.12); color: #e2e8f0; }
.tab-head { display: flex; justify-content: space-between; align-items: center; font-size: 10.5px; font-weight: 800; letter-spacing: 1.8px; text-transform: uppercase; color: #93c5fd; margin-bottom: 8px; }
.tab-clock { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--tab-ink); background: #000; padding: 2px 8px; border-radius: 6px; letter-spacing: 1px; font-size: 13px; text-shadow: 0 0 8px rgba(251,191,36,.55); }
.tabellone .daynav { margin-bottom: 6px; }
.tabellone .icon-btn { background: rgba(255,255,255,.06); border-color: rgba(148,163,184,.25); color: #e2e8f0; }
.tabellone .daytitle b { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--tab-ink); text-transform: uppercase; letter-spacing: 1px; font-size: 15.5px; text-shadow: 0 0 10px rgba(251,191,36,.45); }
.tabellone .orario { margin: 0; color: #cbd5e1; border-top: 1px dashed rgba(148,163,184,.3); padding-top: 7px; }
.tabellone .orario.aperto b { color: #4ade80; } .tabellone .orario.chiuso b { color: #f87171; }
.tabellone .link { color: #93c5fd; }

/* Contatori come pannello di stazione */
.stat { background: linear-gradient(180deg, #0f1a33, var(--tab-bg)); border-top: 0; box-shadow: 0 6px 16px rgba(8,21,52,.22), inset 0 3px 0 var(--g); color: #e2e8f0; }
.stat b { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; color: color-mix(in srgb, var(--g) 70%, #fff); text-shadow: 0 0 12px color-mix(in srgb, var(--g) 60%, transparent); }
.stat span { color: #94a3b8; text-transform: uppercase; font-size: 10.5px; letter-spacing: .6px; }

/* Riquadri come cartelli di stazione */
.group { border-left-width: 6px; }
.group h3 { margin: -12px -12px 8px; padding: 9px 14px; border-radius: 0 var(--radius) 0 0; background: color-mix(in srgb, var(--g) 12%, var(--card)); border-bottom: 1px solid color-mix(in srgb, var(--g) 25%, transparent); }
.congedo-top .group h3 { border-radius: 0 var(--radius) 0 0; }
.mine { position: relative; overflow: hidden; background: linear-gradient(120deg, var(--notte), var(--brand) 55%, var(--brand2)); }
.mine::before { content: ""; position: absolute; right: -20px; bottom: -30px; width: 190px; height: 130px; opacity: .22; pointer-events: none;
  background: url(../icons/banner-arte.svg) right bottom / cover no-repeat; }
.mine > * { position: relative; }

/* Barra in basso: "luce di segnale" sulla voce attiva */
.bottomnav button.active { position: relative; }
.bottomnav button.active::before { content: ""; position: absolute; top: -6px; left: 30%; right: 30%; height: 3px; border-radius: 3px; background: #fbbf24; box-shadow: 0 0 8px rgba(251,191,36,.8); }

/* Accesso: il treno non copre il titolo */
.auth-hero { background-position: calc(100% + 70px) center, 0 0; }
@media (min-width: 900px) { .tabellone .daytitle b { font-size: 17px; } }
@media (max-width: 480px) { .tabellone .daytitle b { font-size: 13.5px; letter-spacing: .3px; } .tabellone .icon-btn { width: 36px; height: 36px; } }
/* v1.8.1 — prova notifiche */
.diag { padding: 8px 10px; border-radius: 10px; background: var(--soft); margin: 6px 0; font-size: 14px; line-height: 1.4; }
.diag.ok { background: color-mix(in srgb, #16a34a 12%, var(--card)); }
.diag.ko { background: color-mix(in srgb, #dc2626 12%, var(--card)); }
.congedo-top .group + .group { margin-top: 12px; }
/* v1.8.2 — capi / responsabili in un riquadro a parte */
.capi-box { margin-top: 12px; }
.capi-box .group h3 small { font-weight: 600; color: var(--muted); font-size: 12px; margin-left: 4px; }
@media (min-width: 900px) { .capi-box .group { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 16px; } .capi-box .group h3 { grid-column: 1 / -1; } }
.check.ricorda { margin: 4px 0 12px; font-size: 13.5px; }
/* v1.9.0 — PIN */
.pin-in { font-size: 22px; letter-spacing: 8px; text-align: center; font-family: ui-monospace, Consolas, monospace; }
.role.r-pin { background: #dcfce7; color: #166534; } html.dark .role.r-pin { background: #14532d; color: #bbf7d0; }
.role.r-nopin { background: #fef3c7; color: #92400e; } html.dark .role.r-nopin { background: #78350f; color: #fde68a; }
/* v1.9.2 — conteggio Legge 104 */
.c104 { margin: 8px 0 10px; padding: 8px 12px; border-radius: 12px; font-size: 13.5px; background: color-mix(in srgb, #db2777 12%, var(--card)); border: 1px solid color-mix(in srgb, #db2777 30%, transparent); }
.mine .c104 { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.25); color: #fff; margin: 4px 0 10px; }
/* v1.9.4 — frase del giorno */
.frase { position: relative; display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; padding: 12px 40px 12px 14px; border-radius: var(--radius);
  background: linear-gradient(120deg, color-mix(in srgb, #fbbf24 22%, var(--card)), color-mix(in srgb, var(--brand2) 14%, var(--card))); border: 1px solid color-mix(in srgb, #fbbf24 40%, transparent); box-shadow: var(--shadow); }
.frase .fr-ico { font-size: 28px; line-height: 1; margin-top: 2px; }
.frase b { font-size: 15px; }
.frase p { margin: 3px 0 0; font-size: 14px; line-height: 1.45; font-style: italic; }
.fr-x { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.08); color: var(--ink); cursor: pointer; font-size: 12px; }
html.dark .fr-x { background: rgba(255,255,255,.12); }
.fr-tutte { margin-top: 6px; font-size: 13px; }
.fr-lista { max-height: 60vh; overflow: auto; }
.fr-riga { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--line); }
.fr-riga:first-child { border-top: 0; }
.fr-riga .av.sm { width: 32px; height: 32px; font-size: 12px; margin: 0; flex-shrink: 0; }
.fr-riga p { margin: 2px 0 0; font-size: 13.5px; font-style: italic; line-height: 1.4; color: var(--muted); }
/* scaletta frasi */
.frase[data-scaletta] { cursor: pointer; user-select: none; min-height: 96px; }
.frase .fr-ico .av { width: 34px; height: 34px; font-size: 12px; }
.fr-testo { flex: 1; min-width: 0; transition: opacity .25s ease, transform .25s ease; }
.fr-testo.fade { opacity: 0; transform: translateY(4px); }
.fr-dots { display: flex; gap: 5px; margin-top: 8px; flex-wrap: wrap; }
.fr-dots i { width: 6px; height: 6px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 25%, transparent); }
.fr-dots i.on { background: #f59e0b; width: 16px; border-radius: 4px; }
/* v1.9.5 — E' ora del caffe' */
.caffe-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: -2px 0 12px; }
.caffe-btn { background: linear-gradient(135deg, #78350f, #b45309); color: #fff; border: 0; font-weight: 800; padding: 10px 18px; border-radius: 999px; box-shadow: 0 6px 16px rgba(120,53,15,.35); }
.caffe-btn:hover { filter: brightness(1.08); }
.caffe-row small { font-size: 12.5px; }
.caffe-pop { position: fixed; left: 50%; top: calc(16px + var(--safe-t, 0px)); transform: translateX(-50%); z-index: 200; display: flex; gap: 12px; align-items: center;
  background: linear-gradient(135deg, #78350f, #b45309); color: #fff; padding: 14px 20px; border-radius: 18px; box-shadow: 0 14px 40px rgba(0,0,0,.35); max-width: calc(100vw - 32px); width: max-content; min-width: min(340px, calc(100vw - 32px)); box-sizing: border-box;
  animation: caffeIn .45s cubic-bezier(.2,1.4,.4,1); cursor: pointer; transition: opacity .5s, transform .5s; }
.caffe-pop > span { font-size: 34px; animation: caffeWobble 1.2s ease-in-out infinite; }
.caffe-pop b { display: block; font-size: 16px; } .caffe-pop small { opacity: .85; }
.caffe-pop.out { opacity: 0; transform: translate(-50%, -20px); }
@keyframes caffeIn { from { transform: translate(-50%, -40px) scale(.9); opacity: 0; } to { transform: translate(-50%, 0) scale(1); opacity: 1; } }
@keyframes caffeWobble { 0%,100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
.fr-riga.fr-mia { background: color-mix(in srgb, #fbbf24 14%, transparent); border-radius: 12px; padding: 9px 10px; margin-bottom: 4px; }
.fr-riga.fr-mia p { color: var(--ink); }
.fr-tazza { font-size: 24px; width: 32px; text-align: center; flex-shrink: 0; }
/* v1.9.8 — online / offline */
.dot { background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.6); }
.dot.off { background: #ef4444; animation: pulseRed 1.6s infinite; }
@keyframes pulseRed { 0% { box-shadow: 0 0 0 0 rgba(239,68,68,.6); } 70% { box-shadow: 0 0 0 7px rgba(239,68,68,0); } 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } }
.offline-bar { position: fixed; left: 12px; right: 12px; bottom: calc(74px + var(--safe-b, 0px)); z-index: 150; background: #b91c1c; color: #fff; padding: 10px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.4; box-shadow: 0 10px 28px rgba(0,0,0,.3); }
.offline-bar .link { color: #fff; text-decoration: underline; margin-left: 6px; font-weight: 800; }
@media (min-width: 900px) { .offline-bar { bottom: 18px; left: 50%; right: auto; transform: translateX(-50%); max-width: 640px; } }

/* Calendario rapido (tocca la data del tabellone) */
button.daytitle.cal-open { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 4px 6px; border-radius: 10px; }
button.daytitle.cal-open:hover { background: rgba(147,197,253,.08); }
.cal-hint { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .2px; }
.tabellone .cal-hint { color: #93c5fd; opacity: .8; }
.cal-anno { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 4px 0 10px; }
.cal-anno b { font-size: 20px; min-width: 70px; text-align: center; }
.cal-mesi { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 12px; }
.cal-m { padding: 9px 0; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 700 13.5px inherit; font-family: inherit; cursor: pointer; }
.cal-m.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.cal-tit { text-align: center; font-weight: 800; margin-bottom: 6px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font-size: 11.5px; font-weight: 800; color: var(--muted); padding: 2px 0; }
.cal-g { aspect-ratio: 1; max-height: 46px; border-radius: 10px; border: 1px solid transparent; background: rgba(148,163,184,.1); color: var(--ink); font: 700 14.5px inherit; font-family: inherit; cursor: pointer; }
.cal-g:hover { border-color: var(--brand); }
.cal-g.off { color: #ef4444; background: transparent; }
.cal-g.oggi { border-color: #f59e0b; }
.cal-g.sel { background: var(--brand); color: #fff; }
@media (max-width: 400px) { .cal-mesi { grid-template-columns: repeat(4, 1fr); } }

/* Richieste ai colleghi (pizza, colazione...) */
.rich-btn { background: linear-gradient(135deg, #be123c, #e11d48); color: #fff; border: 0; font-weight: 800; padding: 10px 18px; border-radius: 999px; box-shadow: 0 6px 16px rgba(190,18,60,.3); }
.rich-btn:hover { filter: brightness(1.08); }
.rich-box { display: grid; gap: 10px; margin: 0 0 14px; }
@media (min-width: 900px) { .rich-box { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); } }
.rich { background: var(--card); border: 1px solid var(--line); border-left: 4px solid #e11d48; border-radius: 16px; padding: 12px 14px; box-shadow: 0 4px 14px rgba(15,23,42,.06); }
.rich.chiusa { opacity: .7; border-left-color: #94a3b8; }
.rich-h { display: flex; flex-direction: column; gap: 2px; }
.rich-h b { font-size: 15.5px; }
.rich-t { font-size: 13.5px; margin-top: 4px; }
.rich-opz { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ropz { border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 999px; padding: 8px 14px; font: 700 13.5px inherit; font-family: inherit; cursor: pointer; }
.ropz i { font-style: normal; background: rgba(225,29,72,.14); color: #e11d48; border-radius: 999px; padding: 0 7px; margin-left: 4px; font-size: 12px; }
.ropz.on { background: #e11d48; border-color: #e11d48; color: #fff; }
.ropz.on i { background: rgba(255,255,255,.25); color: #fff; }
.ropz:disabled { cursor: default; }
.rich-nota { display: flex; gap: 6px; margin-top: 8px; }
.rich-nota input { flex: 1; min-width: 0; margin-top: 0; }
.rich-f { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; font-size: 13px; }
.rich-f .danger { color: #dc2626; }
.rich-mod { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.rich-g { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.rich-g b { display: block; margin-bottom: 4px; }
@media (max-width: 400px) { .rich-mod { grid-template-columns: repeat(2, 1fr); } }
.ora-row small { display: block; margin-top: 4px; font-size: 12px; line-height: 1.35; }

/* Piu' localita' per l'uscita */
.zona-row .zlab { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.zchips { display: flex; flex-wrap: wrap; gap: 6px; }
.zchips:empty { display: none; }
.zchip { display: inline-flex; align-items: center; gap: 6px; background: rgba(37,99,235,.12); color: var(--brand2, #2563eb); border: 1px solid rgba(37,99,235,.3); border-radius: 999px; padding: 5px 6px 5px 11px; font-weight: 700; font-size: 13.5px; }
.zchip button { border: 0; background: rgba(37,99,235,.18); color: inherit; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; font-size: 11px; line-height: 1; padding: 0; }
.zadd { display: flex; gap: 6px; margin-top: 6px; }
.zadd input { flex: 1; min-width: 0; margin-top: 0; }
.zadd .zplus { min-width: 48px; padding: 0 12px; }
.rich { position: relative; }
.rich-x { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(148,163,184,.18); color: var(--muted); cursor: pointer; font-size: 13px; }
.rich-x:hover { background: rgba(148,163,184,.32); color: var(--ink); }
.rich-h { padding-right: 34px; }

/* "Salva" spento (Permesso Feo senza orario) e avviso sopra la finestra */
.btn.off { opacity: .45; filter: grayscale(.4); }
.pop-avviso { position: fixed; inset: 0; z-index: 120; background: rgba(2,6,23,.55); display: grid; place-items: center; padding: 16px; animation: popIn .15s ease-out; }
.pop-box { background: var(--card); color: var(--ink); border-radius: 18px; padding: 20px; width: min(340px, 100%); text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,.4); display: grid; gap: 12px; }
.pop-box b { font-size: 16px; line-height: 1.35; }
.pop-ic { font-size: 34px; }
@keyframes popIn { from { opacity: 0; } to { opacity: 1; } }

/* ---- Oggi riorganizzato: prima chi e' in ufficio, poi fuori ufficio, poi assenti ---- */
.sez-t { font-size: 11.5px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); margin: 18px 4px 8px; }
.group.big { margin-bottom: 12px; border-left-width: 6px; }
.group.big h3 { font-size: 16.5px; }
.group.big .caffe-row { margin: 4px 2px 10px; }
.group.big .plist { display: grid; gap: 2px; }
@media (min-width: 700px) { .group.big .plist { grid-template-columns: repeat(2, 1fr); column-gap: 14px; } }
@media (min-width: 1100px) { .group.big .plist { grid-template-columns: repeat(3, 1fr); } }
.g-fuori, .g-assenti { margin-bottom: 4px; }
@media (min-width: 900px) {
  .g-fuori { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
  .g-assenti { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
}
.capi-box { margin-top: 12px; }
.capi-box + .frase, .groups + .frase, .mine + .frase { margin-top: 14px; }

/* "Tu oggi": il tuo stato in una riga, tocchi e lo cambi */
.tu-oggi { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; box-shadow: var(--shadow); cursor: pointer; color: var(--ink); font: inherit; margin-bottom: 4px; }
.tu-oggi:hover { border-color: var(--brand2); }
.tu-oggi .tu-t { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.tu-oggi .tu-t > small:first-child { width: 100%; font-size: 11px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.tu-oggi .tu-btn { flex: 0 0 auto; font-weight: 700; font-size: 13px; color: var(--brand2); background: color-mix(in srgb, var(--brand2) 12%, transparent); padding: 7px 12px; border-radius: 999px; }
.tu-oggi + .c104 { margin: 6px 4px 0; }
.group.big + .frase { margin-top: 0; margin-bottom: 12px; }

/* Riquadro "Relax": caffe', richieste (pizza, colazione...) */
.relax { background: linear-gradient(135deg, color-mix(in srgb, #b45309 10%, var(--card)), color-mix(in srgb, #e11d48 8%, var(--card))); border: 1px solid color-mix(in srgb, #b45309 25%, var(--line)); border-radius: var(--radius); padding: 10px 12px 12px; margin-bottom: 12px; box-shadow: var(--shadow); }
.relax-h { font-size: 11.5px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; color: #b45309; margin: 0 2px 8px; }
.relax .caffe-row { margin: 0 0 4px; }
.relax .caffe-btn, .relax .rich-btn { padding: 8px 14px; font-size: 14px; }
.relax .rich-box { margin: 10px 0 0; }
html.dark .relax-h { color: #fbbf24; }
.relax-h { display: flex; align-items: center; justify-content: space-between; }
.relax-x { width: 30px; height: 26px; border-radius: 8px; border: 0; background: rgba(180,83,9,.15); color: inherit; font-size: 18px; line-height: 1; cursor: pointer; font-weight: 800; }
.relax-x:hover { background: rgba(180,83,9,.28); }
.relax-mini { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 9px 16px; border-radius: 999px; border: 1px solid color-mix(in srgb, #b45309 30%, var(--line)); background: linear-gradient(135deg, color-mix(in srgb, #b45309 14%, var(--card)), color-mix(in srgb, #e11d48 10%, var(--card))); color: var(--ink); font-family: inherit; font-size: 14px; font-weight: 800; cursor: pointer; box-shadow: var(--shadow); }
.relax-mini .rb { background: #e11d48; color: #fff; border-radius: 999px; min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; font-size: 12px; }

/* ============================================================
   v1.9.23 — Stile "Ufficio": sobrio, professionale
   (si sceglie in Colori e tema; "Stazione" resta disponibile)
   ============================================================ */
html.st-ufficio { --bg: #eef1f5; --card: #ffffff; --line: #e3e8ef; --muted: #5b6b80; --radius: 12px;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06); --of-head: #f7f9fb; --of-ink2: #334155; }
html.st-ufficio.dark { --bg: #0e141d; --card: #161e2a; --line: #263244; --muted: #93a1b5; --of-head: #1b2533; --of-ink2: #cbd5e1;
  --shadow: 0 1px 2px rgba(0,0,0,.35); }
html.st-ufficio body { background: var(--bg); }
/* barra in alto: blu istituzionale, niente binari */
html.st-ufficio .topbar { background: #0f2a4a; box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 2px 8px rgba(16,24,40,.18); }
html.st-ufficio.dark .topbar { background: #0b1d33; }
html.st-ufficio .topbar::after { display: none; }
html.st-ufficio .brand-tag { color: #9fb6d3; letter-spacing: 1.6px; }
html.st-ufficio .topnav button.active { background: rgba(255,255,255,.12); box-shadow: inset 0 -2px 0 #fff; }
html.st-ufficio .bottomnav button.active::before { background: var(--brand2); box-shadow: none; }
/* intestazione del giorno: scheda pulita */
html.st-ufficio .tabellone { background: var(--card); color: var(--ink); box-shadow: var(--shadow); border: 1px solid var(--line); border-top: 3px solid var(--brand); }
html.st-ufficio .tab-head { color: var(--muted); letter-spacing: 1.2px; }
html.st-ufficio .tab-clock { background: var(--of-head); color: var(--ink); text-shadow: none; font-family: inherit; font-weight: 800; border: 1px solid var(--line); }
html.st-ufficio .tabellone .daytitle b { font-family: inherit; color: var(--ink); text-shadow: none; letter-spacing: .2px; text-transform: capitalize; font-size: 18px; font-weight: 800; }
html.st-ufficio .tabellone .cal-hint { color: var(--muted); opacity: 1; }
html.st-ufficio .tabellone .icon-btn { background: var(--of-head); border-color: var(--line); color: var(--ink); }
html.st-ufficio .tabellone .orario { color: var(--muted); border-top: 1px solid var(--line); }
html.st-ufficio .tabellone .orario.aperto b { color: #15803d; } html.st-ufficio .tabellone .orario.chiuso b { color: #b91c1c; }
html.st-ufficio.dark .tabellone .orario.aperto b { color: #4ade80; } html.st-ufficio.dark .tabellone .orario.chiuso b { color: #f87171; }
html.st-ufficio .tabellone .link { color: var(--brand2); }
/* contatori: schede bianche con filo colorato */
html.st-ufficio .stat { background: var(--card); color: var(--ink); box-shadow: var(--shadow); border: 1px solid var(--line); border-top: 3px solid var(--g); }
html.st-ufficio .stat b { font-family: inherit; color: var(--g); text-shadow: none; font-weight: 800; }
html.st-ufficio .stat span { color: var(--muted); letter-spacing: .4px; }
/* riquadri: intestazione neutra, filo colorato sottile */
html.st-ufficio .group { border: 1px solid var(--line); border-left: 4px solid var(--g); box-shadow: var(--shadow); }
html.st-ufficio .group h3 { background: var(--of-head); border-bottom: 1px solid var(--line); color: var(--of-ink2); font-size: 14.5px; }
html.st-ufficio .group.big h3 { font-size: 15.5px; }
html.st-ufficio .group .count { background: color-mix(in srgb, var(--g) 14%, var(--card)); color: var(--g); border: 1px solid color-mix(in srgb, var(--g) 35%, transparent); }
html.st-ufficio .sez-t { color: var(--muted); letter-spacing: 1.2px; }
html.st-ufficio .tu-oggi, html.st-ufficio .rich { box-shadow: var(--shadow); }
/* frase e relax: toni sobri */
html.st-ufficio .frase { background: var(--card); border: 1px solid var(--line); border-left: 4px solid #c9a227; }
html.st-ufficio .relax { background: var(--card); border: 1px solid var(--line); border-left: 4px solid #9a6b3f; }
html.st-ufficio .relax-h { color: #7c5a36; } html.st-ufficio.dark .relax-h { color: #d6b48c; }
html.st-ufficio .relax-mini { background: var(--card); border: 1px solid var(--line); }
html.st-ufficio .caffe-btn { background: #6b4a2f; box-shadow: none; }
html.st-ufficio .rich-btn { background: #9f1239; box-shadow: none; }
html.st-ufficio .btn.primary { box-shadow: none; }
/* accesso */
html.st-ufficio .auth-wrap { background: var(--bg); }
/* Ufficio "classico": titoli con carattere tradizionale, angoli piu' squadrati, filetti sottili */
html.st-ufficio { --radius: 8px; --of-serif: Georgia, "Times New Roman", "Libre Baskerville", serif; }
html.st-ufficio .tabellone .daytitle b { font-family: var(--of-serif); font-weight: 700; font-size: 21px; letter-spacing: .2px; }
html.st-ufficio .group h3, html.st-ufficio .rich-h b, html.st-ufficio .tu-oggi .tu-t > small:first-child,
html.st-ufficio .brand b, html.st-ufficio .panel h2, html.st-ufficio .sheet h3 { font-family: var(--of-serif); letter-spacing: .1px; }
html.st-ufficio .group h3 { font-weight: 700; text-transform: none; }
html.st-ufficio .sez-t { font-family: var(--of-serif); text-transform: none; font-size: 15px; letter-spacing: .2px; font-weight: 700; color: var(--of-ink2); border-bottom: 1px solid var(--line); padding-bottom: 4px; }
html.st-ufficio .stat b { font-family: var(--of-serif); }
html.st-ufficio .tabellone { border-top-width: 4px; }
html.st-ufficio .chip, html.st-ufficio .ropz, html.st-ufficio .caffe-btn, html.st-ufficio .rich-btn, html.st-ufficio .relax-mini, html.st-ufficio .tu-oggi .tu-btn { border-radius: 6px; }
html.st-ufficio .btn { border-radius: 8px; }
html.st-ufficio .av { border-radius: 8px; }
/* tavolozza "Ufficio": blu di Prussia al posto del blu acceso (se l'operatore non ha scelto un suo colore) */
html.st-ufficio { --brand: #14365c; --brand2: #1f4e79; }
html.st-ufficio.dark { --brand: #2c5d8f; --brand2: #6f9ccc; }
html.st-ufficio .frase .fr-dots i.on, html.st-ufficio .frase [class*="dot"].on { background: #b07d1f; }
/* Ufficio: niente barra laterale colorata, al suo posto una piccola linguetta in alto */
html.st-ufficio .group, html.st-ufficio .rich, html.st-ufficio .frase, html.st-ufficio .relax { position: relative; border-left: 1px solid var(--line); }
html.st-ufficio .group::before, html.st-ufficio .rich::before, html.st-ufficio .frase::before, html.st-ufficio .relax::before {
  content: ""; position: absolute; top: 0; left: 18px; width: 44px; height: 4px; border-radius: 0 0 4px 4px; background: var(--g, var(--brand2)); z-index: 1; }
html.st-ufficio .rich::before { background: #9f1239; }
html.st-ufficio .frase::before { background: #b07d1f; }
html.st-ufficio .relax::before { background: #6b4a2f; }
html.st-ufficio .group h3 .gi { width: 28px; height: 28px; display: inline-grid; place-items: center; border-radius: 6px; background: color-mix(in srgb, var(--g) 14%, var(--card)); font-size: 15px; }
/* Ufficio: nessuna barra o linguetta colorata, solo bordi grigi sottili */
html.st-ufficio .group::before, html.st-ufficio .rich::before, html.st-ufficio .frase::before, html.st-ufficio .relax::before { display: none; }
html.st-ufficio .group, html.st-ufficio .rich, html.st-ufficio .frase, html.st-ufficio .relax, html.st-ufficio .stat, html.st-ufficio .tabellone { border: 1px solid var(--line); }
html.st-ufficio .rich { border-radius: var(--radius); }

/* ============================================================
   v1.9.23 — Template "Gestionale aziendale" (stile Ufficio, su PC)
   menu fisso a sinistra, contenuto a destra
   ============================================================ */
@media (min-width: 1000px) {
  html.st-ufficio .topbar { position: fixed; top: 0; left: 0; bottom: 0; width: 236px; z-index: 30; flex-direction: column; align-items: stretch; gap: 22px;
    padding: 20px 14px 16px; border-right: 1px solid rgba(255,255,255,.06); box-shadow: 2px 0 10px rgba(16,24,40,.12); }
  html.st-ufficio .brand { flex: 0 0 auto; padding: 0 6px 16px; border-bottom: 1px solid rgba(255,255,255,.1); }
  html.st-ufficio .brand b { font-size: 17px; }
  html.st-ufficio .topnav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
  html.st-ufficio .topnav::before { content: "MENU"; font-size: 10.5px; font-weight: 800; letter-spacing: 1.6px; color: #7f97b5; padding: 0 12px 8px; }
  html.st-ufficio .topnav button { text-align: left; width: 100%; padding: 11px 14px; border-radius: 8px; font-size: 14.5px; color: #c9d6e6; }
  html.st-ufficio .topnav button.active { background: rgba(255,255,255,.12); color: #fff; box-shadow: inset 3px 0 0 #fff; }
  html.st-ufficio .top-actions { flex-direction: column; align-items: stretch; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.1); }
  html.st-ufficio .top-actions .user-chip { width: 100%; border-radius: 8px; padding: 6px 10px; }
  html.st-ufficio .top-actions .user-chip .un { max-width: none; }
  html.st-ufficio .demo-bar, html.st-ufficio #view { margin-left: 236px; }
  html.st-ufficio .demo-bar { margin-top: 0; }
  html.st-ufficio #view { max-width: 1180px; padding: 26px 32px 40px; }
  html.st-ufficio .offline-bar { left: 250px; }
}
@media (min-width: 1500px) { html.st-ufficio #view { margin-left: calc(236px + (100vw - 236px - 1180px) / 2); } }

/* Ufficio: al posto delle iniziali una sagoma (icona persona) */
html.st-ufficio .av { position: relative; font-size: 0 !important; color: transparent; overflow: hidden; }
html.st-ufficio .av::before { content: ""; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Ccircle cx='12' cy='8.6' r='4.3'/%3E%3Cpath d='M3.6 22c.5-4.6 4-7.6 8.4-7.6s7.9 3 8.4 7.6z'/%3E%3C/svg%3E") center 70% / 70% no-repeat; opacity: .92; }

/* ============================================================
   v1.9.24 — Stile Ufficio con forme: calendario da scrivania, cerchi, etichette a freccia
   ============================================================ */
.cal-tile { display: none; }
html.st-ufficio .tabellone .daytitle { flex-direction: row; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; }
html.st-ufficio .tabellone .daytitle .cal-hint { flex-basis: 100%; text-align: center; }
/* foglio di calendario da scrivania */
html.st-ufficio .cal-tile { display: inline-flex; flex-direction: column; width: 54px; border-radius: 8px; overflow: hidden; background: var(--card); border: 1px solid var(--line); box-shadow: 0 2px 6px rgba(16,24,40,.12); flex: 0 0 auto; }
html.st-ufficio .cal-tile i { font-style: normal; background: #8e2c2c; color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: 1.2px; padding: 3px 0; }
html.st-ufficio .cal-tile b { font-family: var(--of-serif) !important; font-size: 24px !important; line-height: 1.25; color: var(--ink) !important; padding: 2px 0 4px; text-transform: none !important; letter-spacing: 0 !important; }
/* contatori: numero dentro un cerchio */
html.st-ufficio .stat { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; }
html.st-ufficio .stat b { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 24px !important; line-height: 1;
  border: 3px solid color-mix(in srgb, var(--g) 70%, transparent); background: color-mix(in srgb, var(--g) 9%, var(--card)); }
html.st-ufficio .stat span { font-size: 11px; line-height: 1.25; }
@media (max-width: 600px) {
  html.st-ufficio .stat { flex-direction: column; text-align: center; gap: 6px; padding: 10px 4px; }
  html.st-ufficio .stat b { width: 42px; height: 42px; font-size: 19px !important; border-width: 2.5px; }
}
/* intestazione dei riquadri: etichetta a freccia */
html.st-ufficio .group h3 { background: transparent; border-bottom: 1px dashed var(--line); padding: 10px 12px 10px 0; margin: -12px -12px 10px; }
html.st-ufficio .group h3 { display: flex; }
html.st-ufficio .group h3 .gi { margin-left: 12px; }
html.st-ufficio .group h3 { position: relative; }
html.st-ufficio .group h3::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 0; }
html.st-ufficio .group h3 { --tag: color-mix(in srgb, var(--g) 13%, var(--card)); }
html.st-ufficio .group h3 { background: linear-gradient(var(--tag), var(--tag)) left 0 top 6px / 0 0 no-repeat; }
html.st-ufficio .group h3 .gi, html.st-ufficio .group h3 { }
html.st-ufficio .group h3 > .gi + * { }
html.st-ufficio .group h3 { padding-left: 0; }
html.st-ufficio .group h3 .gi { border-radius: 50%; background: color-mix(in srgb, var(--g) 16%, var(--card)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--g) 8%, transparent); }
html.st-ufficio .group h3 .count { border-radius: 4px; clip-path: polygon(8px 0, 100% 0, 100% 100%, 8px 100%, 0 50%); padding: 0 8px 0 14px; background: var(--g); color: #fff; border: 0; }
/* titoli di sezione con fregio */
html.st-ufficio .sez-t { display: flex; align-items: center; gap: 10px; border-bottom: 0; }
html.st-ufficio .sez-t::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
html.st-ufficio .sez-t::before { content: "◆"; font-size: 9px; color: #b07d1f; order: -1; }
/* persone: sagoma in un cerchio con anello */
html.st-ufficio .av { border-radius: 50% !important; box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px color-mix(in srgb, currentColor 0%, var(--line)); }
/* frase: virgolette grandi */
html.st-ufficio .frase { padding-left: 18px; overflow: hidden; }
html.st-ufficio .frase::after { content: "“"; position: absolute; right: 54px; top: -18px; font-family: var(--of-serif); font-size: 110px; line-height: 1; color: color-mix(in srgb, #b07d1f 22%, transparent); pointer-events: none; }
/* relax: angolo smussato e intestazione a timbro */
html.st-ufficio .relax { border-radius: 4px 22px 4px 22px; }
html.st-ufficio .relax-h > span { display: inline-block; border: 1.5px solid currentColor; border-radius: 4px; padding: 2px 8px; transform: rotate(-2deg); }
/* "Tu oggi": cartellino con angolo tagliato */
html.st-ufficio .tu-oggi { clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%); border-radius: 8px 0 8px 8px; }
/* richieste: angoli alternati */
html.st-ufficio .rich { border-radius: 4px 16px 4px 16px; }
html.st-ufficio .ropz { border-radius: 999px; }
html.st-ufficio .frase::after { z-index: 0; color: color-mix(in srgb, #b07d1f 14%, transparent); }
html.st-ufficio .frase > *:not(.fr-x) { position: relative; z-index: 1; }
html.st-ufficio .frase > .fr-x { z-index: 2; }
@media (max-width: 600px) { html.st-ufficio .frase::after { font-size: 80px; right: 40px; top: 18px; } }

/* ============================================================
   v1.9.24 — Movimento (stile Ufficio): entrate a cascata, passaggio del mouse, presenza "viva"
   ============================================================ */
@keyframes sali { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes pulsaVerde { 0% { box-shadow: 0 0 0 0 rgba(47,107,79,.55); } 70% { box-shadow: 0 0 0 7px rgba(47,107,79,0); } 100% { box-shadow: 0 0 0 0 rgba(47,107,79,0); } }
@keyframes lampeggia { 50% { opacity: .15; } }
@keyframes riflesso { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes vapore { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-2px) rotate(-6deg); } }
@keyframes sfoglia { from { transform: perspective(300px) rotateX(-80deg); opacity: 0; } to { transform: none; opacity: 1; } }
html.st-ufficio .view.entra > * { animation: sali .5s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i, 0) * 55ms); }
html.st-ufficio .view.entra .cal-tile { animation: sfoglia .6s .15s cubic-bezier(.2,.7,.2,1) both; transform-origin: top; }
html.st-ufficio .view.entra .group.big .person { animation: sali .45s both; animation-delay: calc(.25s + var(--j, 0) * 40ms); }
/* orologio: i due punti lampeggiano */
.tab-clock .blink { font-style: normal; animation: lampeggia 1s steps(1) infinite; }
/* chi e' in postazione: pallino verde che "respira" sulla sagoma */
html.st-ufficio .group.big .av::after { content: ""; position: absolute; right: 1px; bottom: 1px; width: 10px; height: 10px; border-radius: 50%; background: #3fa66f; border: 2px solid var(--card); animation: pulsaVerde 2.4s infinite; }
html.st-ufficio .av { overflow: visible; }
html.st-ufficio .av::before { border-radius: 50%; }
/* schede e righe: si muovono al passaggio del mouse */
html.st-ufficio .group, html.st-ufficio .stat, html.st-ufficio .rich, html.st-ufficio .tu-oggi, html.st-ufficio .frase { transition: transform .18s ease, box-shadow .18s ease; }
@media (hover: hover) {
  html.st-ufficio .group:hover, html.st-ufficio .stat:hover, html.st-ufficio .rich:hover, html.st-ufficio .frase:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(16,24,40,.10); }
  html.st-ufficio .person { transition: transform .15s ease, background .15s ease; }
  html.st-ufficio .person:not([disabled]):hover { transform: translateX(4px); background: color-mix(in srgb, var(--g, var(--brand2)) 7%, transparent); }
  html.st-ufficio .topnav button { transition: background .15s, padding-left .15s; }
  html.st-ufficio .topnav button:hover { padding-left: 20px; }
}
html.st-ufficio .person:active { transform: scale(.985); }
/* barra/menu: riflesso lento */
html.st-ufficio .topbar { background-image: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.06) 45%, transparent 60%); background-size: 200% 100%; animation: riflesso 9s linear infinite; }
/* tasti relax: la tazza fuma */
html.st-ufficio .caffe-btn:hover, html.st-ufficio .rich-btn:hover { transform: translateY(-1px); }
html.st-ufficio .relax-mini { animation: vapore 2.8s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { html.st-ufficio *, html.st-ufficio *::before, html.st-ufficio *::after { animation: none !important; transition: none !important; } }

/* ============================================================
   v1.9.25 — Stile "Moderno" (predefinito): sfondo colorato, schede in vetro, menu sfumato
   si appoggia allo stile Ufficio (stessa struttura, stesse forme e movimenti)
   ============================================================ */
html.st-moderno { --of-serif: 'Plus Jakarta Sans', system-ui, sans-serif; --radius: 18px;
  --bg: #e9edf8; --card: rgba(255,255,255,.78); --line: rgba(15,23,42,.08); --of-head: rgba(241,245,252,.7); --of-ink2: #1e293b;
  --brand: #3730a3; --brand2: #4f46e5; --shadow: 0 1px 2px rgba(30,41,90,.06), 0 8px 24px rgba(30,41,90,.08); }
html.st-moderno.dark { --bg: #0a0f1f; --card: rgba(23,31,52,.72); --line: rgba(148,163,184,.14); --of-head: rgba(30,41,66,.6); --of-ink2: #e2e8f0;
  --brand: #6366f1; --brand2: #818cf8; --shadow: 0 8px 28px rgba(0,0,0,.35); }
/* sfondo colorato con macchie di luce */
html.st-moderno body { background:
  radial-gradient(900px 520px at 8% -6%, rgba(99,102,241,.30), transparent 60%),
  radial-gradient(800px 520px at 100% 12%, rgba(20,184,166,.24), transparent 60%),
  radial-gradient(900px 600px at 50% 110%, rgba(244,114,182,.20), transparent 60%),
  linear-gradient(160deg, #eef2ff 0%, #ecfeff 55%, #fdf2f8 100%) fixed; background-attachment: fixed; }
html.st-moderno.dark body { background:
  radial-gradient(900px 520px at 8% -6%, rgba(99,102,241,.32), transparent 60%),
  radial-gradient(800px 520px at 100% 12%, rgba(20,184,166,.20), transparent 60%),
  radial-gradient(900px 600px at 50% 110%, rgba(236,72,153,.16), transparent 60%),
  linear-gradient(160deg, #0a0f1f 0%, #0b1426 60%, #140b1f 100%) fixed; background-attachment: fixed; }
/* schede in vetro */
html.st-moderno .tabellone, html.st-moderno .stat, html.st-moderno .group, html.st-moderno .tu-oggi, html.st-moderno .frase,
html.st-moderno .relax, html.st-moderno .rich, html.st-moderno .panel, html.st-moderno .pend {
  background: var(--card); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid rgba(255,255,255,.65); box-shadow: var(--shadow); }
html.st-moderno.dark .tabellone, html.st-moderno.dark .stat, html.st-moderno.dark .group, html.st-moderno.dark .tu-oggi, html.st-moderno.dark .frase,
html.st-moderno.dark .relax, html.st-moderno.dark .rich, html.st-moderno.dark .panel, html.st-moderno.dark .pend { border-color: rgba(148,163,184,.14); }
html.st-moderno .rich { background: rgba(255,255,255,.6); } html.st-moderno.dark .rich { background: rgba(15,23,42,.45); }
/* menu e barra: sfumatura indaco -> verde acqua */
html.st-moderno .topbar { background: linear-gradient(160deg, #312e81 0%, #3730a3 35%, #0f766e 100%); }
html.st-moderno.dark .topbar { background: linear-gradient(160deg, #1e1b4b 0%, #312e81 45%, #134e4a 100%); }
html.st-moderno .topbar::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.08) 45%, transparent 60%) 0 0 / 200% 100%; animation: riflesso 9s linear infinite; }
html.st-moderno .topnav button.active { background: rgba(255,255,255,.18); box-shadow: inset 3px 0 0 #5eead4; }
@media (max-width: 999px) { html.st-moderno .topnav button.active { box-shadow: inset 0 -2px 0 #5eead4; } }
html.st-moderno .bottomnav { background: rgba(255,255,255,.75); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
html.st-moderno.dark .bottomnav { background: rgba(10,15,31,.75); }
html.st-moderno .bottomnav button.active::before { background: linear-gradient(90deg, #6366f1, #14b8a6); }
/* titoli moderni (niente carattere classico) */
html.st-moderno .tabellone .daytitle b, html.st-moderno .group h3, html.st-moderno .sez-t, html.st-moderno .brand b, html.st-moderno .stat b { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; }
html.st-moderno .tabellone .daytitle b { font-weight: 800; letter-spacing: -.3px; }
html.st-moderno .tabellone { border-top-width: 1px; }
html.st-moderno .sez-t { text-transform: uppercase; font-size: 12px; letter-spacing: 1.6px; color: #4338ca; }
html.st-moderno.dark .sez-t { color: #a5b4fc; }
html.st-moderno .sez-t::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: linear-gradient(135deg, #6366f1, #14b8a6); transform: rotate(45deg); }
html.st-moderno .cal-tile i { background: linear-gradient(135deg, #4f46e5, #0d9488); }
html.st-moderno .tab-clock { background: linear-gradient(135deg, #4f46e5, #0d9488); color: #fff; border: 0; }
/* contatori: anello sfumato */
html.st-moderno .stat b { border: 0; background: conic-gradient(var(--g) 0 75%, color-mix(in srgb, var(--g) 25%, transparent) 75% 100%); color: var(--g); position: relative; }
html.st-moderno .stat b::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--card); z-index: 0; }
html.st-moderno .stat b { isolation: isolate; } html.st-moderno .stat b::before { z-index: -1; background: #fff; } html.st-moderno.dark .stat b::before { background: #172036; }
/* tasti principali con sfumatura */
html.st-moderno .btn.primary { background: linear-gradient(135deg, #4f46e5, #0d9488); border: 0; }
html.st-moderno .tu-oggi .tu-btn { background: linear-gradient(135deg, rgba(79,70,229,.14), rgba(13,148,136,.14)); color: #4338ca; }
html.st-moderno.dark .tu-oggi .tu-btn { color: #c7d2fe; }
html.st-moderno .frase::after { color: rgba(99,102,241,.14); }
html.st-moderno .relax { border-radius: 18px; } html.st-moderno .rich { border-radius: 16px; } html.st-moderno .tu-oggi { clip-path: none; border-radius: 18px; }
html.st-moderno .chip, html.st-moderno .ropz, html.st-moderno .caffe-btn, html.st-moderno .rich-btn, html.st-moderno .relax-mini, html.st-moderno .btn { border-radius: 999px; }
html.st-moderno .caffe-btn { background: linear-gradient(135deg, #78350f, #b45309); } html.st-moderno .rich-btn { background: linear-gradient(135deg, #be123c, #db2777); }
html.st-moderno .auth-wrap { background: transparent; }

/* ============================================================
   v1.9.26 — Stesso tema su Calendario, Inserisci, Report (e pannelli Admin)
   ============================================================ */
.h2i { display: none; }
html.st-ufficio .h2i { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; margin-right: 10px; font-size: 16px; vertical-align: middle;
  background: color-mix(in srgb, var(--brand2) 14%, var(--card)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand2) 7%, transparent); }
html.st-moderno .h2i { background: linear-gradient(135deg, rgba(99,102,241,.2), rgba(20,184,166,.2)); }
html.st-ufficio .panel h2 { font-family: var(--of-serif); display: flex; align-items: center; flex-wrap: wrap; gap: 0; }
html.st-ufficio .panel { border: 1px solid var(--line); border-radius: var(--radius); }
/* calendario: intestazione del mese come la scheda del giorno */
html.st-ufficio .tab-mese .daytitle { flex-direction: row; justify-content: center; align-items: center; gap: 14px; }
html.st-ufficio .tab-mese .cal-tile b { font-size: 17px !important; letter-spacing: 1px !important; padding: 6px 0 7px; }
.tab-mese .cal-tile { display: none; }
html.st-ufficio .tab-mese .cal-tile { display: inline-flex; width: 58px; }
html.st-ufficio .cal-wrap { border: 1px solid var(--line); }
html.st-moderno .cal-wrap { background: var(--card); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-color: rgba(255,255,255,.65); }
html.st-moderno.dark .cal-wrap { border-color: rgba(148,163,184,.14); }
html.st-ufficio .cal .av { width: 24px; height: 24px; }
html.st-ufficio .cal th.today { background: linear-gradient(180deg, var(--brand2), var(--brand)); color: #fff; }
html.st-ufficio .cal i { border-radius: 50%; min-width: 24px; height: 24px; }
html.st-ufficio .legend { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; box-shadow: var(--shadow); }
html.st-moderno .legend { -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-color: rgba(255,255,255,.65); }
html.st-ufficio .legend i { border-radius: 50%; }
/* report: contatori ad anello, niente barre colorate in alto */
html.st-ufficio .kpi { border-top: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); border-radius: var(--radius); display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; }
html.st-ufficio .kpi b { grid-row: 1 / span 2; grid-column: 1; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; color: var(--g, var(--brand2));
  border: 3px solid color-mix(in srgb, var(--g, var(--brand2)) 65%, transparent); background: color-mix(in srgb, var(--g, var(--brand2)) 8%, var(--card)); }
html.st-moderno .kpi b { border: 0; background: conic-gradient(var(--g, var(--brand2)) 0 75%, color-mix(in srgb, var(--g, var(--brand2)) 22%, transparent) 75% 100%); position: relative; isolation: isolate; }
html.st-moderno .kpi b::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #fff; z-index: -1; } html.st-moderno.dark .kpi b::before { background: #172036; }
html.st-ufficio .kpi span { grid-column: 2; align-self: end; font-weight: 700; }
html.st-ufficio .kpi small { grid-column: 2; align-self: start; }
html.st-ufficio .bars .bt { border-radius: 999px; overflow: hidden; }
html.st-ufficio .bars .bt i { border-radius: 999px; }
html.st-moderno .bars .bt i { background-image: linear-gradient(90deg, rgba(255,255,255,.0), rgba(255,255,255,.35)) !important; background-blend-mode: overlay; }
html.st-ufficio .dl { border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
html.st-ufficio .rep th.colh { background: color-mix(in srgb, var(--g) 10%, var(--card)); }
html.st-ufficio .table-wrap { border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); }
/* inserisci (e finestre di modifica): scelte come tessere con icona in un cerchio */
html.st-ufficio .sbtn { background: var(--card); border: 1.5px solid var(--line); border-radius: 16px; padding: 12px 6px; transition: transform .15s, box-shadow .15s, border-color .15s; }
html.st-ufficio .sbtn span { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--g) 12%, var(--card)); margin-bottom: 4px; transition: transform .2s; }
@media (hover: hover) { html.st-ufficio .sbtn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(16,24,40,.10); border-color: color-mix(in srgb, var(--g) 50%, var(--line)); } html.st-ufficio .sbtn:hover span { transform: scale(1.08); } }
html.st-ufficio .sbtn.on, html.st-ufficio .sbtn.radio:has(input:checked) { border-color: var(--g); background: color-mix(in srgb, var(--g) 10%, var(--card)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--g) 18%, transparent); }
html.st-ufficio .sbtn.on span, html.st-ufficio .sbtn.radio:has(input:checked) span { background: var(--g); }
html.st-ufficio input, html.st-ufficio select, html.st-ufficio textarea { border-radius: 10px; }
html.st-moderno input, html.st-moderno select, html.st-moderno textarea { border-radius: 12px; background: rgba(255,255,255,.8); }
html.st-moderno.dark input, html.st-moderno.dark select, html.st-moderno.dark textarea { background: rgba(15,23,42,.55); }
/* finestre (modali) in vetro nello stile moderno */
html.st-moderno .sheet { background: rgba(255,255,255,.9); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
html.st-moderno.dark .sheet { background: rgba(17,24,43,.92); }
/* entrata a cascata anche sulle altre pagine */
html.st-ufficio .view.entra > * { animation: sali .5s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i, 0) * 55ms); }
html.st-ufficio .festlist { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
html.st-moderno .festlist { -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-color: rgba(255,255,255,.65); }
html.st-ufficio .c104 { border-radius: var(--radius); }
/* fuori orario: niente pallino verde, riquadro attenuato */
.group.big.chiuso .av::after { display: none !important; }
.group.big.chiuso .plist { opacity: .72; }
.fuori-orario { margin: 0 4px 8px; font-size: 13px; }

/* Manutenzione */
.manut { max-width: 460px; margin: 8vh auto 0; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 32px 22px; box-shadow: var(--shadow); }
.manut-ic { font-size: 56px; animation: vapore 2.4s ease-in-out infinite; }
.manut h2 { margin: 8px 0 6px; font-size: 24px; }
.manut p { margin: 8px 0; line-height: 1.5; }
body.in-manut .topnav, body.in-manut .bottomnav { display: none !important; }
.manut-bar { background: #b45309; color: #fff; padding: 10px 14px; border-radius: 12px; margin-bottom: 12px; font-size: 14px; }
.manut-bar .link { color: #fff; text-decoration: underline; margin-left: 6px; }
.manut-panel.on { box-shadow: 0 0 0 2px #b45309 inset, var(--shadow); }
.manut { padding: 14px 14px 22px; }
.manut-img { display: block; width: 100%; max-width: 420px; margin: 0 auto 10px; border-radius: 16px; box-shadow: 0 10px 30px rgba(30,27,75,.35); }
.manut .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* v1.9.31 — orari personali, recupero, sabato */
.kpis.k6 { grid-template-columns: repeat(3, 1fr); }
@media (min-width: 1100px) { .kpis.k6 { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 560px) { .kpis.k6 { grid-template-columns: 1fr 1fr; } .kpis.k6 .kpi:last-child { grid-column: auto; } }
.saldo-kpi b { font-size: 17px !important; }
.orari-row { margin: 6px 0 4px; }
.orari-row .row2 label { margin-top: 2px; }
.orari-row small { display: block; font-size: 12px; margin-top: 2px; }
.orari-info { margin: 6px 6px 4px; font-size: 13px; }
.tu-oggi .saldo { font-weight: 700; } .tu-oggi .saldo.neg { color: #b91c1c; } .tu-oggi .saldo.pos { color: #15803d; }
html.dark .tu-oggi .saldo.neg { color: #f87171; } html.dark .tu-oggi .saldo.pos { color: #4ade80; }
/* giorno futuro: "DOMANI SCENDONO" grande e rosso */
.scendono { color: #dc2626 !important; font-size: 22px; font-weight: 900; letter-spacing: .5px; font-family: 'Plus Jakarta Sans', system-ui, sans-serif !important; }
html.dark .scendono { color: #f87171 !important; }
@media (max-width: 480px) { .scendono { font-size: 19px; } }
.group h3 .scendono + small { font-weight: 600; font-size: 13px; margin-left: 4px; }
.group.big.futuro .av::after { display: none !important; }
@media (max-width: 480px) { .scendono { font-size: 15.5px; letter-spacing: .2px; } .group h3 .scendono + small { display: block; margin: 2px 0 0; } }

/* Calendario: la riga dell'operatore collegato e' evidenziata */
.cal tr.mia th.sticky, .cal tr.mia td { background: color-mix(in srgb, #f59e0b 16%, var(--card)) !important; }
.cal tr.mia td.today { background: color-mix(in srgb, #f59e0b 26%, var(--card)) !important; }
.cal tr.mia th.sticky { box-shadow: inset 4px 0 0 #f59e0b; color: var(--ink); }
.cal tr.mia th, .cal tr.mia td { border-top: 2px solid #f59e0b; border-bottom: 2px solid #f59e0b; }
.cal .tu-tag { display: inline-block; margin-left: 6px; background: #f59e0b; color: #fff; font-size: 9.5px; font-weight: 900; letter-spacing: 1px; padding: 2px 6px; border-radius: 999px; vertical-align: middle; }
html.dark .cal tr.mia th.sticky, html.dark .cal tr.mia td { background: color-mix(in srgb, #f59e0b 20%, #172036) !important; }
/* colonna dei nomi del calendario: sfondo pieno (con lo stile Moderno era trasparente e si vedevano i giorni sotto) */
html.st-moderno .cal .sticky { background: #ffffff; }
html.st-moderno.dark .cal .sticky { background: #172036; }
.cal tr.mia th.sticky { background: color-mix(in srgb, #f59e0b 16%, #ffffff) !important; }
html.dark .cal tr.mia th.sticky { background: color-mix(in srgb, #f59e0b 20%, #172036) !important; }
/* 🍀 fortunati del giorno */
.fortuna { font-size: 12.5px; font-weight: 600; color: #15803d; background: color-mix(in srgb, #22c55e 12%, transparent); border: 1px dashed color-mix(in srgb, #22c55e 45%, transparent); border-radius: 10px; padding: 5px 9px; margin: 0 0 8px; line-height: 1.5; }
html.dark .fortuna { color: #86efac; }
.quadrifoglio { display: inline-block; animation: vapore 2.6s ease-in-out infinite; }
/* Sedi (Nolana, Don Bosco…) */
.sede-h { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin: 8px 6px 4px; }
.sede-h small { background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; font-size: 11px; }
.sede-h:first-child { margin-top: 2px; }
.sede-h.sede-princ { color: #dc2626; border-left: 4px solid #dc2626; padding-left: 8px; }
.sede-h.sede-princ small { background: #dc2626; border-color: #dc2626; color: #fff; }
small.sede-princ { color: #dc2626; font-weight: 800; }
html.dark .sede-h.sede-princ, html.dark small.sede-princ { color: #f87171; } html.dark .sede-h.sede-princ { border-left-color: #f87171; }
.ospite { color: #b45309; font-weight: 700; } html.dark .ospite { color: #fbbf24; }
.sede-row small { display: block; margin-top: 3px; font-size: 12px; }
.sede-sel { width: auto; min-height: 34px; padding: 4px 8px; margin: 0; font-size: 13px; }
/* v1.9.43 — 📖 Angolo svago */
.fr-svago { display: inline-flex; margin-top: 8px; border: 0; border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
  background: color-mix(in srgb, var(--brand2) 16%, var(--card)); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.fr-svago:hover { filter: brightness(1.05); }
.svago-mini { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: var(--shadow); }
.svago { position: fixed; inset: 0; z-index: 9000; display: flex; flex-direction: column; gap: 12px; padding: max(14px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background: radial-gradient(120% 80% at 0% 0%, #fde68a 0%, transparent 55%), radial-gradient(120% 80% at 100% 100%, #c4b5fd 0%, transparent 55%), linear-gradient(160deg, #fff7ed, #eef2ff);
  color: #1f2937; overflow-y: auto; animation: svIn .3s ease; }
html.dark .svago { background: radial-gradient(120% 80% at 0% 0%, #78350f 0%, transparent 55%), radial-gradient(120% 80% at 100% 100%, #4c1d95 0%, transparent 55%), linear-gradient(160deg, #111827, #1e1b4b); color: #f3f4f6; }
@keyframes svIn { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }
.svago > * { width: 100%; max-width: 760px; margin-left: auto; margin-right: auto; }
.sv-top { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 10px; }
.sv-top b { font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.sv-sub { grid-column: 1; font-size: 13px; opacity: .7; }
.sv-chiudi { grid-row: 1 / span 2; grid-column: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0,0,0,.08); color: inherit; font-size: 16px; cursor: pointer; }
html.dark .sv-chiudi { background: rgba(255,255,255,.14); }
.sv-cats { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.sv-cats::-webkit-scrollbar { display: none; }
.sv-cat { flex: 0 0 auto; border: 1px solid rgba(0,0,0,.08); background: rgba(255,255,255,.7); color: inherit; border-radius: 999px; padding: 7px 13px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; backdrop-filter: blur(6px); }
html.dark .sv-cat { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); }
.sv-cat.on { background: #1f2937; color: #fff; border-color: #1f2937; }
html.dark .sv-cat.on { background: #fbbf24; color: #1f2937; border-color: #fbbf24; }
.sv-cerca { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.75); border: 1px solid rgba(0,0,0,.08); border-radius: 14px; padding: 0 12px; backdrop-filter: blur(6px); }
html.dark .sv-cerca { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); }
.sv-cerca input { flex: 1; border: 0 !important; background: transparent !important; box-shadow: none !important; color: inherit; font: inherit; font-size: 15px; padding: 11px 0; outline: none; min-width: 0; }
.sv-scena { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 260px; cursor: pointer; user-select: none; }
.sv-card { --h: 30; position: relative; width: 100%; border-radius: 28px; padding: 46px 28px 26px; color: #fff; overflow: hidden;
  background: linear-gradient(135deg, hsl(var(--h) 85% 55%), hsl(calc(var(--h) + 50) 80% 45%)); box-shadow: 0 18px 40px -12px hsl(var(--h) 70% 35% / .55); transition: background .5s ease; }
.sv-card::after { content: ''; position: absolute; width: 220px; height: 220px; right: -60px; top: -70px; border-radius: 50%; background: rgba(255,255,255,.14); }
.sv-card.in-r { animation: svR .35s ease; } .sv-card.in-l { animation: svL .35s ease; }
@keyframes svR { from { opacity: 0; transform: translateX(30px) rotate(1deg); } to { opacity: 1; transform: none; } }
@keyframes svL { from { opacity: 0; transform: translateX(-30px) rotate(-1deg); } to { opacity: 1; transform: none; } }
.sv-q { position: absolute; left: 20px; top: -6px; font-size: 96px; line-height: 1; font-family: Georgia, serif; opacity: .35; }
.sv-chi { position: relative; display: block; font-size: 13px; font-weight: 700; opacity: .9; margin-bottom: 6px; }
.sv-card p { position: relative; margin: 0; font-size: clamp(20px, 5.4vw, 30px); line-height: 1.38; font-weight: 700; letter-spacing: -.2px; text-wrap: pretty; }
.sv-num { position: relative; margin-top: 18px; font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; opacity: .8; }
.sv-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.18); }
.sv-prog i { display: block; height: 100%; width: 0; background: rgba(255,255,255,.85); }
@keyframes svP { from { width: 0; } to { width: 100%; } }
.sv-ctrl { display: flex; justify-content: center; gap: 14px; }
.sv-b { width: 56px; height: 56px; border-radius: 50%; border: 0; background: rgba(255,255,255,.85); color: #1f2937; font-size: 20px; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.12); transition: transform .15s; }
.sv-b:active { transform: scale(.92); }
.sv-b.sv-play { width: 64px; height: 64px; font-size: 24px; background: #1f2937; color: #fff; }
html.dark .sv-b { background: rgba(255,255,255,.12); color: #fff; } html.dark .sv-b.sv-play { background: #fbbf24; color: #1f2937; }
.sv-azioni { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.sv-azioni .btn { background: rgba(255,255,255,.8); color: #1f2937; border-color: rgba(0,0,0,.08); }
.sv-azioni .btn.on { background: #fee2e2; color: #b91c1c; }
html.dark .sv-azioni .btn { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.15); }
@media (min-width: 900px) { .sv-card { padding: 60px 54px 34px; } .sv-q { left: 34px; } .svago { padding-top: 28px; } }
/* v1.9.46 — 📣 popup novità */
.novita-pop { z-index: 9500; }
.nov-box { width: min(420px, 100%); text-align: left; max-height: 88vh; overflow-y: auto; padding: 22px; }
.nov-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nov-top small { color: var(--muted); font-size: 12px; }
.nov-tag { background: linear-gradient(120deg, #f59e0b, #ec4899); color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .5px; border-radius: 999px; padding: 4px 10px; }
.nov-item { display: grid; gap: 6px; padding: 12px 0 4px; border-top: 1px solid var(--line); }
.nov-item:first-of-type { border-top: 0; }
.nov-item .pop-ic { font-size: 40px; text-align: center; }
.nov-item b { font-size: 18px; text-align: center; }
.nov-item p { margin: 0; font-size: 15px; line-height: 1.45; }
.nov-item ol { margin: 4px 0 0; padding-left: 20px; font-size: 14px; line-height: 1.45; color: var(--muted); display: grid; gap: 4px; }
.nov-box .btn.primary { margin-top: 6px; font-size: 16px; padding: 12px; }
.nov-box, html.st-moderno .nov-box { background: #ffffff !important; backdrop-filter: none !important; color: #1f2937; }
html.dark .nov-box, html.dark.st-moderno .nov-box { background: #1e2433 !important; color: #f1f5f9; }
.nov-item p b, .nov-item li b { font-size: inherit; text-align: left; color: inherit; }
.novita-pop { backdrop-filter: blur(3px); }
/* v1.9.47 — ☕ chi viene al caffè */
.caffe-ask { z-index: 9400; backdrop-filter: blur(3px); }
.ca-box, html.st-moderno .ca-box { position: relative; background: #fff !important; color: #1f2937; width: min(360px, 100%); padding: 26px 22px 22px; gap: 8px; backdrop-filter: none !important; }
html.dark .ca-box, html.dark.st-moderno .ca-box { background: #1e2433 !important; color: #f1f5f9; }
.ca-tazza { font-size: 64px; line-height: 1; animation: caDondola 1.2s ease-in-out infinite; }
@keyframes caDondola { 0%,100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg) scale(1.05); } }
.ca-box b { font-size: 19px; }
.ca-box small { color: #6b7280; } html.dark .ca-box small { color: #94a3b8; }
.ca-dom { margin: 6px 0 2px; font-size: 16px; font-weight: 700; }
.ca-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ca-btns .btn { padding: 14px 8px; font-size: 16px; font-weight: 800; border-radius: 14px; border: 0; }
.ca-si { background: linear-gradient(135deg, #92400e, #b45309) !important; color: #fff !important; }
.ca-no { background: #f1f5f9 !important; color: #334155 !important; } html.dark .ca-no { background: #334155 !important; color: #f1f5f9 !important; }
.ca-x { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(0,0,0,.07); color: inherit; cursor: pointer; }
html.dark .ca-x { background: rgba(255,255,255,.12); }
.ca-chi { margin: 4px 0 10px; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, #b45309 10%, var(--card)); border: 1px solid color-mix(in srgb, #b45309 28%, transparent); display: grid; gap: 6px; }
.ca-chi-t { font-size: 13.5px; font-weight: 700; }
.ca-chi-l { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; }
.ca-ok { color: #15803d; font-weight: 700; } .ca-ko { color: #b91c1c; } html.dark .ca-ok { color: #4ade80; } html.dark .ca-ko { color: #f87171; }
.ca-chi-b { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ca-chi-b .btn.on { background: #b45309; color: #fff; border-color: #b45309; }
/* v1.9.49 — dettaglio saldo recupero */
.tu-oggi .saldo-link { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.saldo-lista { display: grid; gap: 0; max-height: 50vh; overflow: auto; }
.saldo-r { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.saldo-r:first-child { border-top: 0; }
.saldo-r span { display: grid; gap: 2px; }
.saldo-r .pos, .saldo-tot .pos { color: #15803d; } .saldo-r .neg, .saldo-tot .neg { color: #b91c1c; }
html.dark .saldo-r .pos, html.dark .saldo-tot .pos { color: #4ade80; } html.dark .saldo-r .neg, html.dark .saldo-tot .neg { color: #f87171; }
.saldo-tot { margin-top: 8px; padding-top: 10px; border-top: 2px solid var(--line); text-align: right; font-size: 15px; }
/* v1.9.51 — ore di permesso (Feo / ingresso) */
.cperm { margin: 6px 0 8px; padding: 8px 12px; border-radius: 12px; font-size: 13.5px; cursor: pointer; background: color-mix(in srgb, #9333ea 10%, var(--card)); border: 1px solid color-mix(in srgb, #9333ea 28%, transparent); }
.cperm[data-perm="permesso_ingresso"] { background: color-mix(in srgb, #0284c7 10%, var(--card)); border-color: color-mix(in srgb, #0284c7 28%, transparent); }
.cperm .q { color: #b45309; font-weight: 700; }
.tu-oggi ~ .cperm { margin: 6px 4px 0; }
/* v1.9.52 — Feo: ogni 7:48 una giornata di congedo */
.cperm-g { margin-top: 4px; font-size: 13px; }
.feo-giorn { margin-top: 10px; padding: 10px 12px; border-radius: 12px; display: grid; gap: 4px; font-size: 14px; background: color-mix(in srgb, #f59e0b 14%, var(--card)); border: 1px solid color-mix(in srgb, #f59e0b 35%, transparent); }
.saldo-r .scatta { color: #b45309; } html.dark .saldo-r .scatta { color: #fbbf24; }
.feo-pop { z-index: 9450; }
/* v1.9.53 — ferie dell'anno */
.cferie { margin: 6px 0 8px; padding: 8px 12px; border-radius: 12px; font-size: 13.5px; background: color-mix(in srgb, #16a34a 10%, var(--card)); border: 1px solid color-mix(in srgb, #16a34a 28%, transparent); }
.cferie.poche { background: color-mix(in srgb, #f59e0b 14%, var(--card)); border-color: color-mix(in srgb, #f59e0b 35%, transparent); }
.cferie.neg { background: color-mix(in srgb, #dc2626 12%, var(--card)); border-color: color-mix(in srgb, #dc2626 35%, transparent); }
.cferie .q { color: #b45309; font-weight: 700; }
.tu-oggi ~ .cferie { margin: 6px 4px 0; }
.ferie-in { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; margin: 0; }
.ferie-in input { width: 60px !important; flex: 0 0 60px !important; min-height: 34px; padding: 4px 6px; margin: 0; text-align: center; }
.ferie-in small { color: var(--muted); font-size: 11px; }
/* v1.9.54 — report personale */
.rep-solo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
/* v1.9.55 — chiede i giorni di ferie */
.ferie-pop { z-index: 9300; }
.ferie-ask { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 16px; font-weight: 700; margin-top: 6px; }
.ferie-ask input { width: 110px !important; flex: 0 0 110px !important; font-size: 24px; text-align: center; font-weight: 800; }
.cferie[data-ferieask] { cursor: pointer; }
/* v1.9.56 — prospetto ferie come l'azienda */
.ferie-form { display: grid; gap: 8px; margin-top: 4px; }
.ferie-form label { display: grid; grid-template-columns: 1fr 120px; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; margin: 0; }
.ferie-form label small { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; }
.ferie-form input { width: 120px !important; margin: 0; text-align: right; font-weight: 700; }
.ferie-saldo { margin-top: 8px; padding-top: 8px; border-top: 2px solid var(--line); text-align: right; font-size: 17px; }
.ferie-tab { width: 100%; border-collapse: collapse; font-size: 15px; margin: 6px 0 8px; }
.ferie-tab th, .ferie-tab td { border: 1px solid var(--line); padding: 7px 10px; text-align: right; }
.ferie-tab th:first-child, .ferie-tab td:first-child { text-align: left; font-family: ui-monospace, Consolas, monospace; font-size: 13.5px; }
.ferie-tab thead th { background: color-mix(in srgb, #16a34a 12%, var(--card)); }
.ferie-tab tr.tot td { font-weight: 800; background: color-mix(in srgb, #16a34a 10%, var(--card)); }
.ferie-tab tr.tot.neg td { background: color-mix(in srgb, #dc2626 12%, var(--card)); }
.cferie[data-ferieapri] { cursor: pointer; }
.ferie-form label { display: grid !important; grid-template-columns: 1fr 112px !important; }
.ferie-form label span { display: block; }
.ferie-form input { width: 112px !important; max-width: 112px; }
/* v1.9.57 — segno del residuo */
.res-wrap { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.res-wrap .res-seg { min-width: 38px; min-height: 38px; padding: 0; font-size: 18px; font-weight: 800; }
.ferie-form .res-wrap input { width: 82px !important; max-width: 82px; }
.ferie-form label:has(.res-wrap) { grid-template-columns: 1fr 130px !important; }
/* v1.9.60 — consulente */
.cons-tag { font-size: 13px; margin-left: 2px; }
/* v1.9.61 — uscita oltre orario con il Permesso ingresso */
.orari-row.solo-uscita .lab-entra { display: none; }
.orari-row .txt-ingr { display: none; } .orari-row.solo-uscita .txt-ingr { display: inline; } .orari-row.solo-uscita .txt-norm { display: none; }
/* v1.9.62 — ritardi da recuperare entro 1 mese */
.tu-oggi .saldo.urg { background: #fee2e2; border-radius: 6px; padding: 1px 6px; } html.dark .tu-oggi .saldo.urg { background: #7f1d1d; }
.crecup { display: flex; align-items: center; gap: 12px; margin: 8px 4px 0; padding: 12px 14px; border-radius: 16px; cursor: pointer; font-size: 14.5px; line-height: 1.4;
  background: color-mix(in srgb, #f59e0b 14%, var(--card)); border: 1px solid color-mix(in srgb, #f59e0b 40%, transparent); }
.crecup.urg { background: color-mix(in srgb, #dc2626 13%, var(--card)); border-color: color-mix(in srgb, #dc2626 40%, transparent); }
.crecup .crec-ic { font-size: 30px; line-height: 1; }
.crecup > div { flex: 1; min-width: 0; }
.crecup b { font-size: 15.5px; }
.crecup .crec-scad { margin-top: 4px; color: #b91c1c; font-weight: 700; } html.dark .crecup .crec-scad { color: #f87171; }
.crecup .crec-h { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.crecup .crec-go { font-size: 22px; color: var(--muted); }
/* v1.9.64 — minuti da recuperare lampeggianti */
.crec-min { display: inline-block; padding: 0 7px; border-radius: 8px; color: #fff; background: #dc2626; font-weight: 800; animation: crecBlink 1s ease-in-out infinite; }
@keyframes crecBlink { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .25; transform: scale(.96); } }
/* v1.9.66 — entrata/uscita rapida in "Tu oggi" */
.orario-rap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 8px 4px 0; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.orap-f { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 14px; font-weight: 700; }
.orap-f input { width: 104px !important; min-height: 38px; padding: 4px 8px; margin: 0; font-size: 15px; font-weight: 700; }
.orap-fisso b { font-size: 15px; } .orap-fisso small { color: var(--muted); font-weight: 500; }
.orap-ora { border: 1px solid var(--line); background: color-mix(in srgb, var(--brand2) 10%, var(--card)); color: var(--ink); border-radius: 999px; padding: 6px 10px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.orap-h { flex-basis: 100%; color: var(--muted); font-size: 12px; }
@media (max-width: 520px) { .orap-f { flex: 1 1 100%; justify-content: space-between; } .orap-f input { flex: 1; width: auto !important; } }
/* v1.9.70 — promemoria 5 minuti entrata/uscita */
.prom-rit { position: fixed; left: 50%; transform: translateX(-50%); top: max(12px, env(safe-area-inset-top)); z-index: 9200; width: min(440px, calc(100% - 24px)); display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 16px; background: #fff; color: #1f2937; border: 2px solid #dc2626; box-shadow: 0 14px 36px rgba(0,0,0,.25); font-size: 14.5px; line-height: 1.4; animation: promIn .3s ease-out; }
@keyframes promIn { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.prom-rit.ok { border-color: #16a34a; }
html.dark .prom-rit { background: #1e2433; color: #f1f5f9; }
.prom-rit .pr-ic { font-size: 28px; }
.prom-rit > div { flex: 1; }
.prom-rit button { border: 0; background: rgba(0,0,0,.07); color: inherit; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; }
.pr-piu { display: inline-block; padding: 0 7px; border-radius: 8px; color: #fff; background: #16a34a; font-weight: 800; }
@media (min-width: 900px) { .prom-rit { top: 18px; } }
/* v1.9.71 — minuti in più (banca ore) e Permesso a recupero */
.crecup.ok { background: color-mix(in srgb, #16a34a 12%, var(--card)); border-color: color-mix(in srgb, #16a34a 38%, transparent); }
.feo-giorn.banca { background: color-mix(in srgb, #16a34a 10%, var(--card)); border-color: color-mix(in srgb, #16a34a 30%, transparent); }
.banca-mov { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; }
.feo-giorn .pos, .banca-mov .pos { color: #15803d; } .banca-mov .neg { color: #b91c1c; }

/* =====================================================================
   Stile "Sobrio" (predefinito dalla 1.9.77): grafica seria, piatta, senza
   sfumature; intestazione scura, card con bordo sottile, etichette in
   maiuscoletto, un solo rosso per Nolana. Vale per tutte le schermate.
   ===================================================================== */
html.st-sobrio { --bg: #f4f5f7; --card: #ffffff; --ink: #111827; --muted: #6b7280; --line: #e3e6eb; --soft: #f9fafb;
  --brand: #111827; --brand2: #1f2937; --radius: 10px; --shadow: none; --of-head: #f9fafb; --of-ink2: #111827; --of-serif: inherit; --sob-red: #b91c1c; }
html.st-sobrio.dark { --bg: #0d1117; --card: #161b22; --ink: #e6edf3; --muted: #8b949e; --line: #2a313c; --soft: #11161d; --brand: #e6edf3; --brand2: #c9d1d9; --of-head: #11161d; --of-ink2: #e6edf3; --sob-red: #f87171; }
html.st-sobrio, html.st-sobrio body { font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; background: var(--bg); }
html.st-sobrio b, html.st-sobrio strong { font-weight: 700; }
/* intestazione */
html.st-sobrio .topbar { background: #111827; border-bottom: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; color: #fff; }
html.st-sobrio .topbar::before, html.st-sobrio .topbar::after { display: none; }
html.st-sobrio .brand img { border-radius: 8px; }
html.st-sobrio .brand b, html.st-sobrio .brand b * { color: #fff; font-family: inherit; font-weight: 700; letter-spacing: .1px; }
html.st-sobrio .brand-tag { color: #9ca3af; letter-spacing: 1.6px; font-style: normal; }
html.st-sobrio .brand small { color: #9ca3af; }
html.st-sobrio .topnav button { color: #9ca3af; border-radius: 6px; font-weight: 600; }
html.st-sobrio .topnav button:hover { background: #1f2937; color: #fff; }
html.st-sobrio .topnav button.active { background: #1f2937; color: #fff; box-shadow: none; }
html.st-sobrio .user-chip { background: #1f2937; border-color: #374151; color: #fff; }
html.st-sobrio .bottomnav { background: var(--card); -webkit-backdrop-filter: none; backdrop-filter: none; border-top: 1px solid var(--line); }
html.st-sobrio .bottomnav button span { filter: grayscale(1); opacity: .55; }
html.st-sobrio .bottomnav button.active { color: var(--ink); }
html.st-sobrio .bottomnav button.active span { filter: grayscale(1); opacity: 1; }
html.st-sobrio .bottomnav button.active::before { background: var(--ink); box-shadow: none; }
/* superfici: tutte piatte con bordo sottile */
html.st-sobrio .panel, html.st-sobrio .group, html.st-sobrio .tu-oggi, html.st-sobrio .frase, html.st-sobrio .relax, html.st-sobrio .rich,
html.st-sobrio .pend, html.st-sobrio .cal-wrap, html.st-sobrio .legend, html.st-sobrio .festlist, html.st-sobrio .kpi, html.st-sobrio .avvisi, html.st-sobrio .relax-mini {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
html.st-sobrio .group { border-left: 1px solid var(--line); padding: 0; overflow: hidden; }
html.st-sobrio .group > h3 { margin: 0; padding: 11px 14px; background: transparent; border-bottom: 1px solid var(--line); font-family: inherit; font-size: 12px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase; color: var(--ink); }
html.st-sobrio .group > h3 .gi { display: none; }
html.st-sobrio .group > h3::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--g); flex: none; }
html.st-sobrio .group .count { background: transparent; color: var(--muted); border: 0; font-weight: 600; min-width: 0; padding: 0; clip-path: none; border-radius: 0; height: auto; }
html.st-sobrio .group > .person, html.st-sobrio .group .plist, html.st-sobrio .group > .empty, html.st-sobrio .group > p { margin-left: 8px; margin-right: 8px; }
html.st-sobrio .group > .person:first-of-type, html.st-sobrio .group .plist:first-of-type { margin-top: 6px; }
html.st-sobrio .group > :last-child { margin-bottom: 8px; }
html.st-sobrio .person { border-radius: 6px; }
html.st-sobrio .chip { border-radius: 4px; font-weight: 600; font-size: 12px; background: color-mix(in srgb, var(--g) 10%, transparent); }
html.st-sobrio .av { font-weight: 600; }
html.st-sobrio .sez-t { text-transform: uppercase; font-size: 11.5px; letter-spacing: 1.5px; color: var(--muted); font-weight: 700; font-family: inherit; }
html.st-sobrio .sez-t::before { content: ""; width: 14px; height: 2px; background: var(--muted); border-radius: 0; transform: none; }
/* bottoni e campi */
html.st-sobrio .btn, html.st-sobrio .chip, html.st-sobrio .ropz, html.st-sobrio .caffe-btn, html.st-sobrio .rich-btn, html.st-sobrio .relax-mini { border-radius: 6px; }
html.st-sobrio .btn.primary { background: #111827; color: #fff; border: 0; box-shadow: none; }
html.st-sobrio.dark .btn.primary { background: #e6edf3; color: #0d1117; }
html.st-sobrio .btn.ghost { background: var(--card); border: 1px solid var(--line); }
html.st-sobrio .btn.ghost:hover { border-color: var(--ink); }
html.st-sobrio .icon-btn { border-radius: 6px; }
html.st-sobrio .link { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
html.st-sobrio input, html.st-sobrio select, html.st-sobrio textarea { border-radius: 6px; background: var(--card); }
html.st-sobrio input:focus, html.st-sobrio select:focus, html.st-sobrio textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 12%, transparent); }
html.st-sobrio .sheet { background: var(--card); -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 12px 12px 0 0; }
html.st-sobrio .sheet h3, html.st-sobrio .panel h2 { font-family: inherit; font-weight: 700; letter-spacing: -.2px; }
html.st-sobrio .sheet h4 { font-size: 11.5px; letter-spacing: 1.4px; }
html.st-sobrio .caffe-btn { background: #3f2a1d; } html.st-sobrio .rich-btn { background: #7f1d1d; }
/* testata del giorno / del mese: niente "tabellone" a led, titolo grande e pulito */
html.st-sobrio .tabellone { background: transparent; border: 0; border-bottom: 1px solid var(--line); box-shadow: none; border-radius: 0; padding: 4px 2px 12px; color: var(--ink); }
html.st-sobrio .tab-head { color: var(--muted); letter-spacing: 1.5px; font-size: 11px; }
html.st-sobrio .tab-clock { background: #111827; color: #fff; border: 0; text-shadow: none; font-family: inherit; font-weight: 700; border-radius: 6px; font-variant-numeric: tabular-nums; }
html.st-sobrio.dark .tab-clock { background: #e6edf3; color: #0d1117; }
html.st-sobrio .tabellone .daytitle b { font-family: inherit; color: var(--ink); text-shadow: none; text-transform: capitalize; letter-spacing: -.4px; font-size: 24px; font-weight: 700; }
html.st-sobrio .tabellone .icon-btn { background: var(--card); border: 1px solid var(--line); color: var(--ink); }
html.st-sobrio .tabellone .cal-hint { color: var(--muted); }
html.st-sobrio .cal-tile { box-shadow: none; border: 1px solid var(--line); border-radius: 6px; }
html.st-sobrio .cal-tile i { background: var(--sob-red); }
html.st-sobrio .tabellone .orario { color: var(--muted); border-top: 0; }
html.st-sobrio .tabellone .orario.aperto b { color: #15803d; } html.st-sobrio .tabellone .orario.chiuso b { color: var(--sob-red); }
html.st-sobrio .tabellone .link { color: var(--ink); }
html.st-sobrio .toolrow { margin: 12px 0; justify-content: flex-start; }
html.st-sobrio .toolrow .btn { min-width: 0; }
/* contatori: una striscia unica con divisori (niente card colorate) */
html.st-sobrio .stats { gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
html.st-sobrio .stat { background: transparent; border: 0; border-right: 1px solid var(--line); border-radius: 0; box-shadow: none; text-align: left; padding: 12px 14px; }
html.st-sobrio .stat:last-child { border-right: 0; }
html.st-sobrio .stat b { background: none; color: var(--ink); font-family: inherit; font-weight: 700; font-size: 28px; text-shadow: none; width: auto; height: auto; display: block; border: 0; font-variant-numeric: tabular-nums; }
html.st-sobrio .stat b::before { display: none; }
html.st-sobrio .stat span { display: flex; align-items: center; gap: 6px; text-transform: uppercase; letter-spacing: 1.2px; font-size: 10.5px; font-weight: 700; color: var(--muted); margin-top: 4px; }
html.st-sobrio .stat span::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--g); flex: none; }
html.st-sobrio .tu-oggi { clip-path: none; }
html.st-sobrio .tu-oggi .tu-btn { background: transparent; border: 1px solid var(--line); color: var(--ink); border-radius: 6px; }
html.st-sobrio .tu-oggi .tu-t > small:first-child { font-family: inherit; }
html.st-sobrio .sede-h.sede-princ { color: var(--sob-red); border-left-color: var(--sob-red); }
/* calendario del mese */
html.st-sobrio .cal { font-size: 12px; font-variant-numeric: tabular-nums; }
html.st-sobrio .cal thead th { background: var(--soft); color: var(--ink); font-weight: 700; border-bottom: 1px solid var(--line); } /* giorni in nero, leggibili anche sul PC */
html.st-sobrio .cal thead th:not(.today):not(.fest) small { color: var(--ink); opacity: .8; }
html.st-sobrio .cal thead th small { text-transform: uppercase; letter-spacing: .5px; font-size: 9.5px; }
html.st-sobrio .cal .sticky { background: var(--card); font-weight: 600; }
html.st-sobrio .cal thead .sticky { background: var(--soft); text-transform: uppercase; letter-spacing: 1.2px; font-size: 10.5px; color: var(--muted); }
html.st-sobrio .cal th.today { background: #111827; color: #fff; border-radius: 0; }
html.st-sobrio.dark .cal th.today { background: #e6edf3; color: #0d1117; }
html.st-sobrio .cal td.today { background: color-mix(in srgb, #111827 5%, transparent); box-shadow: inset 1px 0 0 #111827, inset -1px 0 0 #111827; }
html.st-sobrio .cal .off { background: repeating-linear-gradient(135deg, transparent 0 5px, color-mix(in srgb, var(--line) 55%, transparent) 5px 6px); }
html.st-sobrio .cal th.fest { background: color-mix(in srgb, var(--sob-red) 12%, var(--card)); color: var(--sob-red); }
html.st-sobrio .cal td.fest { background: color-mix(in srgb, var(--sob-red) 6%, transparent); }
html.st-sobrio .cal i, html.st-sobrio .legend i { border-radius: 3px; font-weight: 700; font-size: 10px; min-width: 22px; height: 20px; }
html.st-sobrio .cal i.pres { opacity: 1; background: transparent !important; color: color-mix(in srgb, var(--ink) 30%, transparent); font-weight: 500; }
html.st-sobrio .cal tr.mia th.sticky { box-shadow: inset 3px 0 0 var(--sob-red); }
html.st-sobrio .legend { padding: 10px 12px; }
html.st-sobrio .tu-tag { background: var(--sob-red); border-radius: 3px; }
/* report */
html.st-sobrio .kpi { border-top: 1px solid var(--line); }
html.st-sobrio .kpi b { background: none; color: var(--ink); width: auto; height: auto; display: block; font-variant-numeric: tabular-nums; }
html.st-sobrio .kpi b::before { display: none; }
html.st-sobrio .kpi span { text-transform: uppercase; letter-spacing: 1.2px; font-size: 10.5px; display: flex; align-items: center; gap: 6px; }
html.st-sobrio .kpi span::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--g, var(--ink)); }
html.st-sobrio .rep th { font-weight: 600; } html.st-sobrio .rep thead th { background: var(--soft); text-transform: uppercase; font-size: 10.5px; letter-spacing: 1px; color: var(--muted); }
html.st-sobrio .bars .bt i { background-image: none !important; }
html.st-sobrio .h2i { background: var(--soft); border: 1px solid var(--line); }
html.st-sobrio .auth-wrap { background: var(--bg); }
html.st-sobrio .cal tr.mia th.sticky, html.st-sobrio .cal tr.mia td { background: var(--soft) !important; }
html.st-sobrio .cal tr.mia td.today { background: color-mix(in srgb, #111827 7%, var(--card)) !important; }
html.st-sobrio .cal tr.mia th, html.st-sobrio .cal tr.mia td { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
html.st-sobrio .cal tr.mia th.sticky { box-shadow: inset 3px 0 0 var(--sob-red); }
html.st-sobrio.dark .cal tr.mia th.sticky, html.st-sobrio.dark .cal tr.mia td { background: var(--soft) !important; }

/* ---- Pianta dell'ufficio (schermata Oggi) ---- */
.pianta { --pi-line: #d1d5db; --pi-floor: #fafafa; --pi-warn: #a16207; --pi-red: #b91c1c; margin: 2px 0 4px; }
html.dark .pianta { --pi-line: #3a4250; --pi-floor: #12171e; --pi-warn: #fbbf24; --pi-red: #f87171; }
.group.big:has(.pianta) { padding: 0; border: 0; background: transparent; box-shadow: none; }
.group.big:has(.pianta) > h3 { display: none; }
.pi-h { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; }
.pi-h h3 { margin: 0; font-size: 12.5px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--pi-red); }
.pi-h span { margin-left: auto; font-size: 12.5px; color: var(--muted); } .pi-h span b { color: var(--ink); }
.pi-h .link { font-size: 12.5px; }
.pianta > :last-child { border-radius: 0 0 10px 10px; }
.pi-room { position: relative; background: linear-gradient(transparent 23px, color-mix(in srgb, var(--pi-line) 30%, transparent) 24px) 0 0 / 24px 24px, linear-gradient(90deg, transparent 23px, color-mix(in srgb, var(--pi-line) 30%, transparent) 24px) 0 0 / 24px 24px, var(--pi-floor); }
.pi-sopra { display: flex; align-items: flex-end; gap: 14px; padding: 30px 18px 16px; border: 1px solid var(--line); border-bottom: 2px dashed var(--pi-line); background-color: var(--pi-floor); }
.pi-sopra .pi-fill { flex: 1; }
.pi-sopra .pi-desk { width: min(190px, 40%); }
.pi-sala { padding: 30px 18px 46px; border: 1px solid var(--line); border-top: 0; }
.pi-zone { position: absolute; top: 9px; left: 18px; font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); opacity: .8; }
.pi-z2 { position: static; margin: 26px 0 10px; }
.pi-isola { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 4px; max-width: 620px; margin: 6px auto 0; padding: 0 22px; }
.pi-altri { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; }
.pi-door { position: absolute; bottom: -1px; left: 50%; width: 64px; margin-left: -32px; height: 3px; background: var(--card); }
.pi-door::after { content: "INGRESSO"; position: absolute; top: -15px; left: -10px; right: -10px; text-align: center; font-size: 8.5px; letter-spacing: 1.4px; color: var(--muted); font-weight: 700; }
.pi-uffici { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-top: 0; }
.pi-stanza { padding: 30px 14px 40px; border-right: 1px solid var(--line); }
.pi-stanza:last-child { border-right: 0; }
.pi-stanza .pi-desk { max-width: 190px; margin: 0 auto; }
/* scrivania */
.pi-desk { position: relative; display: block; width: 100%; height: 100px; border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: center; }
.pi-desk:disabled { cursor: default; }
.pi-tbl { position: absolute; left: 0; right: 0; top: 0; height: 44px; border: 1.5px solid var(--pi-line); border-radius: 4px; background: var(--card); }
.pi-tbl::before { content: ""; position: absolute; left: 50%; top: 7px; width: 30px; margin-left: -15px; height: 4px; border-radius: 2px; background: var(--pi-line); }
.pi-chair { position: absolute; left: 50%; top: 48px; width: 28px; height: 11px; margin-left: -14px; border: 1.5px solid var(--pi-line); border-top: 0; border-radius: 0 0 8px 8px; }
.pi-p { position: absolute; left: 50%; top: 32px; width: 34px; height: 34px; margin-left: -17px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 12.5px; box-shadow: 0 0 0 3px var(--card), 0 2px 6px rgba(0,0,0,.22); z-index: 2; }
.pi-nm { position: absolute; left: -4px; right: -4px; top: 68px; line-height: 1.25; }
.pi-nm b { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pi-nm small { display: block; font-size: 10.5px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pi-nota { font-style: normal; color: var(--pi-red); text-transform: uppercase; letter-spacing: .6px; font-weight: 700; }
.pi-desk.occ .pi-tbl { border-color: color-mix(in srgb, var(--ink) 40%, var(--pi-line)); }
.pi-desk.occ .pi-tbl::before { background: var(--ink); }
.pi-desk.occ .pi-nm b { color: var(--ink); }
.pi-desk.occ .pi-nm small { color: var(--ink2, var(--muted)); }
.pi-desk:not(:disabled):hover .pi-tbl { border-color: var(--ink); }
.pi-desk.vuota { cursor: default; }
.pi-badge { position: absolute; right: 5px; top: 5px; font-style: normal; font-size: 9.5px; font-weight: 700; color: var(--pi-warn); background: var(--card); border: 1px solid color-mix(in srgb, var(--pi-warn) 40%, transparent); border-radius: 3px; padding: 0 4px; line-height: 1.5; }
.pi-desk.arriva .pi-badge { opacity: 0; }
/* isola: fila di sopra rivolta verso il basso, quella di sotto verso l'alto */
.pi-desk.su { height: 118px; }
.pi-desk.su .pi-nm { top: 0; }
.pi-desk.su .pi-chair { top: 42px; border: 1.5px solid var(--pi-line); border-bottom: 0; border-radius: 8px 8px 0 0; }
.pi-desk.su .pi-p { top: 28px; }
.pi-desk.su .pi-tbl { top: auto; bottom: 0; height: 50px; border-radius: 4px 4px 0 0; }
.pi-desk.su .pi-tbl::before { top: auto; bottom: 7px; }
.pi-desk.su .pi-badge { top: auto; bottom: 18px; }
.pi-isola .pi-desk.giu { height: 108px; }
.pi-isola .pi-desk.giu .pi-tbl { height: 50px; border-radius: 0 0 4px 4px; border-top-style: dashed; }
.pi-isola .pi-desk.giu .pi-chair { top: 54px; } .pi-isola .pi-desk.giu .pi-p { top: 36px; } .pi-isola .pi-desk.giu .pi-nm { top: 74px; }
.pi-torna { margin-left: 10px; font-size: 12px; text-transform: none; letter-spacing: 0; }
@media (max-width: 600px) {
  .pi-sala { padding: 30px 8px 44px; } .pi-isola { padding: 0 16px; } .pi-sopra { padding: 30px 10px 14px; } .pi-sopra .pi-desk { width: 42%; }
  .pi-nm b { font-size: 11.5px; } .pi-nm small { font-size: 9.5px; } .pi-stanza { padding: 30px 8px 40px; }
}

html.st-sobrio .group.big:has(.pianta) { overflow: visible; }
.pi-h h3::before, .pi-h h3::after { display: none !important; content: none !important; }
.pi-h h3 { border: 0 !important; padding: 0 !important; background: none !important; }
/* targa sulla scrivania (es. il capo) */
.pi-targa { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 4px; background: #111827; color: #fbbf24; font-size: 9.5px; font-weight: 800; letter-spacing: 1.2px; padding: 2px 7px 2px 5px; border-radius: 3px; white-space: nowrap; font-style: normal; z-index: 1; }
.pi-targa svg { width: 11px; height: 11px; fill: #fbbf24; }
html.dark .pi-targa { background: #0b0f14; border: 1px solid #3a4250; }
.pianta .pi-h h3 { margin: 0 !important; font-family: inherit !important; font-size: 12.5px !important; font-weight: 700 !important; letter-spacing: 1.4px !important; text-transform: uppercase; color: var(--pi-red) !important; display: block !important; }
.pi-targa { top: 7px; }
.pi-desk:has(.pi-targa) .pi-tbl::before { display: none; }
/* testo scritto sulla scrivania (nota / zona) */
.pi-scritto { position: absolute; left: 6px; right: 6px; top: 15px; font-style: normal; font-size: 9.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: "Segoe Print", "Comic Neue", cursive, inherit; }
.pi-desk.su .pi-scritto { top: auto; bottom: 18px; }
.pi-desk:has(.pi-badge) .pi-scritto { right: 62px; }
.pi-zbtn { margin-left: 4px; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 6px; font: inherit; font-size: 12px; font-weight: 600; padding: 4px 9px; cursor: pointer; }
.pi-h { flex-wrap: wrap; }
.pi-scroll { border-radius: 0 0 10px 10px; }
/* scrivanie ingrandite: tutto piu' grande, sul telefono si scorre di lato */
.pianta.zoom .pi-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-top: 0; }
.pianta.zoom .pi-scroll > * { min-width: 760px; border-left: 0; border-right: 0; }
.pianta.zoom .pi-scroll > :last-child { border-bottom: 0; }
.pianta.zoom .pi-isola { max-width: 820px; padding: 0 30px; }
.pianta.zoom .pi-desk { height: 140px; }
.pianta.zoom .pi-tbl { height: 64px; }
.pianta.zoom .pi-tbl::before { width: 40px; margin-left: -20px; }
.pianta.zoom .pi-chair { top: 68px; width: 34px; margin-left: -17px; }
.pianta.zoom .pi-p { top: 46px; width: 44px; height: 44px; margin-left: -22px; font-size: 15px; }
.pianta.zoom .pi-nm { top: 94px; } .pianta.zoom .pi-nm b { font-size: 15px; } .pianta.zoom .pi-nm small { font-size: 12.5px; white-space: normal; }
.pianta.zoom .pi-scritto { top: 20px; font-size: 12.5px; white-space: normal; max-height: 32px; }
.pianta.zoom .pi-badge { font-size: 11.5px; }
.pianta.zoom .pi-targa { font-size: 11.5px; }
.pianta.zoom .pi-desk.su { height: 160px; }
.pianta.zoom .pi-desk.su .pi-nm { top: 0; } .pianta.zoom .pi-desk.su .pi-chair { top: 56px; } .pianta.zoom .pi-desk.su .pi-p { top: 40px; }
.pianta.zoom .pi-desk.su .pi-tbl { height: 66px; } .pianta.zoom .pi-desk.su .pi-scritto { top: auto; bottom: 22px; } .pianta.zoom .pi-desk.su .pi-badge { bottom: 24px; }
.pianta.zoom .pi-isola .pi-desk.giu { height: 150px; } .pianta.zoom .pi-isola .pi-desk.giu .pi-tbl { height: 66px; }
.pianta.zoom .pi-isola .pi-desk.giu .pi-chair { top: 70px; } .pianta.zoom .pi-isola .pi-desk.giu .pi-p { top: 50px; } .pianta.zoom .pi-isola .pi-desk.giu .pi-nm { top: 100px; }
.pianta.zoom .pi-sopra .pi-desk, .pianta.zoom .pi-stanza .pi-desk { width: 240px; max-width: 240px; }
@media (max-width: 600px) {
  html.st-sobrio .stat { padding: 10px 8px; text-align: center; }
  html.st-sobrio .stat b { font-size: 24px; }
  html.st-sobrio .stat span { justify-content: center; font-size: 9px; letter-spacing: .6px; gap: 4px; }
  html.st-sobrio .stat span::before { width: 6px; height: 6px; }
  html.st-sobrio .tabellone .daytitle b { font-size: 20px; }
}
/* report e righe informative nello stile sobrio */
html.st-sobrio .kpi { display: block; padding: 12px 14px; }
html.st-sobrio .kpi b { border: 0 !important; border-radius: 0; font-size: 28px; font-weight: 700; color: var(--ink); place-items: start; margin: 2px 0; }
html.st-sobrio .kpi span { font-weight: 700; color: var(--muted); }
html.st-sobrio .kpi small { font-size: 11.5px; }
html.st-sobrio .c104, html.st-sobrio .cperm, html.st-sobrio .cferie, html.st-sobrio .cperm[data-perm="permesso_ingresso"] {
  background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--sob-c, #9ca3af); border-radius: 6px; }
html.st-sobrio .c104 { --sob-c: #9b3d5a; } html.st-sobrio .cperm { --sob-c: #76598f; } html.st-sobrio .cperm[data-perm="permesso_ingresso"] { --sob-c: #4f7f9a; }
html.st-sobrio .cferie { --sob-c: #2f6b4f; } html.st-sobrio .cferie.poche { --sob-c: #b07d1f; } html.st-sobrio .cferie.neg { --sob-c: var(--sob-red); }
html.st-sobrio .ropz { border-radius: 6px; } html.st-sobrio .ropz.on { background: var(--ink); border-color: var(--ink); }
/* ---- Oggi: pianta + colonna laterale ---- */
.oggi-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.oggi-grid > .oggi-main > .group.big { margin: 0; }
.oggi-side { display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 1000px) { .oggi-grid { grid-template-columns: 1fr; } }
.ls-box { background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.ls-t { margin: 0; padding: 12px 14px; font-size: 12px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; border-bottom: 1px solid var(--line); color: var(--ink); }
.ls-lane { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.ls-lane:last-child { border-bottom: 0; }
.ls-lane h5 { margin: 0 0 6px; display: flex; justify-content: space-between; font-size: 10.5px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase; color: var(--c); }
.ls-lane h5 span { color: var(--muted); }
.ls-row { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 5px 2px; font: inherit; color: var(--ink); text-align: left; cursor: pointer; border-radius: 6px; }
.ls-row:hover:not(:disabled) { background: var(--soft); } .ls-row:disabled { cursor: default; }
.ls-row i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 700; color: #fff; flex: none; }
.ls-row b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ls-row em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--muted); text-align: right; }
.ls-vuoto { margin: 2px 0; font-size: 12.5px; color: var(--muted); }
.ls-tm { padding: 6px 14px 10px; }
.ls-tm > div { display: grid; grid-template-columns: 46px 1fr; gap: 10px; padding: 6px 0; font-size: 13px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.ls-tm > div:last-child { border-bottom: 0; }
.ls-tm time { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
.ls-tm small { color: var(--muted); }
.ls-tm .pass { opacity: .55; }
.ls-tm .nw time { color: var(--sob-red, #b91c1c); }
.ls-rw { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.ls-rw:last-child { border-bottom: 0; }
.ls-rw[role=button] { cursor: pointer; } .ls-rw[role=button]:hover { background: var(--soft); }
.ls-rw span { color: var(--muted); } .ls-rw b { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.ls-rw b.neg { color: var(--sob-red, #b91c1c); }
/* menu laterale in tema: icone monocromatiche */
html.st-sobrio .topnav button, html.st-sobrio .bottomnav button span { filter: grayscale(1); }
html.st-sobrio .topnav button:not(.active) { opacity: .85; }
html.st-sobrio .topnav button.active { opacity: 1; box-shadow: inset 3px 0 0 var(--sob-red); }
@media (max-width: 999px) { html.st-sobrio .topnav button.active { box-shadow: inset 0 -2px 0 var(--sob-red); } }
/* menu laterale chiaro (PC) */
@media (min-width: 1000px) {
  html.st-sobrio .topbar { background: var(--card); color: var(--ink); border-right: 1px solid var(--line); box-shadow: none; }
  html.st-sobrio .brand { border-bottom-color: var(--line); }
  html.st-sobrio .brand b, html.st-sobrio .brand b * { color: var(--ink); }
  html.st-sobrio .brand-tag, html.st-sobrio .brand small { color: var(--muted); }
  html.st-sobrio .topnav::before { color: var(--muted); }
  html.st-sobrio .topnav button { color: #4b5563; }
  html.st-sobrio .topnav button:hover { background: var(--soft); color: var(--ink); }
  html.st-sobrio .topnav button.active { background: var(--soft); color: var(--ink); box-shadow: inset 3px 0 0 var(--sob-red); }
  html.st-sobrio .top-actions { border-top-color: var(--line); }
  html.st-sobrio .user-chip { background: var(--soft); border: 1px solid var(--line); color: var(--ink); }
  html.st-sobrio.dark .topnav button { color: #9ca3af; }
}
@media (min-width: 1000px) {
  html.st-sobrio .topnav button { filter: none; opacity: 1 !important; color: #1f2937; font-weight: 600; }
  html.st-sobrio .topnav button.active { background: color-mix(in srgb, var(--sob-red) 10%, var(--card)); color: var(--sob-red); box-shadow: inset 3px 0 0 var(--sob-red); font-weight: 700; }
  html.st-sobrio.dark .topnav button { color: #e5e7eb; }
}
.pi-resp { font-style: normal; font-weight: 700; color: var(--ink); text-transform: uppercase; letter-spacing: .5px; font-size: .92em; }
.pianta .pi-h { justify-content: center; }
.pianta .pi-h h3 { text-align: center; font-size: 14px !important; letter-spacing: 3px !important; }
/* intestazione della pianta: barra blu scuro */
.pianta .pi-h { background: #1e3a5f; border-color: #1e3a5f; }
.pianta .pi-h h3 { color: #fff !important; }
html.dark .pianta .pi-h { background: #16304f; border-color: #16304f; }
.cal td.nomod { cursor: default; }
/* porta della sala sul lato (vicino a Ferdinando): a destra in basso, girata a sinistra in alto per chi siede di fronte */
.pi-door.lato-dx, .pi-door.lato-sx { left: auto; margin: 0; width: 3px; height: 64px; bottom: auto; }
.pi-door.lato-dx { right: -1px; bottom: 34px; }
.pi-door.lato-sx { left: -1px; right: auto; top: 44px; }
.pi-door.lato-dx::after, .pi-door.lato-sx::after { top: 0; bottom: 0; left: auto; right: auto; writing-mode: vertical-rl; display: flex; align-items: center; justify-content: center; }
.pi-door.lato-dx::after { right: 7px; transform: rotate(180deg); }
.pi-door.lato-sx::after { left: 7px; }
.pi-sala { padding-bottom: 30px; }
/* uffici dei responsabili: scrivania girata di lato, la persona siede di fianco */
.pi-stanza .pi-desk.orizz { width: 150px; height: 124px; max-width: none; }
.pi-desk.orizz .pi-tbl { left: 50%; right: auto; width: 56px; height: 96px; top: 0; margin-left: -10px; }
.pi-desk.orizz .pi-tbl::before { left: 8px; top: 50%; width: 4px; height: 30px; margin: -15px 0 0; }
.pi-desk.orizz .pi-chair { left: 50%; top: 34px; margin-left: -40px; width: 11px; height: 28px; border: 1.5px solid var(--pi-line); border-right: 0; border-radius: 8px 0 0 8px; }
.pi-desk.orizz .pi-p { left: 50%; top: 31px; margin-left: -46px; }
.pi-desk.orizz .pi-nm { top: 102px; }
.pi-desk.orizz .pi-targa { left: auto; right: 4px; transform: none; top: 4px; writing-mode: vertical-rl; padding: 5px 2px; }
.pi-desk.orizz .pi-badge, .pi-desk.orizz .pi-scritto { display: none; }
/* sedia sull'altro lato (es. Diego) */
.pi-desk.orizz.dx .pi-tbl { margin-left: -46px; }
.pi-desk.orizz.dx .pi-tbl::before { left: auto; right: 8px; }
.pi-desk.orizz.dx .pi-chair { margin-left: 29px; border: 1.5px solid var(--pi-line); border-left: 0; border-radius: 0 8px 8px 0; }
.pi-desk.orizz.dx .pi-p { margin-left: 12px; }
.pi-desk.orizz.dx .pi-targa { right: auto; left: 4px; }
/* Ciro Scala e Diego si guardano di fronte, ognuno con le spalle alla sua parete esterna */
.pi-stanza .pi-desk.orizz { margin: 0 auto 0 -8px; }
.pi-stanza .pi-desk.orizz.dx { margin: 0 -8px 0 auto; }
/* la scrivania del capo (con targa) e' un po' piu' grande, con la targa al centro */
.pi-desk.orizz:has(.pi-targa) { height: 148px; }
.pi-desk.orizz:has(.pi-targa) .pi-tbl { width: 72px; height: 120px; }
.pi-desk.orizz.dx:has(.pi-targa) .pi-tbl { margin-left: -62px; }
.pi-desk.orizz.dx:has(.pi-targa) .pi-chair { top: 46px; }
.pi-desk.orizz.dx:has(.pi-targa) .pi-p { top: 43px; }
.pi-desk.orizz:has(.pi-targa) .pi-nm { top: 126px; }
.pi-desk.orizz .pi-targa { left: 50% !important; right: auto !important; top: 50% !important; transform: translate(-50%, -50%) !important; }
/* uffici: la porta e' di fronte alla scrivania (sulla parete che si guarda) */
.pi-stanza .pi-door.lato-dx, .pi-stanza .pi-door.lato-sx { top: 34px; bottom: auto; height: 56px; }
.pi-stanza { padding-bottom: 30px; }
/* Ciro Scala e Diego con le spalle al muro (sedia attaccata alla parete dietro di loro) */
.pi-stanza .pi-desk.orizz { margin: 0 auto 0 -40px; }
.pi-stanza .pi-desk.orizz.dx { margin: 0 -40px 0 auto; }
.pi-stanza .pi-desk.orizz .pi-nm { left: 20px; right: -10px; }
.pi-stanza .pi-desk.orizz.dx .pi-nm { left: -10px; right: 20px; }
.pi-stanza .pi-desk.orizz .pi-nm { left: 34px; right: -70px; }
.pi-stanza .pi-desk.orizz.dx .pi-nm { left: -70px; right: 34px; }
/* porta disegnata come nelle piantine: anta + arco di apertura; si apre quando entra qualcuno */
.pi-door { overflow: visible; }
.pi-anta { position: absolute; display: block; background: color-mix(in srgb, var(--ink) 55%, transparent); border-radius: 2px; transition: transform .45s cubic-bezier(.3,.6,.3,1); }
.pi-door::before { content: ""; position: absolute; border: 0 dashed color-mix(in srgb, var(--ink) 30%, transparent); pointer-events: none; transition: opacity .3s; }
/* porta in basso (cerniera a sinistra, si apre verso l'interno) */
.pi-door:not(.lato-dx):not(.lato-sx)::before { left: 0; bottom: 0; width: 60px; height: 60px; border-top-width: 1.5px; border-right-width: 1.5px; border-top-right-radius: 100%; }
.pi-door:not(.lato-dx):not(.lato-sx) .pi-anta { left: 0; bottom: 0; width: 2.5px; height: 60px; transform-origin: 50% 100%; }
.pi-door:not(.lato-dx):not(.lato-sx).chiusa:not(.aperta) .pi-anta { transform: rotate(90deg); }
/* porta sulla parete destra (cerniera in alto, si apre verso sinistra) */
.pi-door.lato-dx::before { right: 0; top: 0; width: 56px; height: 56px; border-bottom-width: 1.5px; border-left-width: 1.5px; border-bottom-left-radius: 100%; }
.pi-door.lato-dx .pi-anta { right: 0; top: 0; width: 56px; height: 2.5px; transform-origin: 100% 50%; }
.pi-door.lato-dx.chiusa:not(.aperta) .pi-anta { transform: rotate(-90deg); }
/* porta sulla parete sinistra (cerniera in alto, si apre verso destra) */
.pi-door.lato-sx::before { left: 0; top: 0; width: 56px; height: 56px; border-bottom-width: 1.5px; border-right-width: 1.5px; border-bottom-right-radius: 100%; }
.pi-door.lato-sx .pi-anta { left: 0; top: 0; width: 56px; height: 2.5px; transform-origin: 0 50%; }
.pi-door.lato-sx.chiusa:not(.aperta) .pi-anta { transform: rotate(90deg); }
.pi-door.chiusa:not(.aperta)::before { opacity: .35; }
/* l'etichetta INGRESSO resta fuori dall'arco */
.pi-door.lato-dx::after { right: auto; left: 6px; }
.pi-door.lato-sx::after { left: auto; right: 6px; }
.pi-door.lato-dx, .pi-door.lato-sx { height: 56px; }
.pi-door.lato-dx::after { left: -14px; }
.pi-door.lato-sx::after { right: -14px; }
.pi-stanza .pi-door::after { display: none; }
.pi-door.lato-dx::after { left: -74px; } .pi-door.lato-sx::after { right: -74px; }
/* ---- Porta in legno: chiusa nel muro, si apre (ruota sui cardini) quando entra qualcuno ---- */
.pi-anta { background:
    repeating-linear-gradient(0deg, rgba(0,0,0,.10) 0 1px, transparent 1px 5px),
    linear-gradient(90deg, #6b3f1d, #9a6235 45%, #b07a47 55%, #7c4a22);
  box-shadow: 0 1px 3px rgba(0,0,0,.35), inset 0 0 0 1px rgba(60,30,10,.55); border-radius: 1.5px;
  transition: transform .55s cubic-bezier(.25,.7,.25,1); z-index: 2; }
.pi-anta::after { content: ""; position: absolute; width: 5px; height: 5px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fde68a, #b8860b); box-shadow: 0 0 1px rgba(0,0,0,.6); }
/* porta in basso */
.pi-door:not(.lato-dx):not(.lato-sx) .pi-anta { width: 6px; height: 60px; left: -1px; background: repeating-linear-gradient(90deg, rgba(0,0,0,.10) 0 1px, transparent 1px 5px), linear-gradient(0deg, #6b3f1d, #9a6235 45%, #b07a47 55%, #7c4a22); }
.pi-door:not(.lato-dx):not(.lato-sx) .pi-anta::after { left: .5px; top: 6px; }
.pi-door:not(.lato-dx):not(.lato-sx):not(.aperta) .pi-anta { transform: rotate(90deg); }
/* parete destra */
.pi-door.lato-dx .pi-anta { height: 6px; width: 56px; top: -1px; }
.pi-door.lato-dx .pi-anta::after { left: 6px; top: .5px; }
.pi-door.lato-dx:not(.aperta) .pi-anta { transform: rotate(-90deg); }
/* parete sinistra */
.pi-door.lato-sx .pi-anta { height: 6px; width: 56px; top: -1px; }
.pi-door.lato-sx .pi-anta::after { right: 6px; top: .5px; }
.pi-door.lato-sx:not(.aperta) .pi-anta { transform: rotate(90deg); }
/* arco di apertura: si vede solo mentre la porta si apre */
.pi-door::before { opacity: 0; transition: opacity .4s; }
.pi-door.aperta::before { opacity: 1; }
/* stipiti (telaio) ai due lati dell'apertura */
.pi-door { background: var(--card); box-shadow: none; }
.pi-door:not(.lato-dx):not(.lato-sx) { box-shadow: -3px 0 0 #5b3a1e, 3px 0 0 #5b3a1e; }
.pi-door.lato-dx, .pi-door.lato-sx { box-shadow: 0 -3px 0 #5b3a1e, 0 3px 0 #5b3a1e; }
.pi-stanza .pi-door.lato-dx { top: 40px; } .pi-stanza .pi-door.lato-sx { top: 108px; }
.pi-p { will-change: transform; } .pi-anta { will-change: transform; }
.pianta.attesa .pi-p, .pianta.attesa .pi-badge { opacity: 0; }
/* 🏁 popup di fine lavoro */
.fine-box p { margin: 4px 0 12px; color: var(--muted); }
.fine-resta { background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; text-align: left; font-size: 13.5px; }
.fine-resta span { display: block; font-weight: 600; margin-bottom: 6px; }
.fine-resta label { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--ink); font-size: 14px; font-weight: 600; }
.fine-resta input { width: auto; flex: 1; margin: 0; min-height: 40px; }
.fine-az { display: flex; gap: 8px; margin-top: 12px; } .fine-az .btn { flex: 1; }
/* popup fine lavoro piu' chiaro */
.fine-pop { background: rgba(2,6,23,.72); }
.pop-box.fine-box { padding: 0; overflow: hidden; gap: 0; width: min(360px, 100%); text-align: center; border-radius: 14px; }
.fine-top { background: #1e3a5f; color: #fff; padding: 18px 16px 16px; display: grid; justify-items: center; gap: 2px; }
.fine-top .fine-flag { font-size: 34px; line-height: 1; }
.fine-top small { letter-spacing: 3px; font-weight: 700; font-size: 12px; opacity: .85; margin-top: 6px; }
.fine-top b { font-size: 40px !important; font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; }
.fine-msg { margin: 14px 16px 12px !important; font-size: 16px; color: var(--ink) !important; }
.fine-esco { margin: 0 16px; width: calc(100% - 32px); min-height: 50px; font-size: 16px; background: #15803d; color: #fff; border: 0; }
.fine-o { margin: 10px 0 8px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.5px; }
.fine-box .fine-resta { margin: 0 16px 16px; text-align: left; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.fine-box .fine-resta span { font-size: 14.5px; font-weight: 700; color: var(--ink); margin-bottom: 8px; display: block; }
.fine-riga { display: flex; gap: 8px; }
.fine-riga input { flex: 1; margin: 0; min-height: 48px; font-size: 20px; font-weight: 700; text-align: center; }
.fine-ok { min-height: 48px; background: #1e3a5f; color: #fff; border: 0; padding: 0 16px; }
.fine-box .fine-resta small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.fine-piu { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 10px; }
.fine-piu .btn { min-height: 46px; padding: 0; font-size: 16px; font-weight: 800; background: var(--card); border: 1.5px solid #1e3a5f; color: #1e3a5f; }
html.dark .fine-piu .btn { color: #93c5fd; border-color: #93c5fd; }
.fine-box .fine-resta .fine-man { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
@media (max-width: 600px) {
  .pi-sala > .pi-door::after { display: none; } /* sul telefono la scritta INGRESSO copriva i nomi: basta la porta */
  .pi-stanza .pi-desk.orizz { margin-left: -14px; } .pi-stanza .pi-desk.orizz.dx { margin-right: -14px; margin-left: auto; }
}
@media (max-width: 600px) { .pi-stanza .pi-desk.orizz .pi-nm { right: -30px; } .pi-stanza .pi-desk.orizz.dx .pi-nm { left: -30px; } }

/* bottone rapido "La mia presenza" sopra la pianta */
.pi-h .mia-pres { margin-left: auto; text-transform: none; letter-spacing: 0; font-size: 13px; white-space: nowrap; }
.pi-h .mia-pres + .count, .group h3 .count + .mia-pres { margin-left: 8px; }
@media (max-width: 420px) { .pi-h .mia-pres { font-size: 12.5px; padding: 6px 10px; } }
.pi-h .mia-pres.nd { background: #ffffff; color: #111827; border: 1px solid #ffffff; font-weight: 700; }
.pi-h .mia-pres.si { background: var(--mp); color: #fff; border: 1px solid rgba(255,255,255,.55); display: inline-flex; align-items: center; gap: 6px; }
.pi-h .mia-pres.pres { box-shadow: 0 0 0 3px color-mix(in srgb, var(--mp) 22%, transparent); }
.pi-h .mia-pres .mp-c { font-size: 11px; opacity: .85; padding-left: 6px; border-left: 1px solid rgba(255,255,255,.4); }
/* nella testata della pianta: "Nolana" resta al centro, il bottone a destra (sul telefono va sotto, a tutta larghezza) */
.pianta .pi-h { position: relative; }
.pi-h .mia-pres { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); min-height: 34px; }
@media (max-width: 560px) { .pianta .pi-h { flex-direction: column; gap: 8px; } .pi-h .mia-pres { position: static; transform: none; width: 100%; justify-content: center; min-height: 40px; font-size: 14px; } }
@media (max-width: 560px) { .pianta .pi-h .mia-pres.si, .pianta .pi-h .mia-pres.nd { justify-content: center; } }

/* report: 7 riquadri (con il ticket pasto) */
@media (min-width: 1100px) { .kpis.k7 { grid-template-columns: repeat(7, 1fr); } }
@media (min-width: 561px) and (max-width: 1099px) { .kpis.k7 { grid-template-columns: repeat(4, 1fr); } }

/* in postazione ma non ha ancora messo la presenza: omino trasparente con bordo tratteggiato */
.pi-desk.nonpres .pi-p { opacity: .45; outline: 2px dashed var(--pi-warn, #b45309); outline-offset: 2px; }
.pi-desk.nonpres .pi-nm small b { font-weight: 700; }

/* gli omini che aspettano alla porta non devono allargare la pagina sul telefono */
.pianta { overflow-x: clip; }
/* 📋 Appello: a sinistra nella testata della pianta (sul telefono sotto Nolana, a tutta larghezza) */
.pi-h .mia-pres.appello { right: auto; left: 12px; background: #ffffff; color: #111827; border: 1px solid #ffffff; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.pi-h .mia-pres.appello .ap-n { background: #b45309; color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 12px; }
@media (max-width: 560px) { .pianta .pi-h .mia-pres.appello { justify-content: center; } }
.ap-list { display: grid; gap: 6px; margin-top: 10px; max-height: 58vh; overflow-y: auto; }
.ap-r { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.ap-r.manca { border-color: color-mix(in srgb, #b45309 45%, var(--line)); background: color-mix(in srgb, #b45309 6%, var(--card)); }
.ap-nm { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ap-nm small { color: var(--muted); font-size: 12.5px; }
.ap-r.manca .ap-nm small { color: #b45309; font-weight: 600; }
html.dark .ap-r.manca .ap-nm small { color: #fbbf24; }
.ap-ok { color: #15803d; font-weight: 800; font-size: 18px; padding: 0 10px; }
.ap-r .btn { white-space: nowrap; min-height: 40px; }
@media (max-width: 420px) { .ap-r { flex-wrap: wrap; } .ap-nm { flex-basis: calc(100% - 50px); } .ap-r .btn { flex: 1; } }
/* lista laterale "Presenze operatori" */
.ap-box .ls-t { display: flex; align-items: center; gap: 8px; }
.ap-box .ap-n { margin-left: auto; background: #b45309; color: #fff; border-radius: 999px; padding: 2px 8px; font-size: 10.5px; letter-spacing: .5px; }
.ap-box .ap-tutti { margin-left: auto; color: #15803d; font-size: 11px; }
.ap-side { display: flex; flex-direction: column; }
.ap-s { display: flex; align-items: center; gap: 8px; padding: 7px 10px 7px 14px; border-bottom: 1px solid var(--line); }
.ap-s:last-child { border-bottom: 0; }
.ap-s .ap-nm { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ap-s .ap-nm b { font-size: 14px; }
.ap-s .ap-nm small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-s.manca .ap-nm small { color: #b45309; font-weight: 700; }
html.dark .ap-s.manca .ap-nm small { color: #fbbf24; }
.ap-bt { display: inline-flex; gap: 4px; flex: none; }
.ap-b { border: 1px solid var(--line); background: var(--soft, #f9fafb); color: var(--ink); border-radius: 8px; min-height: 36px; min-width: 38px; padding: 0 8px; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; filter: grayscale(.9); opacity: .75; }
.ap-b span { display: none; }
.ap-b:hover { opacity: 1; filter: none; }
.ap-b.si.on { background: #15803d; border-color: #15803d; color: #fff; filter: none; opacity: 1; }
.ap-b.no.on { background: #b91c1c; border-color: #b91c1c; color: #fff; filter: none; opacity: 1; }
.ap-b.altro { filter: none; opacity: .8; }
.ap-box .ap-all { margin: 8px 10px 10px; width: calc(100% - 20px); }
.ap-box.lampo { box-shadow: 0 0 0 3px #b45309; transition: box-shadow .3s; }
@media (max-width: 900px) { .ap-b span { display: inline; } .ap-b { padding: 0 10px; } }
@media (max-width: 420px) { .ap-s { flex-wrap: wrap; } .ap-s .ap-nm { flex-basis: 100%; } .ap-bt { width: 100%; } .ap-b { flex: 1; } .ap-b.altro { flex: 0 0 44px; } }

/* scrivania di chi oggi e' in un'altra sede (es. Paolo a Nolana) */
.pi-nm .pi-oggi-a { font-style: normal; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: #15803d; }
html.dark .pi-nm .pi-oggi-a { color: #4ade80; }
/* scritta sulla scrivania (localita', nota): piu' grande e in grassetto, si legge al primo sguardo */
.pianta .pi-scritto { font-family: inherit; font-size: 12.5px; font-weight: 800; letter-spacing: .2px; color: var(--ink); top: 12px; line-height: 1.2; }
.pianta .pi-desk.su .pi-scritto { bottom: 16px; }
@media (max-width: 560px) { .pianta .pi-scritto { font-size: 12px; left: 4px; right: 4px; } }
.pianta .pi-scritto { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-align: center; overflow-wrap: anywhere; }
@media (max-width: 560px) { .pianta .pi-desk:has(.pi-badge) .pi-scritto { right: 4px; top: 22px; } .pianta .pi-desk.su:has(.pi-badge) .pi-scritto { top: auto; bottom: 14px; } }
/* telefono: scritte della pianta piu' grandi */
@media (max-width: 560px) {
  .pianta .pi-scritto { font-size: 14px; }
  .pianta .pi-nm b { font-size: 14px; }
  .pianta .pi-nm small { font-size: 12px; white-space: normal; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}
/* telefono: scrivanie piu' alte, cosi' le scritte grandi (anche su 2 righe) non si sovrappongono */
@media (max-width: 560px) {
  .pianta .pi-desk { height: 132px; }
  .pianta .pi-tbl { height: 52px; }
  .pianta .pi-chair { top: 56px; }
  .pianta .pi-p { top: 38px; }
  .pianta .pi-nm { top: 78px; }
  .pianta .pi-desk.su { height: 146px; }
  .pianta .pi-desk.su .pi-nm { top: 0; }
  .pianta .pi-desk.su .pi-p { top: 52px; }
  .pianta .pi-desk.su .pi-chair { top: 66px; }
  .pianta .pi-desk.su .pi-tbl { height: 60px; }
  .pianta .pi-isola .pi-desk.giu { height: 144px; }
  .pianta .pi-isola .pi-desk.giu .pi-tbl { height: 60px; }
  .pianta .pi-isola .pi-desk.giu .pi-chair { top: 64px; }
  .pianta .pi-isola .pi-desk.giu .pi-p { top: 46px; }
  .pianta .pi-isola .pi-desk.giu .pi-nm { top: 86px; }
  .pianta .pi-scritto { font-size: 13.5px; top: 14px; }
  .pianta .pi-desk.su .pi-scritto { top: auto; bottom: 14px; }
  .pianta .pi-desk:has(.pi-badge) .pi-scritto { top: 22px; }
  .pianta .pi-desk.su:has(.pi-badge) .pi-scritto { top: auto; bottom: 12px; }
}

/* bottone giorno / notte nella barra in alto */
.top-actions .tema-btn { font-size: 18px; width: 40px; height: 40px; display: inline-grid; place-items: center; }
/* fuori sede / corso: e' comunque al lavoro per l'azienda: nome e scrivania colorati */
:root { --pi-fs: #0e7490; }
html.dark { --pi-fs: #22d3ee; }
.pi-desk.inaz .pi-nm b { color: var(--pi-fs); font-weight: 800; }
.pi-desk.inaz .pi-nm small { color: var(--pi-fs); font-weight: 700; }
.pi-desk.inaz .pi-tbl { border-color: color-mix(in srgb, var(--pi-fs) 60%, var(--pi-line)); }
.pi-desk.inaz .pi-tbl::before { background: var(--pi-fs); }
.pianta .pi-desk.inaz .pi-scritto { color: var(--pi-fs); }

/* richieste (pranzo, pizza...): la propria risposta con Cambia / Annulla */
.rich-mia { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, #15803d 9%, transparent); border: 1px solid color-mix(in srgb, #15803d 30%, transparent); font-size: 13.5px; }
.rich-mia-b { display: inline-flex; gap: 6px; }
.rich-mia .btn { min-height: 36px; }
.rich.cambia .ropz:not([disabled]) { box-shadow: 0 0 0 3px color-mix(in srgb, #b45309 45%, transparent); }
@media (max-width: 420px) { .rich-mia-b { width: 100%; } .rich-mia-b .btn { flex: 1; } }
/* "Arrivo alle ore": si compila solo l'orario di arrivo (e le date) */
.solo-arrivo .sede-row, .solo-arrivo .orari-row, .solo-arrivo .zona-row, .solo-arrivo datalist { display: none !important; }
.solo-arrivo .ora-row input[type="time"] { font-size: 20px; font-weight: 700; min-height: 52px; }

/* ➖ minuti scalati (Report) */
.scali-box { display: flex; flex-direction: column; gap: 6px; }
.scali-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.scali-r { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px dashed var(--line); font-size: 13.5px; }
.scali-r small { display: inline; margin-left: 4px; }
.saldo-kpi .kpi-btn { margin-top: 8px; width: 100%; }

/* scritta lunga sulla scrivania (es. nota di Ferdinando): carattere un po' piu' piccolo e piu' righe, cosi' si legge tutta */
.pianta .pi-scritto.lungo { font-size: 12px; -webkit-line-clamp: 3; line-height: 1.15; }
.pianta .pi-scritto.lungo2 { font-size: 11px; -webkit-line-clamp: 4; line-height: 1.12; letter-spacing: 0; }
.pianta .pi-desk:has(.pi-scritto.lungo, .pi-scritto.lungo2) .pi-tbl::before { display: none; } /* tolgo la tastiera disegnata, cosi' la scritta lunga ha tutto lo spazio */
.pianta .pi-scritto.lungo, .pianta .pi-scritto.lungo2 { top: 5px; } .pianta .pi-desk.su .pi-scritto.lungo, .pianta .pi-desk.su .pi-scritto.lungo2 { top: auto; bottom: 5px; }
@media (max-width: 560px) {
  .pianta .pi-scritto.lungo { font-size: 12.5px; top: 4px; }
  .pianta .pi-scritto.lungo2 { font-size: 11px; top: 3px; left: 3px; right: 3px; }
  .pianta .pi-desk.su .pi-scritto.lungo, .pianta .pi-desk.su .pi-scritto.lungo2 { top: auto; bottom: 4px; }
}

/* 🎂 compleanni e onomastici del giorno */
.feste-box { display: grid; gap: 6px; margin: 0 0 10px; }
.festa { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.35; color: var(--ink); background: linear-gradient(100deg, color-mix(in srgb, #ec4899 13%, var(--card)), color-mix(in srgb, #f59e0b 12%, var(--card))); border: 1px solid color-mix(in srgb, #ec4899 30%, transparent); }
.festa.onomastico { background: linear-gradient(100deg, color-mix(in srgb, #3b82f6 12%, var(--card)), color-mix(in srgb, #8b5cf6 12%, var(--card))); border-color: color-mix(in srgb, #6366f1 30%, transparent); }
.festa-ic { font-size: 24px; line-height: 1; }
.gm-row { display: flex; gap: 8px; margin-top: 4px; } .gm-row select { flex: 1; min-height: 42px; }
@media (max-width: 560px) { .festa { font-size: 15px; } }

/* ===== scrivanie "con monitor" (proposta B): piano in legno, schermo acceso nel colore dello stato, tastiera dal lato della sedia ===== */
.pianta { --wood: #d6c3a3; --wood-edge: #b89f78; --wood-key: #5b4a33; --scr: #1f2937; --scr-edge: #374151; --scr-on: #0b1220; }
html.dark .pianta { --wood: #7a6548; --wood-edge: #5c4a32; --wood-key: #2d2418; --scr: #111827; --scr-edge: #2b3442; --scr-on: #05080f; }
.pianta .pi-tbl { background: var(--wood); border: 1px solid var(--wood-edge) !important; border-radius: 8px; box-shadow: 0 4px 10px -4px rgba(80,55,20,.45); }
.pianta .pi-desk.su .pi-tbl { border-radius: 8px 8px 3px 3px; }
.pianta .pi-isola .pi-desk.giu .pi-tbl { border-radius: 3px 3px 8px 8px; border-top-style: solid !important; }
/* schermo */
.pianta .pi-tbl::after { content: ""; position: absolute; left: 5px; right: 5px; top: 5px; bottom: 14px; background: var(--scr); border: 2px solid var(--scr-edge); border-radius: 5px; }
.pianta .pi-desk.su .pi-tbl::after { top: 14px; bottom: 5px; }
.pianta .pi-desk.occ .pi-tbl::after { background: var(--scr-on); box-shadow: inset 0 0 14px color-mix(in srgb, var(--st, #64748b) 40%, transparent); }
/* tastiera dal lato della sedia */
.pianta .pi-tbl::before, .pianta .pi-desk.occ .pi-tbl::before { top: auto; bottom: 5px; width: 30px; margin-left: -15px; height: 4px; background: var(--wood-key); z-index: 1; }
.pianta .pi-desk.su .pi-tbl::before { top: 5px; bottom: auto; }
.pianta .pi-desk:has(.pi-scritto.lungo, .pi-scritto.lungo2) .pi-tbl::before { display: block; }
/* scritta sullo schermo: chiara, nel colore dello stato */
.pianta .pi-desk .pi-scritto { z-index: 1; top: 8px !important; bottom: 17px !important; left: 9px !important; right: 9px !important; display: flex !important; align-items: center; justify-content: center; text-align: center; overflow: hidden; -webkit-line-clamp: unset; color: color-mix(in srgb, var(--st, #94a3b8) 45%, #fff) !important; text-shadow: 0 0 8px color-mix(in srgb, var(--st, #94a3b8) 45%, transparent); }
.pianta .pi-desk.su .pi-scritto { top: 17px !important; bottom: 8px !important; }
.pianta .pi-badge { z-index: 2; }
.pianta .pi-targa { z-index: 2; }
/* scrivanie verticali (uffici dei responsabili) */
.pianta .pi-desk.orizz .pi-tbl::after { left: 16px; right: 5px; top: 5px; bottom: 5px; }
.pianta .pi-desk.orizz.dx .pi-tbl::after { left: 5px; right: 16px; }
.pianta .pi-desk.orizz .pi-tbl::before { top: 50%; bottom: auto; width: 4px; height: 30px; margin: -15px 0 0; }
.pianta .pi-desk.vuota .pi-tbl { opacity: .75; }
.pianta .pi-desk .pi-scritto { align-items: safe center; line-height: 1.15; }
.pianta .pi-desk.orizz .pi-scritto { display: none !important; }
@media (max-width: 560px) {
  .pianta .pi-tbl::after { top: 4px; bottom: 12px; left: 4px; right: 4px; }
  .pianta .pi-desk.su .pi-tbl::after { top: 12px; bottom: 4px; }
  .pianta .pi-tbl::before, .pianta .pi-desk.occ .pi-tbl::before { bottom: 4px; height: 3px; }
  .pianta .pi-desk.su .pi-tbl::before { top: 4px; }
  .pianta .pi-desk .pi-scritto { top: 6px !important; bottom: 14px !important; left: 7px !important; right: 7px !important; font-size: 13px; }
  .pianta .pi-desk.su .pi-scritto { top: 14px !important; bottom: 6px !important; }
  .pianta .pi-desk .pi-scritto.lungo { font-size: 11px; line-height: 1.1; }
  .pianta .pi-desk .pi-scritto.lungo2 { font-size: 9.5px; line-height: 1.08; letter-spacing: 0; }
}
@media (min-width: 561px) {
  .pianta .pi-tbl::after { top: 4px; bottom: 11px; left: 4px; right: 4px; }
  .pianta .pi-desk.su .pi-tbl::after { top: 11px; bottom: 4px; }
  .pianta .pi-tbl::before, .pianta .pi-desk.occ .pi-tbl::before { bottom: 4px; height: 3px; }
  .pianta .pi-desk.su .pi-tbl::before { top: 4px; }
  .pianta .pi-desk .pi-scritto { top: 6px !important; bottom: 13px !important; left: 8px !important; right: 8px !important; line-height: 1.1; }
  .pianta .pi-desk.su .pi-scritto { top: 13px !important; bottom: 6px !important; }
  .pianta .pi-desk .pi-scritto.lungo { font-size: 11px; }
  .pianta .pi-desk .pi-scritto.lungo2 { font-size: 10px; }
  .pianta .pi-desk.orizz .pi-tbl::after { left: 16px; right: 4px; top: 4px; bottom: 4px; }
  .pianta .pi-desk.orizz.dx .pi-tbl::after { left: 4px; right: 16px; }
}
/* scrivanie piu' grandi (schermo piu' alto, isola piu' larga) */
.pianta .pi-isola { max-width: 640px; }
.pianta .pi-desk { height: 120px; }
.pianta .pi-tbl { height: 64px; }
.pianta .pi-chair { top: 68px; }
.pianta .pi-p { top: 52px; }
.pianta .pi-nm { top: 88px; }
.pianta .pi-desk.su { height: 140px; }
.pianta .pi-desk.su .pi-nm { top: 0; }
.pianta .pi-desk.su .pi-chair { top: 42px; }
.pianta .pi-desk.su .pi-p { top: 28px; }
.pianta .pi-desk.su .pi-tbl { height: 72px; }
.pianta .pi-isola .pi-desk.giu { height: 130px; }
.pianta .pi-isola .pi-desk.giu .pi-tbl { height: 72px; }
.pianta .pi-isola .pi-desk.giu .pi-chair { top: 76px; }
.pianta .pi-isola .pi-desk.giu .pi-p { top: 58px; }
.pianta .pi-isola .pi-desk.giu .pi-nm { top: 96px; }
.pianta .pi-sopra .pi-desk { max-width: 260px; }
@media (min-width: 561px) {
  .pianta .pi-desk .pi-scritto { font-size: 14px; }
  .pianta .pi-desk .pi-scritto.lungo { font-size: 12.5px; }
  .pianta .pi-desk .pi-scritto.lungo2 { font-size: 11.5px; }
}
@media (max-width: 560px) {
  .pianta .pi-isola { padding: 0 12px 0 4px; column-gap: 5px; }
  .pianta .pi-sala { padding-left: 4px; padding-right: 4px; }
  .pianta .pi-desk { height: 150px; }
  .pianta .pi-tbl { height: 70px; }
  .pianta .pi-chair { top: 74px; }
  .pianta .pi-p { top: 56px; }
  .pianta .pi-nm { top: 96px; }
  .pianta .pi-desk.su { height: 166px; }
  .pianta .pi-desk.su .pi-nm { top: 0; }
  .pianta .pi-desk.su .pi-p { top: 52px; }
  .pianta .pi-desk.su .pi-chair { top: 66px; }
  .pianta .pi-desk.su .pi-tbl { height: 80px; }
  .pianta .pi-isola .pi-desk.giu { height: 164px; }
  .pianta .pi-isola .pi-desk.giu .pi-tbl { height: 80px; }
  .pianta .pi-isola .pi-desk.giu .pi-chair { top: 84px; }
  .pianta .pi-isola .pi-desk.giu .pi-p { top: 66px; }
  .pianta .pi-isola .pi-desk.giu .pi-nm { top: 106px; }
  .pianta .pi-desk .pi-scritto { font-size: 14.5px; }
  .pianta .pi-desk .pi-scritto.lungo { font-size: 12.5px; }
  .pianta .pi-desk .pi-scritto.lungo2 { font-size: 11px; }
}

/* bottone compleanno/onomastico in Collaboratori: si vede cosa e' stato inserito */
.feste-btn { display: inline-flex; gap: 10px; align-items: center; }
.feste-btn i { font-style: normal; opacity: .55; }
.btn.ghost.feste-btn.feste-ok { color: inherit; border-color: color-mix(in srgb, #16a34a 55%, transparent); background: color-mix(in srgb, #16a34a 12%, var(--card)); }
/* Account: nome e targhette su una riga larga, i bottoni vanno sotto se manca spazio */
.acc-i { min-width: min(100%, 380px); }
.acc-i .role { white-space: nowrap; display: inline-block; margin: 2px 0; }
.pianta ~ .x, .acc .acc-b { width: 100%; padding-left: 52px; box-sizing: border-box; }
@media (max-width: 560px) { .acc .acc-b { padding-left: 0; } .acc .acc-i { min-width: 0; flex: 1 1 200px; } }

/* chi ha fatto la richiesta vede a chi e' arrivata la notifica */
.rich-esito { font-size: 12px; font-weight: 600; color: var(--muted); margin: 6px 0 2px; line-height: 1.35; }

.qmain .vc-nota { margin-top: 6px; font-weight: 600; white-space: pre-wrap; }

/* nomi e orari sopra/sotto le scrivanie piu' grandi */
.pianta .pi-nm b { font-size: 17px; font-weight: 700; }
.pianta .pi-nm small { font-size: 13.5px; }
@media (max-width: 560px) { .pianta .pi-nm b { font-size: 16px; } .pianta .pi-nm small { font-size: 13px; } }
.pianta .pi-nm small b { font-size: inherit; }
.pianta .pi-sopra { padding-bottom: 26px; }

/* 🎂 oggi e' il compleanno/onomastico di qualcuno: riquadro rosso lampeggiante */
.festa.lampeggia { background: #dc2626; border-color: #b91c1c; color: #fff; font-weight: 600; box-shadow: 0 4px 14px -4px rgba(220,38,38,.6); animation: festa-lamp 1.1s ease-in-out infinite; }
.festa.lampeggia b { color: #fff; }
@keyframes festa-lamp { 0%, 100% { background: #dc2626; box-shadow: 0 0 0 0 rgba(220,38,38,.55); } 50% { background: #991b1b; box-shadow: 0 0 0 7px rgba(220,38,38,0); } }

/* lampeggio piu' evidente (anche con "riduci animazioni" del telefono): rosso acceso <-> rosso scuro con alone */
.feste-box .festa.lampeggia { animation: festa-lamp2 .9s steps(1, end) infinite !important; }
@keyframes festa-lamp2 { 0% { background: #ef4444; border-color: #fecaca; box-shadow: 0 0 0 4px rgba(239,68,68,.45), 0 6px 18px -4px rgba(220,38,38,.7); } 50% { background: #7f1d1d; border-color: #7f1d1d; box-shadow: none; } }

/* 🕗 popup "non hai ancora messo la presenza" */
.arr-box { width: min(380px, 100%); text-align: center; }
.arr-box .arr-dati { display: grid; gap: 10px; text-align: left; }
.arr-box .arr-l { display: grid; gap: 4px; font-size: 13.5px; font-weight: 600; }
.arr-box .arr-l input { min-height: 46px; font-size: 16px; }
.arr-box .arr-l input[type="time"] { font-size: 20px; font-weight: 700; }
.arr-box .arr-dopo { justify-self: center; font-size: 13px; }
.arr-box .hidden { display: none !important; }

/* stati con l'ora (Feo, Feo mattina, Arrivo alle ore, recupero): solo l'orario da digitare; la nota resta solo per "Arrivo alle ore" */
.solo-arrivo:not(.con-nota) .nota-row, .solo-arrivo .altra-row, .solo-arrivo .ora-h { display: none !important; }
.sheet.solo-arrivo .date-row, .sheet.solo-arrivo .lav-row, .sheet.solo-arrivo.mio .conf-row { display: none !important; }

/* 🕘 Movimenti di oggi: scheda piu' visibile */
.mov-box { border: 2px solid color-mix(in srgb, #2563eb 45%, var(--line)); border-radius: 14px; box-shadow: 0 6px 18px -8px rgba(37,99,235,.45); }
.mov-box .ls-t { background: linear-gradient(100deg, #1e3a8a, #2563eb); color: #fff; font-size: 14px; letter-spacing: 1.2px; padding: 12px 14px; border-bottom: 0; }
.mov-box .ls-tm { padding: 8px 12px 12px; }
.mov-box .ls-tm > div { grid-template-columns: 58px 1fr; align-items: center; font-size: 15px; padding: 8px 4px; }
.mov-box .ls-tm time { font-size: 15px; text-align: center; padding: 3px 0; border-radius: 7px; background: color-mix(in srgb, var(--ink) 8%, transparent); }
.mov-box .ls-tm small { font-size: 12.5px; }
.mov-box .mv-in time { background: #dcfce7; color: #166534; }
.mov-box .mv-out time { background: #ffedd5; color: #9a3412; }
.mov-box .mv-start span, .mov-box .mv-end span { font-weight: 700; }
.mov-box .ls-tm .nw { background: #fee2e2; border-radius: 9px; border-bottom-color: transparent; }
.mov-box .ls-tm .nw time { background: #dc2626; color: #fff; }
.mov-box .ls-tm .nw span, .mov-box .ls-tm .nw b { color: #991b1b; }
.mov-box .ls-tm .pass { opacity: .6; }
html.dark .mov-box .mv-in time { background: #14532d; color: #bbf7d0; }
html.dark .mov-box .mv-out time { background: #7c2d12; color: #fed7aa; }
html.dark .mov-box .ls-tm .nw { background: #450a0a; }
html.dark .mov-box .ls-tm .nw span, html.dark .mov-box .ls-tm .nw b { color: #fecaca; }

/* fila in alto: piu' spazio tra nome/orario e pallino, cosi' l'orario non resta coperto */
@media (min-width: 561px) {
  .pianta .pi-desk.su { height: 168px; }
  .pianta .pi-desk.su .pi-p { top: 56px; }
  .pianta .pi-desk.su .pi-chair { top: 70px; }
}

/* 1.10.41: Home, scorrimento del giorno col dito: si muove solo la parte sotto "Aggiorna" */
#view { overflow-x: clip; }
.giorno-corpo { position: relative; }
@media (prefers-reduced-motion: reduce) { .giorno-corpo { transition: none !important; } }

/* 1.10.41: ritardo coperto con Permesso Feo (Recupero ore) */
.feo-cop { margin: 12px 0 4px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, #9333ea 9%, var(--card)); border: 1px solid color-mix(in srgb, #9333ea 30%, transparent); }
.feo-cop p { margin: 0 0 8px; font-size: 14px; }
.feo-cop-btn { border-color: #9333ea; color: #7e22ce; font-weight: 700; }
.feo-cop-l { margin-top: 8px; display: grid; gap: 4px; }
html.dark .feo-cop-btn { color: #d8b4fe; border-color: #a855f7; }

/* 1.10.41: USE uscita per servizio (dalle / alle) */
.use-row { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; border: 1px solid color-mix(in srgb, #0e7490 35%, transparent); background: color-mix(in srgb, #0e7490 8%, var(--card)); }
.use-row.hidden { display: none; }
.use-row .row2 { margin: 0; }

/* 1.10.42: guida dettagliata Recupero ore / Feo / USE */
.guida-rec { --gr-ok: #16a34a; --gr-neg: #dc2626; --gr-pos: #2563eb; --gr-use: #0e7490; }
.guida-rec h3 { margin-bottom: 4px; }
.guida-btn { margin: 4px 0 12px; font-weight: 700; border-color: color-mix(in srgb, var(--accent, #2563eb) 45%, transparent); }
.gr-link { display: block; margin: 10px auto 0; font-weight: 600; }
.gr-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.gr-nav a { text-decoration: none; font-size: 13px; font-weight: 700; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: inherit; }
.gr-c { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; background: var(--card); scroll-margin-top: 10px; }
.gr-c h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 16px; flex-wrap: wrap; }
.gr-c h4 > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: color-mix(in srgb, var(--accent, #2563eb) 12%, transparent); }
.gr-c h4 em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--gr-use); border: 1px solid currentColor; border-radius: 999px; padding: 2px 8px; }
.gr-c p { margin: 0 0 10px; font-size: 14px; line-height: 1.45; }
.gr-use { border-color: color-mix(in srgb, var(--gr-use) 40%, var(--line)); }
.gr-ex { display: grid; grid-template-columns: 26px 1fr; gap: 10px; margin: 10px 0 14px; font-size: 14px; }
.gr-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; background: #334155; }
.gr-bar { position: relative; height: 26px; margin: 8px 0 26px; border-radius: 8px; background: color-mix(in srgb, var(--muted, #94a3b8) 14%, transparent); }
.gr-ora { position: absolute; top: 0; bottom: 0; border-radius: 8px; border: 1px dashed color-mix(in srgb, var(--muted, #94a3b8) 70%, transparent); }
.gr-s { position: absolute; top: 3px; bottom: 3px; border-radius: 6px; font-style: normal; font-size: 11px; font-weight: 800; color: #fff; display: grid; place-items: center; overflow: hidden; white-space: nowrap; min-width: 12px; }
.gr-s.ok { background: color-mix(in srgb, var(--gr-ok) 55%, transparent); }
.gr-s.neg { background: var(--gr-neg); }
.gr-s.pos { background: var(--gr-pos); }
.gr-s.use { background: var(--gr-use); }
.gr-t { position: absolute; top: 28px; transform: translateX(-50%); font-size: 10.5px; font-weight: 700; color: var(--muted, #64748b); }
.gr-bn { display: block; margin-top: -4px; line-height: 1.35; color: var(--muted, #64748b); }
.gr-l { margin: 6px 0 0; padding-left: 4px; list-style: none; display: grid; gap: 6px; font-size: 13.5px; line-height: 1.45; }
.gr-steps { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; line-height: 1.45; }
.gr-tab { display: grid; gap: 4px; margin: 6px 0 10px; font-size: 13px; }
.gr-tab > div { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 4px; align-items: center; }
.gr-tab span { font-weight: 700; color: var(--muted, #64748b); font-size: 12px; }
.gr-tab b { text-align: center; padding: 5px 2px; border-radius: 8px; background: color-mix(in srgb, #9333ea 9%, transparent); }
.gr-dove { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.gr-dove > div { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: grid; gap: 2px; font-size: 14px; }
.gr-dove small { color: var(--muted, #64748b); line-height: 1.4; }

/* 1.10.43: Report, tutti i calcoli del mese */
.cl-vai { margin: 12px 0; font-weight: 700; text-decoration: none; text-align: center; }
.calc-mese { margin-top: 18px; padding-top: 14px; border-top: 2px solid var(--line); scroll-margin-top: 12px; }
.calc-mese h3 { margin: 0 0 4px; }
.calc-mese > p { margin: 0 0 12px; font-size: 13.5px; }
.cl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.cl-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--card); break-inside: avoid; }
.cl-card h4 { margin: 0 0 6px; font-size: 15px; }
.cl-r { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 14px; align-items: baseline; }
.cl-r:last-child { border-bottom: 0; }
.cl-r span small { display: block; font-size: 11.5px; color: var(--muted, #64748b); }
.cl-r b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.cl-r.tot { border-top: 2px solid var(--line); border-bottom: 0; margin-top: 2px; padding-top: 7px; }
.cl-r.tot span { font-weight: 800; }
.cl-r.neg b, .cl-tab .neg, .cl-conti b.neg { color: #b91c1c; }
.cl-r.pos b, .cl-tab .pos, .cl-conti b.pos { color: #15803d; }
html.dark .cl-r.neg b, html.dark .cl-tab .neg, html.dark .cl-conti b.neg { color: #f87171; }
html.dark .cl-r.pos b, html.dark .cl-tab .pos, html.dark .cl-conti b.pos { color: #4ade80; }
.cl-h { margin: 16px 0 6px; }
.cl-tab { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
.cl-tab th, .cl-tab td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.cl-tab thead th { font-size: 12px; color: var(--muted, #64748b); }
.cl-tab tbody th { white-space: nowrap; }
.cl-tab td small { display: block; color: var(--muted, #64748b); }
.cl-tab .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; }
.cl-conti div + div { margin-top: 2px; }
@media print { .calc-mese { break-before: page; } .cl-tab { min-width: 0; } }

/* 1.10.44: correzione veloce dal Report */
.cl-az { display: inline-flex; vertical-align: middle; margin-right: 6px; }
.cl-az .icon-btn { width: 34px; height: 34px; }
.cl-tab tbody th { white-space: nowrap; }
.cl-altro { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 12px; font-weight: 700; font-size: 14px; }
.cl-altro input { width: auto; flex: 1 1 150px; margin: 0; }
.cg-anteprima { margin: 10px 0 2px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--muted, #94a3b8) 12%, transparent); font-size: 14px; }
.cg-anteprima .neg { color: #b91c1c; } .cg-anteprima .pos { color: #15803d; }
html.dark .cg-anteprima .neg { color: #f87171; } html.dark .cg-anteprima .pos { color: #4ade80; }

/* 1.10.45: tasto rapido "Esco adesso" */
.esco-btn { position: fixed; z-index: 30; right: 14px; bottom: calc(84px + var(--safe-b, 0px)); border-radius: 999px !important; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; width: auto; max-width: calc(100% - 28px); margin: 0; padding: 10px 18px 10px 14px; animation: esco-in .35s ease-out; border: 0; border-radius: 14px; background: linear-gradient(135deg, #0f766e, #0e7490); color: #fff; text-align: left; cursor: pointer; box-shadow: 0 6px 16px rgba(14,116,144,.28); font: inherit; }
.esco-btn span { grid-row: 1 / 3; font-size: 30px; line-height: 1; }
.esco-btn b { font-size: 18px; }
.esco-btn small { opacity: .9; font-size: 13px; }
.esco-btn:active { transform: scale(.97); }
@keyframes esco-in { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 900px) { .esco-btn { bottom: 24px; right: 24px; } }
@media (prefers-reduced-motion: reduce) { .esco-btn { animation: none; } }
.esco-btn:focus-visible { outline: 3px solid #fbbf24; outline-offset: 2px; }
.esco-ok { margin: 10px 0 4px; padding: 10px 14px; border-radius: 12px; border: 1px solid color-mix(in srgb, #16a34a 40%, transparent); background: color-mix(in srgb, #16a34a 9%, var(--card)); font-size: 14.5px; cursor: pointer; }
.esco-ok small { color: var(--muted, #64748b); }

/* 1.10.49: ponti e chiusure aziendali (colore ambra, diverso dalle festivita') */
.cal th.ponte, .cal th.fest.ponte { color: #fff; background: #d97706; }
.cal td.ponte, .cal td.fest.ponte { background: #fef3c7; }
html.dark .cal th.ponte, html.dark .cal th.fest.ponte { color: #fcd34d; background: #3a2a08; }
html.dark .cal td.ponte, html.dark .cal td.fest.ponte { background: #2a1f07; }
html.st-sobrio .cal th.ponte { background: color-mix(in srgb, #d97706 16%, var(--card)); color: #b45309; }
html.st-sobrio .cal td.ponte { background: color-mix(in srgb, #d97706 8%, transparent); }
.qday.fest.ponte { border-color: #fcd34d; background: #fffbeb; color: #b45309; }
.cal-g.ponte { background: #fef3c7; color: #b45309; font-weight: 700; }
html.dark .cal-g.ponte { background: #3a2a08; color: #fcd34d; }
.festlist span.ponte { color: #b45309; font-weight: 600; }
html.dark .festlist span.ponte { color: #fcd34d; }
.chiu-form { display: grid; gap: 8px; margin-top: 10px; }
.chiu-row.t-ponte b, .chiu-row.t-chiusura b { color: #b45309; }
html.dark .chiu-row.t-ponte b, html.dark .chiu-row.t-chiusura b { color: #fcd34d; }
.chiu-ferie.hidden { display: none; }

/* 📣 Chiedi la presenza (responsabili e amministratore) */
.chiedi-pres { display: block; width: 100%; margin: 10px 0 4px; background: #fff7ed; color: #9a3412; border: 1px solid #fdba74; font-weight: 600; }
.chiedi-pres:disabled { opacity: .85; }
/* tema scuro dell'app */ html.dark .chiedi-pres { background: #431407; color: #fed7aa; border-color: #9a3412; }

/* 🏢 Entro adesso (la mattina, finche' non c'e' la presenza) */
.esco-btn.entro-btn { background: linear-gradient(135deg, #15803d, #0f766e); box-shadow: 0 6px 16px rgba(21,128,61,.28); }

/* 🎓 Prossimi corsi in Home */
.corsi-box { display: grid; gap: 6px; margin: 0 0 12px; }
.corso-riga { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border-left: 4px solid #2e6f6a; background: color-mix(in srgb, #2e6f6a 9%, var(--card, #fff)); border-radius: 8px; font-size: 14px; line-height: 1.35; }
.corso-riga.vicino { border-left-color: #d97706; background: color-mix(in srgb, #d97706 11%, var(--card, #fff)); }
.corso-riga.altri { border-left-color: #64748b; background: color-mix(in srgb, #64748b 8%, var(--card, #fff)); }
.corso-riga small { display: block; color: var(--muted, #64748b); font-size: 12.5px; margin-top: 2px; overflow-wrap: anywhere; }
.corso-ic { font-size: 18px; line-height: 1.2; flex: none; }

/* 👔 Responsabile sulle presenze di un collega: solo presenza, corso, congedo */
form.capo-lim .capo-no, form.capo-lim .orari-row, form.capo-lim .altra-row { display: none !important; }
.capo-info { margin: 0 0 10px; }
#modal:has(.capo-info) .orari-row, #modal:has(.capo-info) .altra-row { display: none !important; }

/* ✕ per chiudere la finestra di fine lavoro */
.pop-box.fine-box { position: relative; }
.fine-box .fine-x { position: absolute; top: 8px; right: 8px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.18); color: #fff; font-size: 17px; line-height: 1; cursor: pointer; }
.fine-box .fine-x:hover, .fine-box .fine-x:focus-visible { background: rgba(255,255,255,.32); outline: 2px solid #fff; outline-offset: 1px; }

/* ⏱️ fine lavoro: chi e' entrato tardi vede a che ora uscire per recuperare */
.fine-box .fine-rec { margin: 0 16px 12px; padding: 10px 12px; border-radius: 10px; background: #fff7ed; border: 1px solid #fdba74; color: #7c2d12; font-size: 14px; line-height: 1.4; text-align: left; }
.fine-box .fine-rec-ok { display: block; width: 100%; margin-top: 8px; background: #c2410c; color: #fff; border: 0; font-weight: 700; }
/* tema scuro dell'app */ html.dark .fine-box .fine-rec { background: #431407; border-color: #9a3412; color: #fed7aa; }

/* 💙 Tifoso napoletano */
.napoli-btn { margin-top: 10px; border: 0; border-radius: 999px; padding: 9px 16px; font-weight: 800; letter-spacing: .2px; color: #fff; background: #0e7cc2; cursor: pointer; }
.napoli-btn:hover { background: #0b6aa6; }
.relax-mini-riga { display: flex; gap: 8px; flex-wrap: wrap; }
.relax-mini.napoli-mini { color: #0b5a8c; }
.nap { --az: #12a0d7; --az2: #0b2a4a; width: 100%; }
.nap-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--az2); color: #fff; border-radius: 14px; padding: 16px 18px; margin-bottom: 12px; background-image: repeating-linear-gradient(135deg, rgba(18,160,215,.16) 0 14px, transparent 14px 28px); }
.nap-head small { letter-spacing: 3px; font-weight: 800; font-size: 11px; color: #8fd3f2; }
.nap-head h2 { margin: 2px 0; font-size: 24px; color: #fff; }
.nap-head span { font-size: 12px; opacity: .8; }
.nap-head .btn { background: #fff; color: var(--az2); border: 0; font-weight: 700; white-space: nowrap; }
.nap-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.nap-tabs button { flex: none; border: 1px solid var(--line); background: var(--card, #fff); color: var(--ink); border-radius: 999px; padding: 8px 13px; font-weight: 700; font-size: 13.5px; cursor: pointer; }
.nap-tabs button.on { background: var(--az); border-color: var(--az); color: #fff; }
.nap-tabs button i { font-style: normal; font-size: 11px; background: rgba(0,0,0,.12); border-radius: 9px; padding: 1px 6px; margin-left: 2px; }
.nap-sez { font-size: 12px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin: 14px 2px 6px; }
.nap-due { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.nap-due .nap-sez { margin-top: 0; }
.nap-match { display: grid; gap: 4px; text-decoration: none; color: var(--ink); background: var(--card, #fff); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.nap-match:hover { border-color: var(--az); }
.nap-match .nm-c { font-size: 11.5px; font-weight: 700; color: var(--az); text-transform: uppercase; letter-spacing: .8px; }
.nap-match .nm-c b { color: #dc2626; }
.nap-match .nm-sq { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; }
.nap-match .nm-sq > span:first-child { text-align: right; }
.nap-match .nm-sq .nap { color: #0b6aa6; }
.nap-match .nm-ris { font-size: 18px; min-width: 64px; text-align: center; background: var(--soft); border-radius: 8px; padding: 2px 8px; font-variant-numeric: tabular-nums; }
.nap-match .nm-d { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.nap-match .nm-go { float: right; color: var(--az); font-weight: 700; }
.nap-match .nm-es { font-style: normal; font-weight: 800; padding: 0 6px; border-radius: 5px; color: #fff; }
.nap-match.big { padding: 16px; }
.nap-match.big .nm-sq { font-size: 18px; }
.nap-match.big .nm-ris { font-size: 26px; }
.es-vinta .nm-es, .nf-vinta { background: #16a34a; }
.es-pari .nm-es, .nf-pari { background: #94a3b8; }
.es-persa .nm-es, .nf-persa { background: #dc2626; }
.nap-match.live { border-color: #dc2626; }
.nap-count { font-weight: 700; color: var(--az2); margin: -2px 2px 0; font-size: 14px; }
.nap-forma { display: flex; align-items: center; gap: 6px; margin: 10px 2px 0; font-size: 13px; color: var(--muted); font-weight: 700; }
.nap-forma .nf { font-style: normal; color: #fff; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 12px; }
.nap-tab-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--card, #fff); }
.nap-cl { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.nap-cl th, .nap-cl td { padding: 8px 6px; text-align: center; border-bottom: 1px solid var(--line); }
.nap-cl th { font-size: 11.5px; color: var(--muted); font-weight: 800; }
.nap-cl .sq { text-align: left; white-space: nowrap; }
.nap-cl .sq img { width: 18px; height: 18px; vertical-align: -4px; margin-right: 6px; }
.nap-cl tr.nap td { background: color-mix(in srgb, #12a0d7 16%, transparent); font-weight: 800; color: #0b5a8c; }
.nap-news { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--card, #fff); overflow: hidden; }
.nap-news a { display: grid; gap: 3px; padding: 11px 14px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.nap-news a:last-child { border-bottom: 0; }
.nap-news a:hover { background: var(--soft); }
.nap-news b { font-size: 15px; line-height: 1.35; }
.nap-news small { font-size: 12px; color: var(--muted); }
.nap-news small.nd { color: var(--ink); opacity: .75; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nap-link { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.nap-link a { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--card, #fff); }
.nap-link a small { color: var(--muted); grid-column: 1; }
.nap-link a span { grid-row: 1 / 3; grid-column: 2; align-self: center; color: var(--az); font-weight: 800; }
.nap-fonte { font-size: 12px; margin: 8px 2px; }
.nap-wait { padding: 20px 4px; }
.nap-back { margin: 14px 2px; }
/* tema scuro dell'app */ html.dark .nap-match .nm-sq .nap, html.dark .nap-cl tr.nap td { color: #7dd3fc; } html.dark .nap-count { color: #7dd3fc; } html.dark .relax-mini.napoli-mini { color: #7dd3fc; }

/* 😄 vittoria del Napoli */
.nap-match .nm-smile { float: right; font-size: 22px; line-height: 1; display: inline-block; animation: napRide 1.4s ease-in-out infinite; }
.nap-match .nm-festa { font-weight: 800; color: #15803d; font-size: 14px; }
.nap-forma .nf.nf-smile { background: #dcfce7; font-size: 15px; }
@keyframes napRide { 0%, 100% { transform: rotate(0) scale(1); } 25% { transform: rotate(-14deg) scale(1.15); } 50% { transform: rotate(0) scale(1); } 75% { transform: rotate(14deg) scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .nap-match .nm-smile { animation: none; } }
/* tema scuro dell'app */ html.dark .nap-match .nm-festa { color: #86efac; } html.dark .nap-forma .nf.nf-smile { background: #14532d; }

/* 📅 partite in programma: data e ora ben visibili */
.nap-match .nm-quando { display: block; font-size: 15.5px; font-weight: 700; color: var(--az2); margin: 2px 0 4px; }
.nap-match .nm-quando b { color: #0b6aa6; font-size: 17px; }
.nap-match .nm-ris.nm-ora { background: #0b2a4a; color: #fff; font-size: 17px; }
.nap-match.big .nm-quando { font-size: 17px; }
.nap-match.big .nm-ris.nm-ora { font-size: 22px; }
/* tema scuro dell'app */ html.dark .nap-match .nm-quando { color: #e2e8f0; } html.dark .nap-match .nm-quando b { color: #7dd3fc; } html.dark .nap-match .nm-ris.nm-ora { background: #12a0d7; }


/* 💙 Tifoso napoletano: tutta la larghezza della pagina; su PC partite e notizie su piu' colonne */
@media (min-width: 900px) {
  .nap-cal { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 0 12px; }
  .nap-news { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nap-news a:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
  .nap-news a:nth-child(odd) { border-right: 1px solid var(--line); }
}
/* telefono e caratteri grandi (es. Diego): niente testi tagliati o accavallati */
.nap-match .nm-sq > span { min-width: 0; overflow-wrap: anywhere; }
.nap-head { flex-wrap: wrap; }
.nap-head > div { min-width: 0; }
@media (max-width: 480px) {
  .nap-head h2 { font-size: 21px; }
  .nap-match .nm-sq { gap: 6px; font-size: 15px; }
  .nap-match.big .nm-sq { font-size: 16px; }
  .nap-match .nm-ris { min-width: 0; }
  .nap-match .nm-go { float: none; display: block; margin-top: 2px; }
  .nap-cl th, .nap-cl td { padding: 7px 4px; }
}

/* barra in basso a colori (anche con lo stile Sobrio) + 💙 Napoli che batte */
html .bottomnav button span, html.st-sobrio .bottomnav button span, html.st-sobrio .bottomnav button.active span { filter: none !important; opacity: 1 !important; }
html .bottomnav button[data-nav="napoli"] span { font-size: 27px; line-height: 1; display: inline-block; transform-origin: 50% 60%; animation: napBatte 1.3s ease-in-out infinite; filter: drop-shadow(0 0 5px rgba(18,160,215,.55)) !important; }
html .bottomnav button[data-nav="napoli"] small { color: #0e7cc2; font-weight: 800; }
html .topnav button[data-nav="napoli"], html.st-sobrio .topnav button[data-nav="napoli"] { filter: none !important; }
@keyframes napBatte { 0%, 40%, 100% { transform: scale(1); } 10% { transform: scale(1.22); } 20% { transform: scale(1.05); } 30% { transform: scale(1.25); } }
@media (prefers-reduced-motion: reduce) { html .bottomnav button[data-nav="napoli"] span { animation: none; } }
/* tema scuro dell'app */ html.dark .bottomnav button[data-nav="napoli"] small { color: #7dd3fc; }

/* 🧾 Report Giustificativo (griglia come il programma aziendale) */
.rep-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 14px; }
.rep-tabs button { border: 1px solid var(--line); background: var(--card, #fff); color: var(--ink); border-radius: 999px; padding: 8px 14px; font-weight: 700; cursor: pointer; }
.rep-tabs button.on { background: var(--ink); color: var(--card, #fff); border-color: var(--ink); }
.giust-tit { margin: 4px 0 8px; font-size: 16px; background: #6b7280; color: #fff; padding: 8px 12px; border-radius: 8px 8px 0 0; }
.giust-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 0 0 8px 8px; background: var(--card, #fff); -webkit-overflow-scrolling: touch; }
.giust { border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; min-width: 100%; }
.giust th, .giust td { border: 1px solid var(--line); padding: 7px 6px; text-align: center; white-space: nowrap; min-width: 62px; }
.giust thead th { background: var(--soft); font-weight: 700; font-size: 12px; position: sticky; top: 0; }
.giust .gd { position: sticky; left: 0; z-index: 1; background: var(--card, #fff); text-align: left; min-width: 210px; font-weight: 600; box-shadow: 1px 0 0 var(--line); }
.giust thead .gd { z-index: 2; background: var(--soft); }
.giust .fe { background: color-mix(in srgb, var(--muted) 9%, transparent); }
.giust th.og { background: #fde68a; color: #111; }
.giust td.gv { background: #dcfce7; color: #14532d; font-weight: 600; }
.giust td.gc { background: #fef9c3; color: #713f12; }
.giust .gr-MPE .gd, .giust .gr-ASS .gd { color: #1d4ed8; }
.giust .gr-ASS td:not(:empty):not(.gt) { color: #b91c1c; font-weight: 700; }
.giust .gt { font-weight: 800; background: var(--soft); }
.giust-hint { margin-top: 8px; }
@media (max-width: 560px) { .giust .gd { min-width: 0; width: 56px; font-size: 13px; } .giust .gd .gl { display: none; } .giust th, .giust td { min-width: 56px; padding: 7px 4px; } .rep-tabs button { padding: 7px 12px; font-size: 14px; } }
/* tema scuro dell'app */ html.dark .giust td.gv { background: #14532d; color: #dcfce7; } html.dark .giust td.gc { background: #713f12; color: #fef9c3; } html.dark .giust th.og { background: #a16207; color: #fff; }
@media print { .giust-wrap { overflow: visible; } .giust { font-size: 9px; } .giust th, .giust td { min-width: 0; padding: 3px 2px; } .giust .gd { position: static; } }
.giust .gd { background: #fff !important; z-index: 3; }
.giust thead .gd { background: #f3f4f6 !important; z-index: 4; }
/* tema scuro dell'app */ html.dark .giust .gd { background: #111827 !important; } html.dark .giust thead .gd { background: #1f2937 !important; }
html.dark .giust .gd { background: #111827 !important; } html.dark .giust thead .gd { background: #1f2937 !important; }
.giust .gs { display: none; }
@media (max-width: 560px) { .giust .gs { display: inline; } .giust .gd { width: 64px; min-width: 64px; max-width: 64px; } .giust { border-collapse: separate; border-spacing: 0; } }
