/* Pannello Installazioni — shell y vistas (app.js). Usa las variables de tokens.css (mismo sistema que allacci).
   Tema claro siempre. Rejilla de 8 px, radios 10-16 px, numeros tabulares en columnas. */
:root {
  --sb-w: 248px;
  --tb-h: 64px;
  --pad-x: 28px;
  /* marcas de grafico: una serie = verde de la marca; las squadre llevan su color (validado con el metodo dataviz) */
  --viz-one: #2E8B2E;
  --viz-grid: #EDF1EE;
  --viz-axis: #CBD3CD;
  --ring: 0 0 0 3px rgba(58, 170, 53, .22);
}

/* ------------------------------------------------------------------ arranque */
.boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 5; }
.boot-in { display: flex; flex-direction: column; align-items: center; gap: 16px; color: var(--muted); font-size: 13px; }
.boot-logo img { height: 64px; width: auto; display: block; }
.boot-spin { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--brand-100); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.noscript { padding: 40px; text-align: center; font-size: 15px; }
.mt0 { margin-top: 0; }
.mb0 { margin-bottom: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rosso { color: var(--danger) !important; }
.urg-t { color: #C2410C; }
.span2 { grid-column: span 2; }

/* ------------------------------------------------------------------ logo recortado (solo el sol con la casa) */
.sb-logo { position: relative; display: block; flex: none; width: 36px; height: 29px; overflow: hidden; }
.sb-logo img { position: absolute; width: 71px; max-width: none; height: auto; left: -17.6px; top: -1.4px; }

/* ------------------------------------------------------------------ login */
.login { position: fixed; inset: 0; overflow: auto; background: var(--surface); z-index: 10; }
.lg-wrap { min-height: 100%; display: grid; grid-template-columns: minmax(440px, 46%) minmax(0, 1fr); }
.lg-art { position: relative; overflow: hidden; display: flex; padding: 48px 56px;
  background: linear-gradient(155deg, #F3FAF1 0%, #E4F3DF 48%, #FFF6D6 100%); border-right: 1px solid var(--line-2); }
.lg-sun { position: absolute; width: 520px; right: -260px; bottom: -232px; pointer-events: none; }
.lg-sun-c { fill: #F4C430; opacity: .3; }
.lg-a { fill: none; stroke-width: 22; stroke-linecap: round; }
.lg-a.a1 { stroke: #3AAA35; opacity: .24; }
.lg-a.a2 { stroke: #2E8B2E; opacity: .16; }
.lg-a.a3 { stroke: #9BCB3C; opacity: .2; }
.lg-a.a4 { stroke: #2E8B2E; opacity: .08; }
.lg-art-in { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; max-width: 470px; }
.lg-logo-w { display: inline-block; align-self: flex-start; padding: 10px 14px; background: #fff; border-radius: 14px; box-shadow: var(--shadow-xs), 0 0 0 1px rgba(46, 139, 46, .08); }
.lg-logo { height: 52px; width: auto; display: block; }
.lg-eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-600); }
.lg-claim h2 { margin: 10px 0 14px; font-size: 34px; line-height: 1.15; font-weight: 700; letter-spacing: -.025em; color: var(--ink); }
.lg-claim p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.lg-feat { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.lg-feat li { display: flex; gap: 14px; align-items: flex-start; }
.lg-fi { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 11px; color: var(--brand); background: rgba(255, 255, 255, .75); border: 1px solid rgba(46, 139, 46, .16); box-shadow: var(--shadow-xs); }
.lg-feat b { display: block; font-size: 14px; color: var(--ink); }
.lg-feat small { font-size: 13px; color: var(--muted); }
.lg-main { display: grid; place-items: center; padding: 40px 24px; }
.lg-card { width: min(400px, 100%); display: flex; flex-direction: column; gap: 16px; }
.lg-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.lg-brand b { display: block; font-size: 15px; letter-spacing: -.01em; }
.lg-brand small { display: block; font-size: 12px; color: var(--muted); }
.lg-card h1 { margin: 8px 0 0; font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.lg-sub { margin: -8px 0 4px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.lg-in { height: 44px; font-size: 15px; border-radius: 11px; }
.pw-w { position: relative; }
.pw-w .input { padding-right: 46px; }
.pw-eye { position: absolute; right: 6px; top: 6px; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.pw-eye:hover { background: var(--surface-3); }
.pw-eye.on { color: var(--brand); }
.pw-eye:focus-visible { outline: none; box-shadow: var(--ring); }
.lg-row { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; color: var(--ink-2); }
.lg-btn { height: 46px; font-size: 15px; border-radius: 11px; gap: 8px; }
.lg-btn .i { transition: transform .15s; }
.lg-btn:hover .i { transform: translateX(3px); }
.lg-btn.loading { opacity: .8; pointer-events: none; }
.lg-btn.loading span::after { content: "…"; }
.lg-err { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 11px; font-size: 13.5px; line-height: 1.45;
  background: var(--danger-50); color: #B42318; border: 1px solid var(--danger-100); }
.lg-err .i { width: 17px; height: 17px; margin-top: 1px; }
.lg-err.lock { background: var(--warn-50); color: var(--warn); border-color: var(--warn-100); }
.lg-err.info { background: var(--info-50); color: #1D4ED8; border-color: #D1E0FF; }
.lg-foot { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.lg-foot .i { width: 15px; height: 15px; color: var(--brand); margin-top: 1px; }
@media (max-width: 1100px) { .lg-wrap { grid-template-columns: 1fr; } .lg-art { display: none; } }

/* primo accesso: imposta la password */
.pws { min-height: 100%; display: grid; place-items: center; padding: 40px 20px;
  background: radial-gradient(900px 520px at 0% 0%, #E4F3DF 0%, transparent 60%), radial-gradient(800px 480px at 100% 100%, #FFF6D6 0%, transparent 55%), var(--surface); }
.pws-card { width: min(452px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 28px 32px 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 24px 64px rgba(16, 32, 20, .1); }
.pws-card .lg-brand { margin-bottom: 2px; }
.pws-k { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--brand-50); color: var(--brand-600); font-size: 12px; font-weight: 700; }
.pws-k .i { width: 14px; height: 14px; }
.pws-card h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.pws-card .lg-sub { margin: -6px 0 2px; }
.pws-req { list-style: none; margin: 0; padding: 10px 12px; display: grid; gap: 5px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--surface-2); font-size: 12.5px; color: var(--muted); }
.pws-req li { display: flex; align-items: center; gap: 8px; transition: color .12s; }
.pws-req .i { width: 14px; height: 14px; stroke-width: 2.6; color: #C7CFC9; transition: color .12s; }
.pws-req li.ok { color: #166534; }
.pws-req li.ok .i { color: var(--ok); }
.pws-foot { margin: 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.pws-foot i { font-style: normal; font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); }
.pws-out { margin: 0; padding-top: 10px; border-top: 1px solid var(--line-2); text-align: center; }
.pws-out .linkb { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--muted); }
.pws-out .linkb .i { width: 15px; height: 15px; }

/* ------------------------------------------------------------------ shell */
.app { display: grid; grid-template-columns: var(--sb-w) minmax(0, 1fr); height: 100vh; overflow: hidden; }
.sb { display: flex; flex-direction: column; min-height: 0; padding: 14px 12px 12px; background: var(--surface); border-right: 1px solid var(--line); z-index: 30; }
.sb-brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 14px; color: var(--ink); border-radius: 10px; }
.sb-brand:focus-visible { outline: none; box-shadow: var(--ring); }
.sb-name { min-width: 0; }
.sb-name b { display: block; font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-name small { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; min-height: 0; padding-bottom: 8px; }
.sb-nav > *, .sb-foot > * { flex: none; }
.sb-sec { margin: 18px 10px 6px; font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.nav-i { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 9px; color: var(--ink-2); font-size: 13.5px; font-weight: 500; transition: background .12s, color .12s; }
.nav-i .i { color: var(--muted); }
.nav-i:hover { background: var(--surface-3); color: var(--ink); }
.nav-i:focus-visible { outline: none; box-shadow: var(--ring); }
.nav-i.on { background: var(--brand-50); color: var(--brand-600); font-weight: 600; }
.nav-i.on .i { color: var(--brand); }
.nav-l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 11.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.nb.warn { background: var(--warn-100); color: var(--warn); }
.nb.brand { background: var(--brand); color: #fff; }
.nb.soft { background: var(--surface-3); color: var(--muted); }
.nb.urg { background: var(--danger); color: #fff; }
.nav-i.on .nb.soft { background: var(--surface); }
.sb-sq { display: flex; align-items: center; gap: 10px; height: 31px; padding: 0 10px 0 13px; border-radius: 8px; color: var(--ink-2); font-size: 13px; transition: background .12s; }
.sb-sq i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.sb-sq:hover { background: var(--surface-3); color: var(--ink); }
.sb-sq:focus-visible { outline: none; box-shadow: var(--ring); }
.sb-sq.on { background: var(--surface-2); color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }
.sb-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 6px; }
.sb-sync { display: grid; gap: 5px; padding: 10px 11px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); text-align: left; cursor: pointer; font-size: 12px; color: var(--muted); }
.sb-sync:hover { border-color: var(--line); background: var(--surface-3); }
.sb-sync:focus-visible { outline: none; box-shadow: var(--ring); }
.sy-r { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sy-d { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--faint); display: inline-block; }
.sy-d.ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-50); }
.sy-d.warn { background: #E8A31B; box-shadow: 0 0 0 3px var(--warn-50); }
.sy-d.err { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-50); }
.sy-l { width: 56px; flex: none; color: var(--ink-2); font-weight: 600; }
.sy-v { min-width: 0; }
.off-line .sy-l { width: auto; color: var(--danger); }
.sb-ov { display: none; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100vh; }
.tb { height: var(--tb-h); flex: none; display: flex; align-items: center; gap: 10px; padding: 0 var(--pad-x); background: rgba(244, 246, 244, .92); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.tb-t { min-width: 0; flex: 1; }
.tb-t h1 { margin: 0; font-size: 16.5px; font-weight: 650; letter-spacing: -.01em; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-menu { display: none; }
.tb-new, .tb-prom { flex: none; height: 38px; border-radius: 10px; padding: 0 14px; }
.tb-new { box-shadow: 0 1px 2px rgba(35, 115, 35, .25); }
.tb-ic { position: relative; flex: none; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink-2); cursor: pointer; transition: background .12s, border-color .12s; }
.tb-ic:hover, .tb-ic[aria-expanded] { background: var(--surface-2); border-color: #CCD5CE; }
.tb-ic:focus-visible { outline: none; box-shadow: var(--ring); }
.tb-bn { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; background: var(--ink-2); color: #fff; box-shadow: 0 0 0 2px var(--bg); font-variant-numeric: tabular-nums; }
.tb-bn.urg { background: var(--danger); }
.tb-user { flex: none; display: flex; align-items: center; gap: 4px; height: 38px; padding: 0 6px 0 3px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; }
.tb-user:hover, .tb-user[aria-expanded] { background: var(--surface-3); }
.tb-user:focus-visible { outline: none; box-shadow: var(--ring); }
.tb-uc { width: 14px; height: 14px; color: var(--faint); }

/* busqueda global */
.gs { position: relative; width: clamp(220px, 28vw, 420px); flex: none; }
.gs-ic { position: absolute; left: 12px; top: 10px; width: 18px; height: 18px; color: var(--faint); pointer-events: none; }
.gs-in { width: 100%; height: 38px; padding: 0 38px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); outline: none; font-size: 13.5px; box-shadow: var(--shadow-xs); transition: border-color .12s, box-shadow .12s; }
.gs-in::-webkit-search-cancel-button { display: none; }
.gs-in:focus { border-color: var(--brand-500); box-shadow: var(--ring); }
.gs-in::placeholder { color: var(--faint); }
.gs-k { position: absolute; right: 9px; top: 9px; min-width: 20px; height: 20px; display: grid; place-items: center; font: 600 11px/1 var(--font); color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; pointer-events: none; }
.gs-in:focus ~ .gs-k { opacity: 0; }
.gs-drop { position: absolute; top: 46px; right: 0; width: max(100%, 560px); max-height: min(72vh, 640px); overflow: auto; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 48px rgba(16, 32, 20, .16), 0 2px 8px rgba(16, 32, 20, .06); animation: pop .12s ease-out; }
.gs-g { display: flex; justify-content: space-between; padding: 10px 10px 4px; font-size: 11px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.gs-g span { color: var(--faint); }
.gs-i { display: flex; align-items: center; gap: 11px; width: 100%; padding: 8px 10px; border: 0; border-radius: 9px; background: transparent; text-align: left; cursor: pointer; }
.gs-i.act { background: var(--brand-50); }
.gs-av { --sq: var(--muted); width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 9px; font-size: 11.5px; font-weight: 700; background: color-mix(in srgb, var(--sq) 13%, #fff); color: color-mix(in srgb, var(--sq) 80%, #000); }
.gs-av .i { width: 16px; height: 16px; }
.gs-av.cli { background: var(--surface-3); color: var(--muted); }
.gs-m { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gs-n { font-size: 13.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-s { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); min-width: 0; }
.gs-s b { font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.gs-s .chip { height: 18px; padding: 0 6px; font-size: 10.5px; flex: none; }
.gs-i > .chip { flex: none; }
.gs-d { font-size: 12px; color: var(--muted); flex: none; }
.gs-all { margin-top: 4px; border-top: 1px solid var(--line-2); border-radius: 0 0 9px 9px; color: var(--brand-600); font-weight: 600; font-size: 13px; padding: 10px; }
.gs-all .i { color: var(--brand); width: 16px; height: 16px; }
.gs-all kbd { font: 600 11px/1 var(--font); color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 3px 5px; background: var(--surface); }
.gs-empty, .gs-load { padding: 14px 12px; font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.gs-load { display: block; }

/* contenido */
.content { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 24px var(--pad-x) 72px; outline: none; }
.wrap { max-width: 1520px; margin: 0 auto; }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.page-h.slim { margin-bottom: 16px; }
.ph-t { margin: 0 0 4px; font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.ph-s { margin: 0; font-size: 13.5px; color: var(--muted); max-width: 820px; }
.ph-s b { color: var(--ink-2); font-weight: 650; }
.ph-a { display: flex; gap: 8px; flex: none; flex-wrap: wrap; justify-content: flex-end; }

/* estados vacios / error / no disponible */
.state { padding: 44px 24px; text-align: center; color: var(--muted); }
.state-ic { width: 52px; height: 52px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-3); color: var(--faint); }
.state-ic .i { width: 24px; height: 24px; }
.state h4 { margin: 0 0 4px; font-size: 15px; font-weight: 650; color: var(--ink); }
.state p { margin: 0 auto 16px; max-width: 440px; font-size: 13px; line-height: 1.5; }
.state.err .state-ic { background: var(--danger-50); color: var(--danger); }
.state.nd .state-ic { background: var(--info-50); color: var(--info); }
.lcard .state, .viz .state { padding: 26px 16px; }
.skc { padding: 18px 20px; margin-bottom: 16px; }
.skel-tbl { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 6px 18px; }
.skel-r { display: flex; gap: 28px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line-2); }
.skel-r:last-child { border-bottom: 0; }
.skel-r .skel { height: 12px; }
[data-body].loading, .cal-card.loading { opacity: .55; transition: opacity .15s; pointer-events: none; }

/* botones-enlace */
.linkb { padding: 0; border: 0; background: none; cursor: pointer; font: inherit; font-weight: 600; color: var(--brand-600); display: inline-flex; align-items: center; gap: 4px; max-width: 100%; }
.linkb:hover { text-decoration: underline; }
.linkb .i { width: 14px; height: 14px; flex: none; }

/* ------------------------------------------------------------------ popover / menu */
.pop { position: fixed; z-index: 90; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; max-height: 76vh; overflow: auto;
  box-shadow: 0 14px 36px rgba(16, 32, 20, .14), 0 2px 6px rgba(16, 32, 20, .06); animation: pop .12s ease-out; }
.menu { display: flex; flex-direction: column; min-width: 200px; }
.menu-t { padding: 8px 10px 4px; font-size: 11px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-i { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; text-align: left; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.menu-i .i { width: 16px; height: 16px; color: var(--muted); }
.menu-i:hover, .menu-i:focus-visible { background: var(--surface-3); outline: none; color: var(--ink); }
.menu-i:disabled { opacity: .45; cursor: not-allowed; }
.menu-i.danger, .menu-i.danger .i { color: var(--danger); }
.menu-i.sel { color: var(--brand-600); font-weight: 600; }
.menu-i .grow { display: flex; align-items: center; gap: 8px; }
.menu-h { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.menu-ok { color: var(--brand) !important; }
.menu-n { padding: 8px 10px 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line-2); font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-sep { height: 1px; background: var(--line-2); margin: 6px 4px; }
.sw-a { display: inline-block; width: 8px; height: 8px; border-radius: 2px; flex: none; background: var(--c, var(--muted)); }

.pop-f { padding: 0; }
.fpop-s { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--line-2); color: var(--faint); }
.fpop-s .i { width: 16px; height: 16px; }
.fpop-s input { flex: 1; border: 0; outline: none; background: transparent; font-size: 13px; min-width: 0; }
.fpop-l { padding: 6px; max-height: 340px; overflow: auto; }
.fpop-i { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 32px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; text-align: left; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.fpop-i:hover, .fpop-i:focus-visible { background: var(--surface-3); outline: none; }
.fpop-i.sel { color: var(--brand-600); font-weight: 600; }
.fpop-n { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fpop-ok { width: 15px; height: 15px; color: var(--brand); }
.cbx { width: 16px; height: 16px; flex: none; display: grid; place-items: center; border-radius: 5px; border: 1.5px solid #B8C2BB; background: var(--surface); }
.cbx .i { width: 11px; height: 11px; stroke-width: 3; opacity: 0; }
.fpop-i.sel .cbx { background: var(--brand); border-color: var(--brand); color: #fff; }
.fpop-i.sel .cbx .i { opacity: 1; }
.fpop-e { padding: 14px; font-size: 13px; color: var(--muted); text-align: center; }
.fpop-f { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--line-2); background: var(--surface-2); border-radius: 0 0 12px 12px; }
.fpop-cu { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line-2); }
.fpop-cu .lbl { margin: 0; }

/* ------------------------------------------------------------------ graficos (metodo dataviz) */
.viz-card .card-h { padding: 14px 18px 8px; border-bottom: 0; }
.viz-card .card-b { padding: 4px 18px 16px; }
.viz-lgd { padding: 0 18px 4px; }
.viz { position: relative; width: 100%; min-height: 60px; }
.viz svg { display: block; overflow: visible; font-family: var(--font); }
.viz svg .gr { stroke: var(--viz-grid); stroke-width: 1; }
.viz svg .ax { stroke: var(--viz-axis); stroke-width: 1; }
.viz svg .tk { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.viz svg .tk.cur { fill: var(--ink); font-weight: 700; }
.viz svg .yr { font-size: 10.5px; }
.viz svg .pt { fill: var(--ink-2); font-size: 12px; font-weight: 650; }
.viz svg .ln.fut { stroke-dasharray: 4 4; opacity: .7; }
.viz svg .lb { fill: var(--ink-2); font-size: 12.5px; font-weight: 500; }
.viz svg .vl { fill: var(--ink); font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; pointer-events: none; }
.viz svg .bar.s-one { fill: var(--viz-one); }
.viz svg .bar { transition: filter .12s, opacity .12s; }
.viz svg .ln { fill: none; stroke: var(--viz-one); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; pointer-events: none; }
.viz svg .ar { fill: var(--viz-one); opacity: .1; pointer-events: none; }
.viz svg .dt { fill: var(--viz-one); stroke: var(--surface); stroke-width: 2; pointer-events: none; }
.viz svg .xh { stroke: var(--ink-2); stroke-width: 1; opacity: 0; pointer-events: none; transition: opacity .1s; }
.viz svg .fut .bar { opacity: .45; }
.viz svg .hit { fill: transparent; }
.viz svg .mk { cursor: pointer; outline: none; }
.viz svg .mk:hover .bar, .viz svg .mk:focus-visible .bar { filter: brightness(1.12) saturate(1.05); }
.viz svg .mk:hover .xh, .viz svg .mk:focus-visible .xh { opacity: .28; }
.viz svg .mk:hover .hit.col { fill: rgba(16, 32, 20, .03); }
.viz svg .mk:focus-visible .hit { fill: rgba(58, 170, 53, .07); stroke: var(--brand-500); stroke-width: 1.5; }
.lgd { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; }
.lgd-i { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); font-weight: 500; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.viz-sw { color: var(--muted); }
.viz-sw[aria-pressed="true"] { color: var(--brand-600); background: var(--brand-50); }
.viz-tbl { max-height: 360px; overflow: auto; }
table.tbl.mini th { position: static; font-size: 11px; padding: 8px 10px; }
table.tbl.mini td { padding: 8px 10px; font-size: 13px; }
table.tbl.mini tbody tr { cursor: default; }
table.tbl .num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl tr.tot td { background: var(--surface-2); }
.viz-tip { position: fixed; z-index: 130; pointer-events: none; min-width: 160px; max-width: 290px; padding: 9px 11px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 28px rgba(16, 32, 20, .14); font-size: 12px; }
.viz-tip-t { font-weight: 650; color: var(--ink); margin-bottom: 6px; font-size: 12.5px; }
.viz-tip-r { display: flex; align-items: center; gap: 8px; line-height: 1.7; }
.viz-tip-k { width: 12px; height: 3px; border-radius: 2px; flex: none; }
.viz-tip-k.none { background: transparent; }
.viz-tip-r strong { font-size: 13px; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; min-width: 22px; }
.viz-tip-l { color: var(--muted); }

/* ------------------------------------------------------------------ piezas comunes: grupos por squadra, filas de trabajo, indicadores */
.prio { display: inline-flex; color: #CA8A04; flex: none; }
.prio .i { width: 13px; height: 13px; fill: currentColor; }
.kw { display: inline-flex; align-items: baseline; gap: 6px; flex: none; font-size: 11.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.kw b { color: var(--ink-2); font-weight: 650; }
.bd-w { display: inline-flex; align-items: center; gap: 3px; flex: none; }
.bd { display: inline-flex; align-items: center; gap: 2px; height: 20px; padding: 0 4px; border-radius: 6px; font-size: 10.5px; font-weight: 700; color: var(--muted); background: var(--surface-3); font-variant-numeric: tabular-nums; }
.bd .i { width: 13px; height: 13px; }
.bd .bd-ok { width: 10px; height: 10px; stroke-width: 3; margin-left: -1px; }
.bd.ok { color: #15803D; background: var(--ok-50); }
.bd.no { color: #B42318; background: var(--danger-50); }
.bd.wa { color: var(--warn); background: var(--warn-50); }
.bd.in { color: var(--info); background: var(--info-50); }
.sqg { --sq: var(--muted); }
.sqg + .sqg { margin-top: 6px; }
.sqg-h { display: flex; align-items: center; gap: 8px; padding: 8px 10px 4px; font-size: 12.5px; }
.sqg-h i { width: 10px; height: 10px; border-radius: 3px; background: var(--sq); flex: none; }
.sqg-h b { font-weight: 650; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sqg-n { margin-left: auto; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.sqg-n em { font-style: normal; font-weight: 700; color: var(--danger); }
.sqg-l { display: flex; flex-direction: column; margin-left: 14px; border-left: 2px solid color-mix(in srgb, var(--sq) 45%, transparent); }
.lav { --st: var(--muted); display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: start; gap: 8px; width: 100%; min-width: 0; padding: 8px 10px 8px 10px; border: 0; border-radius: 0 9px 9px 0; background: transparent; text-align: left; cursor: pointer; color: var(--ink); font: inherit; }
.lav:hover { background: var(--surface-2); }
.lav:focus-visible { outline: none; box-shadow: var(--ring); }
.lav + .lav { border-top: 1px solid var(--line-2); }
.lav-t { display: flex; flex-direction: column; padding-top: 2px; font-size: 12px; font-weight: 650; color: var(--ink-2); font-variant-numeric: tabular-nums; line-height: 1.3; }
.lav-t b { font-weight: 650; }
.lav-m { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lav-n { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13.5px; }
.lav-n b { font-weight: 650; min-width: 0; }
.lav-n .chip.stato { flex: none; height: 20px; font-size: 10.5px; padding: 0 7px; }
.lav-md { flex: none; font-size: 10.5px; font-weight: 650; color: var(--info); background: var(--info-50); padding: 1px 6px; border-radius: 5px; }
.lav-s { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12px; color: var(--muted); }
.lav-b { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }

/* ------------------------------------------------------------------ panoramica */
.pano-top { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; margin-bottom: 16px; align-items: stretch; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.kpi { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "ic l" "v v" "s s"; align-items: center; column-gap: 8px; row-gap: 2px; padding: 12px 14px 11px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-xs); transition: border-color .12s, box-shadow .12s, transform .12s; min-width: 0; }
.kpi:hover { border-color: #C9D3CB; box-shadow: var(--shadow); }
.kpi:focus-visible { outline: none; box-shadow: var(--ring); }
.kpi-ic { grid-area: ic; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: var(--surface-3); color: var(--muted); }
.kpi-ic .i { width: 15px; height: 15px; }
.kpi-l { grid-area: l; font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-v { grid-area: v; margin-top: 6px; font-size: 28px; font-weight: 650; letter-spacing: -.02em; line-height: 1.1; color: var(--ink); }
.kpi-s { grid-area: s; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi[data-tone="urg"] { border-color: #FDDCAB; background: linear-gradient(180deg, #FFF8F2, var(--surface) 70%); }
.kpi[data-tone="urg"] .kpi-ic { background: #FFEDD5; color: #C2410C; }
.kpi[data-tone="urg"] .kpi-v { color: #C2410C; }
.kpi[data-tone="danger"] .kpi-ic { background: var(--danger-50); color: var(--danger); }
.kpi[data-tone="danger"] .kpi-v { color: var(--danger); }
.kpi[data-tone="warn"] .kpi-ic { background: var(--warn-50); color: var(--warn); }
.kpi[data-tone="warn"] .kpi-v { color: var(--warn); }
.kpi[data-tone="info"] .kpi-ic { background: var(--info-50); color: var(--info); }
.kpi[data-tone="sun"] .kpi-ic { background: var(--sun-50); color: #A16207; }
.kpi:not([data-tone=""]) .kpi-v::after { content: ""; }
.kpi[data-tone=""] .kpi-v { color: var(--faint); }
.kpi.sk { display: flex; flex-direction: column; gap: 8px; }
.mese { display: flex; flex-direction: column; padding: 14px 16px 12px; background: linear-gradient(160deg, #F3FAF1 0%, #FFFFFF 55%, #FFFBEA 100%); }
.mese.sk { padding: 18px; }
.mese-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.mese-k { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-600); }
.mese-k .i { width: 15px; height: 15px; color: #CA8A04; }
.mese-h b { font-size: 13px; font-weight: 600; color: var(--muted); }
.mese-f { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0 auto; }
.fig { display: flex; flex-direction: column; gap: 2px; padding: 8px 4px; border-radius: 10px; color: var(--ink); min-width: 0; }
a.fig:hover { background: rgba(255, 255, 255, .7); }
a.fig:focus-visible { outline: none; box-shadow: var(--ring); }
.fig-v { font-size: 30px; font-weight: 650; letter-spacing: -.02em; line-height: 1.05; white-space: nowrap; }
.fig-v small { margin-left: 3px; font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.fig-l { font-size: 12px; color: var(--muted); }
.mese-p { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); }
.pill .i { width: 14px; height: 14px; color: var(--muted); }
.pill b { color: var(--ink); font-variant-numeric: tabular-nums; }
.pill:hover { border-color: #C9D3CB; }
.pill.late { background: var(--danger-50); border-color: var(--danger-100); color: #B42318; }
.pill.late .i, .pill.late b { color: var(--danger); }
.pano-g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; align-items: start; }
.pano-g3 > .card { min-width: 0; }
.lcard .card-h { padding: 14px 18px 10px; border-bottom: 0; }
.lcard-b { padding: 0 8px 10px; display: flex; flex-direction: column; }
.gh-d { margin-left: 4px; font-size: 13px; font-weight: 500; color: var(--muted); }
.giorno .lcard-b { padding-bottom: 12px; }
.ur { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; padding: 8px; border: 0; border-radius: 9px; background: transparent; text-align: left; cursor: pointer; color: var(--ink); font: inherit; }
.ur + .ur { border-top: 1px solid var(--line-2); border-radius: 0 0 9px 9px; }
.ur:hover { background: var(--surface-2); }
.ur:focus-visible { outline: none; box-shadow: var(--ring); }
.ur-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--faint); }
.ur[data-urg="alta"] .ur-dot { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-50); }
.ur[data-urg="media"] .ur-dot { background: #E8A31B; box-shadow: 0 0 0 3px var(--warn-50); }
.ur-m { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ur-m b { font-size: 13px; font-weight: 600; }
.ur-t { font-size: 12px; color: var(--muted); }
.ur-d { flex: none; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.ur-d.late { color: var(--danger); font-weight: 600; }
/* tablero "questa settimana" */
.board { margin-bottom: 16px; overflow: hidden; }
.board .card-h { flex-wrap: wrap; border-bottom: 0; padding-bottom: 8px; }
.bw { --nd: 6; padding: 0 12px 12px; overflow-x: auto; }
.bw-r { --sq: var(--muted); display: grid; grid-template-columns: 150px repeat(var(--nd), minmax(110px, 1fr)); gap: 0; min-width: calc(150px + var(--nd) * 112px); border-top: 1px solid var(--line-2); }
.bw-h { border-top: 0; }
.bw-h .bw-d { padding: 6px 8px; font-size: 12px; color: var(--muted); }
.bw-h .bw-d b { color: var(--ink-2); font-weight: 650; }
.bw-h .bw-d.oggi { color: var(--brand-600); }
.bw-h .bw-d.oggi b { color: var(--brand-600); }
.bw-sq { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 4px; min-width: 0; color: var(--ink); font-size: 13px; border-radius: 8px; }
a.bw-sq:hover { background: var(--surface-2); }
a.bw-sq:focus-visible { outline: none; box-shadow: var(--ring); }
.bw-sq i { width: 4px; align-self: stretch; min-height: 22px; border-radius: 4px; background: var(--sq); flex: none; }
.bw-sq b { font-weight: 650; min-width: 0; }
.bw-sq small { margin-left: auto; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bw-d { display: flex; flex-direction: column; gap: 3px; padding: 6px; min-width: 0; border-left: 1px solid var(--line-2); }
.bw-d.oggi { background: rgba(46, 139, 46, .04); }
.bw-d.fest { background: repeating-linear-gradient(135deg, #F6F7F6 0 6px, #FFFFFF 6px 12px); }
.bw-v { color: var(--faint); font-size: 12px; padding: 2px 4px; }
.bw-c { --st: var(--muted); display: flex; align-items: center; gap: 6px; min-width: 0; height: 24px; padding: 0 7px; border: 0; border-radius: 6px; background: color-mix(in srgb, var(--sq) 9%, #fff); box-shadow: inset 2px 0 0 var(--sq); font-size: 12px; font-weight: 600; color: var(--ink); cursor: pointer; text-align: left; }
.bw-c i { width: 6px; height: 6px; border-radius: 50%; background: var(--st); flex: none; }
.bw-c:hover { filter: brightness(.97); }
.bw-c:focus-visible { outline: none; box-shadow: inset 2px 0 0 var(--sq), var(--ring); }
.bw-more { font-size: 11.5px; font-weight: 650; color: var(--brand-600); padding: 0 6px; }
/* fabbisogno */
.fb-card { overflow: hidden; }
.fb-w { padding: 0 6px 6px; max-height: 520px; overflow: auto; }
table.fb th, table.fb td { vertical-align: top; }
table.fb .fb-cat th { position: sticky; top: 0; background: var(--surface-2); color: var(--ink-2); font-size: 11.5px; text-transform: none; letter-spacing: 0; padding: 8px 10px; }
table.fb .fb-cat th .i { width: 15px; height: 15px; color: var(--brand); vertical-align: -3px; margin-right: 6px; }
table.fb tr.fb-x { display: none; }
table.fb td b { font-weight: 650; }
.fb-in { display: flex; flex-wrap: wrap; gap: 4px; }
.fb-i { --sq: var(--muted); display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 11.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.fb-i i { width: 7px; height: 7px; border-radius: 2px; background: var(--sq); }
.fb-i em { font-style: normal; font-size: 10px; font-weight: 700; color: var(--warn); }
.fb-i:hover { border-color: var(--brand-100); background: var(--brand-50); }
.fbm-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.fbm-bar .select { width: 220px; }
.fbm .note { margin-bottom: 10px; }
/* promemoria en panoramica */
.prr { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 9px; }
.prr + .prr { border-top: 1px solid var(--line-2); border-radius: 0 0 9px 9px; }
.prr-t { width: 60px; flex: none; display: flex; flex-direction: column; align-items: center; padding: 4px 0; border-radius: 8px; background: var(--surface-3); line-height: 1.15; }
.prr-t b { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.prr-t small { font-size: 10.5px; color: var(--muted); }
.prr.late .prr-t { background: var(--danger-50); color: var(--danger); }
.prr-m { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.prr-m b { font-size: 13px; font-weight: 600; }
.prr-m small, .prr-m .linkb { font-size: 12px; color: var(--muted); font-weight: 500; }

/* ------------------------------------------------------------------ calendario */
.cal-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.cal-nav { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cal-tit { margin: 0 0 0 8px; font-size: 19px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.cal-wk { font-size: 12px; font-weight: 600; color: var(--muted); padding: 2px 8px; border-radius: 999px; background: var(--surface-3); white-space: nowrap; }
.cal-wk:empty { display: none; }
.cal-jump { position: relative; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--muted); cursor: pointer; }
.cal-jump:hover { background: var(--surface-3); color: var(--ink); }
.cal-jump:focus-within { box-shadow: var(--ring); }
.cal-jump .i { width: 17px; height: 17px; }
.cal-jump input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; border: 0; padding: 0; }
.cal-jump input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.cal-f { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-bottom: 8px; }
.sqf { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.sqc { --sq: var(--muted); display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: background .12s, border-color .12s, box-shadow .12s; }
.sqc i { width: 10px; height: 10px; border-radius: 3px; background: var(--sq); flex: none; }
.sqc span { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--surface-3); color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.sqc:hover { border-color: #C9D3CB; }
.sqc:focus-visible { outline: none; box-shadow: var(--ring); }
.sqc.on { border-color: var(--sq); background: color-mix(in srgb, var(--sq) 10%, #fff); color: var(--ink); box-shadow: inset 0 0 0 1px var(--sq); }
.sqc.on span { background: var(--surface); color: var(--ink-2); }
.sqc.tutte.on { border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-600); box-shadow: inset 0 0 0 1px var(--brand-500); }
.cal-f .lsearch.cal-q { width: 170px; flex: none; }
@media (min-width: 1600px) { .cal-f .lsearch.cal-q { width: 230px; } }
.tray-b b { min-width: 20px; height: 18px; padding: 0 5px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--surface-3); font-size: 11px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tray-b[aria-pressed="true"] { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-600); }
.tray-b[aria-pressed="true"] b { background: var(--surface); }
.cal-sum { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-height: 22px; margin-bottom: 10px; font-size: 13px; color: var(--muted); }
.cal-sum b { color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.sm-i { display: inline-flex; align-items: center; gap: 5px; }
.sm-i i { width: 8px; height: 8px; border-radius: 50%; }
.sm-i .i { width: 14px; height: 14px; }
.sm-i.no, .sm-i.no b { color: #B42318; }
.sm-s { color: var(--faint); }
.sm-h { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--faint); }
.sm-h .i { width: 14px; height: 14px; }
.cal-card { overflow: auto; }
/* semana por squadra: filas = squadre, columnas = dias */
.wk { --nd: 6; min-width: calc(196px + var(--nd) * 136px); }
.wk-r { --sq: var(--muted); display: grid; grid-template-columns: 196px repeat(var(--nd), minmax(136px, 1fr)); border-bottom: 1px solid var(--line); }
.wk-r:last-child { border-bottom: 0; }
.wk-h { position: sticky; top: 0; z-index: 3; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.wk-sq { position: sticky; left: 0; z-index: 2; display: flex; flex-direction: column; gap: 6px; padding: 10px 10px 10px 16px; background: var(--surface); border-right: 1px solid var(--line); min-width: 0; }
.wk-h .wk-sq { background: var(--surface-2); justify-content: flex-end; font-size: 11px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding-bottom: 8px; }
.wk-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--sq); }
.wk-sqm { display: flex; flex-direction: column; min-width: 0; }
.wk-sqm b { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.wk-sqm small { font-size: 11.5px; color: var(--muted); }
.wk-sqa { display: flex; gap: 4px; flex-wrap: wrap; }
.wk-sqa .btn { height: 24px; padding: 0 7px; font-size: 11.5px; gap: 4px; border-radius: 7px; }
.wk-sqa .btn .i { width: 13px; height: 13px; }
.wk-dh { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 5px; padding: 8px 10px 7px; border-left: 1px solid var(--line-2); min-width: 0; font-size: 12px; color: var(--muted); }
.wk-r .wk-c:first-of-type, .wk-h .wk-dh:first-of-type { border-left: 0; }
.wk-dn { font-weight: 600; text-transform: capitalize; }
.wk-dh b { font-size: 18px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.1; }
.wk-dm { font-size: 12px; }
.wk-dh em { flex-basis: 100%; font-style: normal; font-size: 11px; font-weight: 650; color: #B54708; }
.wk-dh .sp { flex: 1; }
.wk-dc { min-width: 20px; height: 18px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; align-self: center; }
.wk-pr { display: inline-flex; align-items: center; gap: 2px; height: 20px; padding: 0 6px; border: 0; border-radius: 999px; background: var(--sun-50); color: #8A6100; font-size: 11px; font-weight: 700; cursor: pointer; align-self: center; }
.wk-pr .i { width: 12px; height: 12px; }
.wk-pr:hover { background: #FFEFB3; }
.wk-dh.oggi { background: var(--brand-50); color: var(--brand-600); box-shadow: inset 0 -2px 0 var(--brand); }
.wk-dh.oggi b { color: var(--brand-600); }
.wk-dh.fest { background: #FFF8EC; }
.wk-dh.pass b { color: var(--muted); }
.wk-c { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 96px; padding: 8px; border-left: 1px solid var(--line-2); background: var(--surface); transition: background .12s, box-shadow .12s; }
.wk-c.oggi { background: #F8FCF7; }
.wk-c.fest { background: repeating-linear-gradient(135deg, #FBFBF9 0 7px, #FFFFFF 7px 14px); }
.wk-c.pass { background: #FBFCFB; }
.wk-c.pieno { background: #FFFAF5; box-shadow: inset 0 0 0 1.5px #F7B27A; }
.wk-c[data-drop].over { background: var(--brand-50); box-shadow: inset 0 0 0 2px var(--brand-500); }
.wk-r.senza .wk-c { background: #FAFBFA; }
.wk-over { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; font-size: 10.5px; font-weight: 700; color: #C2410C; }
.wk-over .i { width: 12px; height: 12px; }
.wk-free { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 40px; padding: 0 8px; border: 1.5px dashed #D3DBD5; border-radius: 10px; background: transparent; color: var(--faint); font-size: 12px; font-weight: 600; cursor: pointer; transition: border-color .12s, color .12s, background .12s; }
.wk-free .i { width: 14px; height: 14px; }
.wk-free span { opacity: 0; transition: opacity .12s; }
.wk-c:hover .wk-free span, .wk-free:focus-visible span { opacity: 1; }
.wk-free:hover, .wk-free:focus-visible { border-color: var(--brand-500); color: var(--brand-600); background: var(--brand-50); outline: none; }
.dragging .wk-free { visibility: hidden; }
/* tarjeta de trabajo */
.wkc { --st: var(--muted); position: relative; display: flex; flex-direction: column; gap: 3px; padding: 7px 9px 7px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-xs), inset 3px 0 0 var(--st); cursor: grab; transition: box-shadow .12s, border-color .12s, opacity .12s, transform .12s; min-width: 0; }
.wkc:hover { border-color: #C9D3CB; box-shadow: var(--shadow), inset 3px 0 0 var(--st); }
.wkc:focus-visible { outline: none; box-shadow: var(--ring), inset 3px 0 0 var(--st); }
.wkc.drag, .mo-ev.drag, .tc.drag { opacity: .4; transform: rotate(1deg); }
.wkc.post { background: #FBFCFB; }
.wkc.ann { opacity: .6; }
.wkc.ann .wkc-n { text-decoration: line-through; }
.wkc-t { display: flex; align-items: flex-start; gap: 5px; min-width: 0; }
.wkc-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--st); flex: none; margin-top: 5px; }
.wkc-n { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 700; line-height: 1.25; color: var(--ink); letter-spacing: -.005em; overflow-wrap: break-word; hyphens: auto;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wkc-o { flex: none; font-size: 10.5px; font-weight: 700; color: var(--ink); background: var(--surface-3); padding: 0 5px; border-radius: 5px; font-variant-numeric: tabular-nums; line-height: 17px; }
.wkc-s { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 11.5px; color: var(--muted); }
.wkc-l { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 7px; font-size: 11.5px; }
.wkc-tipo { font-weight: 600; color: var(--ink-2); }
.wkc-l .kw { font-size: 11px; }
.wkc-b { display: flex; align-items: center; flex-wrap: wrap; gap: 3px; margin-top: 2px; }
.wkc-b .flg { min-width: 18px; height: 18px; }
.wkc-b .flg .i { width: 12px; height: 12px; }
.wkc-b .bd { height: 18px; }
.wkc-md { align-self: flex-start; font-size: 10px; font-weight: 700; color: var(--info); background: var(--info-50); padding: 1px 6px; border-radius: 5px; }
.wkc-mv { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); box-shadow: var(--shadow-xs); color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .12s; }
.wkc-mv .i { width: 15px; height: 15px; }
.wkc:hover .wkc-mv, .wkc:focus-within .wkc-mv, .wkc-mv[aria-expanded] { opacity: 1; }
.wkc-mv:hover { background: var(--surface-3); color: var(--ink); }
.wkc-mv:focus-visible { opacity: 1; outline: none; box-shadow: var(--ring); }
/* mes */
.mo-dow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: var(--surface-2); position: sticky; top: 0; z-index: 2; }
.mo-dow span { padding: 8px 10px; font-size: 11px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.mo-dow span.we { color: var(--faint); }
.mo-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: minmax(124px, auto); }
.mo-d { position: relative; display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 5px 6px 7px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); background: var(--surface); transition: background .12s, box-shadow .12s; }
.mo-d:nth-child(7n) { border-right: 0; }
.mo-d.we { background: #FBFCFB; }
.mo-d.fest { background: repeating-linear-gradient(135deg, #FBFBF9 0 7px, #FFFFFF 7px 14px); }
.mo-d.fuori { background: #FAFBFA; }
.mo-d.fuori .mo-dn, .mo-d.fuori .mo-evs { opacity: .5; }
.mo-d.oggi { background: #F5FBF4; box-shadow: inset 0 0 0 1.5px var(--brand-100); }
.mo-d.over { background: var(--brand-50); box-shadow: inset 0 0 0 2px var(--brand-500); }
.mo-dh { display: flex; align-items: center; gap: 5px; min-height: 24px; min-width: 0; }
.mo-dn { width: 26px; height: 24px; flex: none; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; font-size: 12.5px; font-weight: 650; color: var(--ink-2); font-variant-numeric: tabular-nums; cursor: pointer; }
.mo-dn:hover { background: var(--surface-3); }
.mo-d.oggi .mo-dn { background: var(--brand); color: #fff; }
.mo-fn { min-width: 0; font-size: 10.5px; font-weight: 650; color: #B54708; }
.mo-dc { font-size: 10.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.mo-evs { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mo-ev { --sq: var(--muted); --st: var(--muted); display: flex; align-items: center; gap: 5px; width: 100%; min-width: 0; height: 23px; padding: 0 6px 0 8px; border: 0; border-radius: 6px; background: color-mix(in srgb, var(--sq) 10%, #fff); box-shadow: inset 3px 0 0 var(--sq); color: var(--ink); font-size: 11.5px; font-weight: 600; line-height: 1; text-align: left; cursor: pointer; }
.mo-ev:hover { filter: brightness(.97); }
.mo-ev:focus-visible { outline: none; box-shadow: inset 3px 0 0 var(--sq), var(--ring); }
.mo-ev.ann span { text-decoration: line-through; opacity: .7; }
.mo-st { width: 6px; height: 6px; border-radius: 50%; background: var(--st); flex: none; }
.mo-ev > span.ellipsis { flex: 1; min-width: 0; }
.mo-x, .mo-ok { display: inline-flex; flex: none; }
.mo-x .i, .mo-ok .i { width: 12px; height: 12px; }
.mo-x { color: #B42318; }
.mo-ok { color: #15803D; }
.mo-ok .i { stroke-width: 3; }
.mo-more { align-self: flex-start; height: 20px; padding: 0 6px; border: 0; border-radius: 5px; background: transparent; font-size: 11.5px; font-weight: 650; color: var(--brand-600); cursor: pointer; }
.mo-more:hover { background: var(--brand-50); }
/* agenda */
.ag { display: flex; flex-direction: column; }
.ag-g { border-bottom: 1px solid var(--line-2); padding-bottom: 6px; }
.ag-g:last-child { border-bottom: 0; }
.ag-g > header { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 9px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.ag-g.oggi > header { background: var(--brand-50); }
.ag-g.pass > header b { color: var(--muted); }
.ag-g > header .chip { height: 20px; font-size: 10.5px; }
.ag-g .sqg { padding: 0 10px; }
.ag-pr { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 16px 0; }
.ag-pri { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 28px; padding: 0 10px; border: 1px solid #F3E2A9; border-radius: 999px; background: var(--sun-50); font-size: 12.5px; color: #6B4E00; cursor: pointer; text-align: left; }
.ag-pri .i { width: 14px; height: 14px; color: #A16207; flex: none; }
.ag-pri b { font-variant-numeric: tabular-nums; }
.ag-pri:hover { background: #FFF1C2; }
/* bandeja da pianificare */
.tray { margin-bottom: 12px; padding: 12px 14px 14px; }
.tray-h { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; font-size: 13px; }
.tray-h > .i { width: 17px; height: 17px; color: var(--muted); }
.tray-h .faint { font-size: 12px; }
.tray-l { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 8px; max-height: 280px; overflow: auto; padding: 2px; }
.tc { --st: var(--muted); --sq: var(--muted); display: flex; flex-direction: column; gap: 4px; padding: 8px 10px 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-xs), inset 3px 0 0 var(--st); cursor: grab; min-width: 0; }
.tc:hover { border-color: #C9D3CB; box-shadow: var(--shadow), inset 3px 0 0 var(--st); }
.tc:focus-visible { outline: none; box-shadow: var(--ring); }
.tc-t { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tc-t b { flex: 1; min-width: 0; font-size: 12.5px; }
.tc-t .chip { height: 19px; font-size: 10px; padding: 0 6px; flex: none; }
.tc-s { font-size: 11.5px; color: var(--muted); }
.tc-b { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tc-b .chip { height: 19px; font-size: 10.5px; padding: 0 7px; min-width: 0; }
/* popover del calendario y legenda */
.pop.pop-cal { padding: 0; }
.cal-pop { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px 14px; }
.cal-ph { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.cal-pdl { display: flex; flex-direction: column; gap: 4px; }
.cal-pdl .mo-ev { height: 28px; font-size: 12.5px; }
.cal-pdl .ag-pri { border-radius: 9px; height: 30px; }
.lgp { display: flex; flex-direction: column; gap: 5px; padding: 6px 8px 8px; }
.lgp-s { margin-top: 6px; font-size: 11px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.lgp-s:first-child { margin-top: 0; }
.lgp-r { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; column-gap: 8px; font-size: 12.5px; }
.lgp-r b { font-weight: 600; color: var(--ink-2); }
.lgp-r > span:not(.bd):not(.flg) { grid-column: 2; font-size: 11.5px; color: var(--muted); margin-top: -2px; }
.lgp-d { width: 10px; height: 10px; border-radius: 50%; justify-self: center; }
.lgp-r .bd, .lgp-r .flg { justify-self: center; }

/* ------------------------------------------------------------------ barra de lista, filtros y tabla de installazioni */
.stabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.stab { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid transparent; border-radius: 9px; background: transparent; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.stab i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.stab span { min-width: 20px; height: 18px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--surface-3); color: var(--muted); font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; }
.stab:hover { color: var(--ink); background: var(--surface); border-color: var(--line); }
.stab:focus-visible { outline: none; box-shadow: var(--ring); }
.stab.on { background: var(--surface); border-color: var(--line); color: var(--ink); box-shadow: var(--shadow-xs); }
.stab.on span { background: var(--ink); color: #fff; }
.stab.zero { opacity: .6; }
.lst-f { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-bottom: 14px; }
.lsearch { display: flex; align-items: center; gap: 8px; width: 270px; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--faint); transition: border-color .12s, box-shadow .12s; }
.lsearch .i { width: 16px; height: 16px; flex: none; }
.lsearch input { flex: 1; min-width: 0; width: 100%; border: 0; outline: none; background: transparent; font-size: 13px; color: var(--ink); }
.lsearch input::placeholder { color: var(--faint); }
.lsearch:focus-within { border-color: var(--brand-500); box-shadow: var(--ring); }
.lsearch.sm { height: 32px; width: auto; flex: 1; min-width: 0; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex: 1 1 420px; min-width: 0; }
.fchip { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 9px 0 11px; border: 1px dashed #C4CDC6; border-radius: 999px; background: transparent; font-size: 12.5px; font-weight: 500; color: var(--ink-2); cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s; }
.fchip .i { width: 14px; height: 14px; color: var(--faint); }
.fchip:hover { background: var(--surface); border-style: solid; border-color: var(--line); }
.fchip:focus-visible, .fchip button:focus-visible { outline: none; box-shadow: var(--ring); }
.fchip.on { padding: 0; gap: 0; border: 1px solid var(--brand-100); background: var(--brand-50); color: var(--brand-600); }
.fchip.on.solo { padding: 0 9px 0 11px; gap: 4px; }
.fchip.on button { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 6px 0 11px; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; border-radius: 999px; }
.fchip.on .fl { color: var(--muted); }
.fchip.on b { font-weight: 650; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.fchip.on .i { color: var(--brand); }
.fchip.on .fx { width: 26px; padding: 0; justify-content: center; border-left: 1px solid var(--brand-100); border-radius: 0 999px 999px 0; }
.fchip.on .fx:hover { background: var(--brand-100); }
.fchip.on .fx .i { width: 13px; height: 13px; }
.fchip.tg { padding: 0 11px; }
.fchip.tg.on { padding: 0 11px; gap: 5px; }
.fchip.tg.rosso .i { color: var(--danger); }
.fchip.tg.rosso.on { border-color: var(--danger-100); background: var(--danger-50); color: var(--danger); }
.fchip.tg.urg .i { color: #DC6803; }
.fchip.tg.urg.on { border-color: #FDDCAB; background: #FFF6F0; color: #9A3412; }
.fchip.tg.sun .i { color: #CA8A04; }
.fchip.tg.sun.on { border-color: #F3E2A9; background: var(--sun-50); color: #8A6100; }
.fchip.reset { border: 0; color: var(--muted); padding: 0 8px; }
.fchip.reset:hover { color: var(--ink); background: transparent; text-decoration: underline; }
.ord { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); flex: none; margin-left: auto; }
.ord .i { width: 15px; height: 15px; }
.ord .select { width: 184px; }
.tcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); overflow: hidden; }
.tscroll { overflow-x: auto; }
table.lsti { table-layout: fixed; min-width: 1060px; }
table.lsti th { padding: 0 12px; height: 40px; background: var(--surface-2); box-shadow: 0 1px 0 var(--line); position: static; }
table.lsti th button { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
table.lsti th button .i { width: 13px; height: 13px; }
table.lsti th.srt.on { color: var(--ink); }
.srt-i { display: inline-flex; opacity: 0; transition: opacity .12s; }
table.lsti th:hover .srt-i { opacity: .55; }
table.lsti td { padding: 9px 12px; height: 60px; }
table.lsti tbody tr { --st: transparent; }
table.lsti tbody tr > td:first-child { box-shadow: inset 3px 0 0 var(--st); }
table.lsti tbody tr:last-child td { border-bottom: 0; }
table.lsti tbody tr:focus-visible { outline: none; background: var(--brand-50); }
table.lsti tr.ann td { opacity: .6; }
table.lsti tr.ann .cli-n { text-decoration: line-through; }
.c-data { width: 112px; }
.c-data b, .c-data small { display: block; white-space: nowrap; }
.c-data b { font-size: 13px; font-weight: 650; }
.c-data small { font-size: 11.5px; color: var(--muted); }
.c-cli { width: auto; min-width: 200px; }
.c-sq { width: 140px; }
.c-sq .chip { max-width: 100%; }
.c-lav { width: 200px; }
.c-kw { width: 96px; }
.c-kw b, .c-kw small { display: block; white-space: nowrap; }
.c-kw b { font-size: 12.5px; font-weight: 650; }
.c-kw small { font-size: 11.5px; color: var(--muted); }
.c-st { width: 124px; }
.c-ddt { width: 96px; }
.c-doc { width: 112px; }
.c-em { width: 64px; }
.c-att { width: 112px; }
.cli-n { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--ink); min-width: 0; }
.cli-n .ri-p { display: inline-flex; color: var(--danger); flex: none; }
.cli-n .ri-p .i { width: 14px; height: 14px; }
.cli-s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.lav-tp { display: flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; }
.lav-tp .chip { flex: none; height: 20px; font-size: 11px; }
.ddt-n { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ddt-n .i { width: 13px; height: 13px; stroke-width: 2.6; }
.ddt-n.ok { color: #15803D; }
.ddt-n.no { color: #B42318; font-weight: 600; }
.em-n { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.em-n .i { width: 14px; height: 14px; }
.em-n.nuove { color: var(--info); font-weight: 700; }
.tfoot { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--muted); }
.pager { display: inline-flex; align-items: center; gap: 8px; }
.pager b { color: var(--ink); }

/* ------------------------------------------------------------------ da fare */
.seg { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 10px; background: #E9EDEA; }
.seg button { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg button .i { width: 15px; height: 15px; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(16, 32, 20, .08), 0 0 0 1px rgba(16, 32, 20, .04); }
.seg button:focus-visible { outline: none; box-shadow: var(--ring); }
.todo-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 16px; }
.tn { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 12.5px; font-weight: 500; color: var(--ink-2); cursor: pointer; }
.tn i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--brand)); }
.tn b { font-weight: 650; font-variant-numeric: tabular-nums; color: var(--ink); }
.tn:hover { border-color: #C9D3CB; }
.tn:focus-visible { outline: none; box-shadow: var(--ring); }
.tn.urg { border-color: #FDDCAB; background: #FFF6F0; color: #9A3412; }
.todo-g { position: relative; margin-bottom: 16px; overflow: hidden; scroll-margin-top: 16px; }
.todo-g::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c, var(--brand)); z-index: 1; pointer-events: none; }
.todo-g.urg { border-color: #FDDCAB; box-shadow: var(--shadow); }
.todo-g.urg .todo-h { background: #FFF8F3; }
.todo-g.flash { animation: flashg 1.6s ease-out; }
@keyframes flashg { 0%, 35% { box-shadow: 0 0 0 4px rgba(37, 99, 235, .28), var(--shadow-xs); } }
.todo-h { display: flex; align-items: flex-start; gap: 12px; padding: 14px 18px 12px 20px; }
.todo-ic { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 9px; color: var(--c, var(--brand)); background: color-mix(in srgb, var(--c, var(--brand)) 11%, #fff); }
.todo-ic .i { width: 16px; height: 16px; }
.todo-h h3 { margin: 0; font-size: 15px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.todo-n { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); font-size: 11.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.todo-of { font-size: 12px; font-weight: 500; color: var(--muted); }
.todo-h p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.todo-ga { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.todo-l { border-top: 1px solid var(--line-2); }
.todo-i { display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr) 96px auto; gap: 16px; align-items: center; padding: 10px 18px 10px 20px; border-bottom: 1px solid var(--line-2); transition: background .1s, opacity .2s, transform .2s; }
.todo-i:last-child { border-bottom: 0; }
.todo-i:hover { background: var(--surface-2); }
.todo-i.via, .pri.via { opacity: 0; transform: translateX(12px); }
.todo-c { display: flex; align-items: center; gap: 8px; min-width: 0; }
.todo-c .chip { flex: none; height: 20px; font-size: 10.5px; padding: 0 7px; max-width: 120px; }
.todo-cli { padding: 0; border: 0; background: none; font-size: 13.5px; font-weight: 600; color: var(--ink); cursor: pointer; text-align: left; min-width: 0; }
.todo-cli:hover { color: var(--brand-600); }
.todo-cli.nolink { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); cursor: default; font-weight: 600; }
.todo-cli.nolink .i { width: 15px; height: 15px; flex: none; color: var(--muted); }
.todo-t { font-size: 13px; color: var(--ink-2); line-height: 1.45; min-width: 0; }
.todo-d { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); text-align: right; }
.todo-d b { font-weight: 650; color: var(--ink-2); }
.todo-d.late, .todo-d.late b { color: var(--danger); }
.todo-a { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.todo-more { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 10px; border: 0; border-top: 1px solid var(--line-2); background: var(--surface-2); font-size: 12.5px; font-weight: 600; color: var(--brand-600); cursor: pointer; }
.todo-more .i { width: 15px; height: 15px; }
.todo-more:hover { background: var(--brand-50); }
.sug-k { display: inline-flex; align-items: center; gap: 4px; margin-right: 4px; padding: 1px 7px; border-radius: 6px; background: var(--sun-50); color: #8A6100; font-size: 11.5px; font-weight: 650; vertical-align: 1px; }
.sug-k .i { width: 12px; height: 12px; }
.em-cl { display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; color: var(--muted); font-size: 12px; }
.em-cl .i { width: 12px; height: 12px; }

/* ------------------------------------------------------------------ promemoria */
.prv-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.prv-bar .lsearch.prv-q { width: 240px; flex: none; }
.prv-k { display: flex; flex-wrap: wrap; gap: 6px; }
.pk { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.pk b { color: var(--ink); font-variant-numeric: tabular-nums; }
.pk .i { width: 14px; height: 14px; }
.pk.late { background: var(--danger-50); border-color: var(--danger-100); color: #B42318; }
.pk.late b { color: var(--danger); }
.pk.done .i { color: var(--ok); }
.prg { margin-bottom: 14px; overflow: hidden; }
.prg-h { display: flex; align-items: center; gap: 8px; padding: 12px 18px 10px; font-size: 14px; border-bottom: 1px solid var(--line-2); }
.prg.late { border-color: var(--danger-100); }
.prg.late .prg-h { background: #FFF7F6; color: #B42318; }
.prg.done .prg-h { color: var(--muted); }
.pri { display: flex; align-items: flex-start; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--line-2); transition: background .1s, opacity .2s, transform .2s; }
.pri:last-child { border-bottom: 0; }
.pri:hover { background: var(--surface-2); }
.pri-t { width: 64px; flex: none; display: flex; flex-direction: column; align-items: center; padding: 6px 0; border-radius: 10px; background: var(--surface-3); line-height: 1.2; }
.pri-t b { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pri-t small { font-size: 11px; color: var(--muted); white-space: nowrap; }
.pri.late .pri-t { background: var(--danger-50); color: var(--danger); }
.pri.fatto .pri-t { background: var(--ok-50); color: #15803D; }
.pri.fatto .pri-n b { color: var(--muted); text-decoration: line-through; }
.pri-m { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pri-n { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 14px; }
.pri-n b { font-weight: 650; }
.pri-n .chip { height: 20px; font-size: 10.5px; }
.pri-no { font-size: 13px; color: var(--ink-2); line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.pri-s { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.pri-s .linkb { font-size: 12.5px; }
.pri-u { display: inline-flex; align-items: center; gap: 6px; }
.pri-u .avatar { width: 20px; height: 20px; font-size: 9px; }
.pri-a { display: flex; align-items: center; gap: 6px; flex: none; }

/* ------------------------------------------------------------------ posta */
.content.v-posta { padding: 16px 20px 18px; overflow: hidden; display: flex; }
.posta { flex: 1; min-height: 0; min-width: 0; display: grid; grid-template-columns: 360px minmax(0, 1fr) 290px; gap: 14px; }
.pm-list, .pm-read { display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); }
.pm-lh { display: flex; flex-direction: column; gap: 10px; padding: 12px 12px 10px; border-bottom: 1px solid var(--line-2); }
.pm-lt { display: flex; align-items: center; gap: 6px; padding: 0 2px; min-width: 0; }
.pm-lt b { font-size: 13px; font-weight: 650; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-lt .btn.spin .i { animation: spin .9s linear infinite; }
.pm-tabs { display: flex; gap: 2px; padding: 3px; border-radius: 9px; background: #E9EDEA; }
.pt { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 28px; padding: 0 6px; border: 0; border-radius: 7px; background: transparent; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.pt .i { width: 13px; height: 13px; }
.pt:hover { color: var(--ink); }
.pt.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(16, 32, 20, .08); }
.pt:focus-visible { outline: none; box-shadow: var(--ring); }
.pt-n { min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--brand); color: #fff; font-size: 10.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pt-n.warn { background: #E8A31B; }
.pm-tools { display: flex; gap: 8px; }
.pm-tools .select { width: 140px; flex: none; }
.pm-items { flex: 1; min-height: 0; overflow-y: auto; }
.pm-sk { padding: 6px 16px; border-bottom: 1px solid var(--line-2); }
.pm-it { position: relative; display: flex; flex-direction: column; gap: 3px; width: 100%; padding: 11px 14px 11px 18px; border: 0; border-bottom: 1px solid var(--line-2); background: var(--surface); text-align: left; cursor: pointer; font: inherit; color: inherit; }
.pm-it:hover { background: var(--surface-2); }
.pm-it:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--brand-500); }
.pm-it.act { background: var(--brand-50); box-shadow: inset 3px 0 0 var(--brand); }
.pm-it.new::before { content: ""; position: absolute; left: 7px; top: 17px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.pm-r1 { display: flex; align-items: center; gap: 7px; min-width: 0; }
.cat-d { width: 8px; height: 8px; border-radius: 2px; flex: none; background: var(--c, var(--faint)); }
.pm-from { flex: 1; min-width: 0; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.pm-dt { flex: none; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pm-sub { font-size: 13px; font-weight: 500; color: var(--ink); }
.pm-out { display: inline-flex; margin-right: 4px; color: var(--muted); vertical-align: -2px; }
.pm-out .i { width: 13px; height: 13px; }
.pm-it.new .pm-from, .pm-it.new .pm-sub { font-weight: 650; color: var(--ink); }
.pm-prev { font-size: 12px; line-height: 1.4; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pm-r3 { display: flex; align-items: center; gap: 8px; margin-top: 3px; font-size: 11px; min-width: 0; }
.pm-r3 .chip { height: 19px; font-size: 10.5px; padding: 0 7px; flex: none; max-width: 130px; }
.pm-cat { font-weight: 650; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); flex: none; }
.pm-pr { display: inline-flex; align-items: center; gap: 3px; min-width: 0; max-width: 170px; font-size: 11.5px; font-weight: 600; color: var(--brand-600); }
.pm-pr .i { width: 12px; height: 12px; flex: none; }
.pm-pr.prop { color: #B54708; }
.pm-na { font-weight: 650; color: var(--warn); }
.pm-cl { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); flex: none; }
.pm-cl .i { width: 12px; height: 12px; }
.pm-more { width: 100%; padding: 12px; border: 0; background: var(--surface-2); color: var(--brand-600); font-weight: 600; font-size: 12.5px; cursor: pointer; }
.pm-more:hover { background: var(--brand-50); }
.pm-read > .state { margin: auto; }
.pm-pad { padding: 20px 24px; }
.pm-h { padding: 18px 22px 14px; border-bottom: 1px solid var(--line-2); }
.pm-h h2 { margin: 0 0 14px; font-size: 18px; font-weight: 650; letter-spacing: -.01em; line-height: 1.3; overflow-wrap: anywhere; }
.pm-from { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pm-av { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 50%; font-size: 13px; font-weight: 700; color: var(--c, var(--muted)); background: color-mix(in srgb, var(--c, var(--muted)) 13%, #fff); }
.pm-fw { min-width: 0; font-size: 13.5px; }
.pm-when { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; font-size: 12px; color: var(--muted); }
.pm-wb { display: flex; align-items: center; gap: 6px; }
.chip.cat { background: color-mix(in srgb, var(--c, var(--muted)) 11%, #fff); color: color-mix(in srgb, var(--c, var(--muted)) 82%, #000); }
.pm-acts { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pm-body { flex: 1; min-height: 0; display: flex; background: #fff; }
.pm-frame { flex: 1; width: 100%; min-height: 0; border: 0; background: #fff; }
.pm-pre { flex: 1; margin: 0; padding: 20px 24px; overflow: auto; white-space: pre-wrap; word-wrap: break-word; font: 13.5px/1.6 var(--font); color: var(--ink); }
.pm-att { flex: none; max-height: 38%; overflow: auto; padding: 12px 14px 8px; border-top: 1px solid var(--line-2); background: var(--surface-2); }
.pm-att-h { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 2px 8px; font-size: 12.5px; }
.pm-att-h .i { width: 15px; height: 15px; color: var(--muted); }
.att { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; column-gap: 10px; row-gap: 8px; padding: 8px 10px; margin-bottom: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.att-save { grid-column: 2 / -1; display: flex; align-items: center; gap: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.att-save .small { white-space: nowrap; }
.att-save .select { flex: 1; min-width: 0; width: auto; }
.att-ic { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--surface-3); color: var(--muted); }
.att-ic .i { width: 16px; height: 16px; }
.att-n { display: flex; flex-direction: column; min-width: 0; }
.att-n a { font-size: 13px; font-weight: 600; color: var(--ink); }
.att-n a:hover { color: var(--brand-600); }
.att-n small { font-size: 11.5px; color: var(--muted); }
.btn.done { color: var(--ok); border-color: #BBF7D0; background: var(--ok-50); }
.pm-side { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow-y: auto; }
.ps { padding: 14px 14px 12px; }
.ps-h { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 11.5px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.ps-pr { display: flex; flex-direction: column; gap: 9px; }
.ps-prn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); cursor: pointer; text-align: left; color: var(--ink); min-width: 0; }
.ps-prn:hover { border-color: var(--brand-100); background: var(--brand-50); }
.ps-prn > .i { width: 16px; height: 16px; color: var(--faint); }
.ps-prn b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-prs { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted); }
.ps-ra { display: flex; gap: 6px; }
.ps-none { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--warn-50); color: var(--warn); }
.ps-none .i { width: 17px; height: 17px; margin-top: 1px; flex: none; }
.ps-none b { font-size: 13px; }
.ps-none p { margin: 2px 0 0; font-size: 12px; color: var(--ink-2); line-height: 1.4; }
.ps-search { margin-top: 10px; }
.ps-search .lsearch { width: 100%; }
.ps-res { display: flex; flex-direction: column; margin-top: 4px; }
.ps-ri { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border: 0; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; font-size: 13px; min-width: 0; }
.ps-ri:hover { background: var(--surface-3); }
.ps-ri .chip { height: 19px; font-size: 10.5px; flex: none; max-width: 110px; }
.ps-p { margin: 4px 0; }
.cand { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; row-gap: 4px; padding: 10px 0; border-top: 1px solid var(--line-2); }
.cand:first-of-type { border-top: 0; padding-top: 0; }
.cand-t { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; }
.cand-t .chip { height: 18px; font-size: 10px; padding: 0 6px; flex: none; max-width: 100px; }
.cand-t .linkb { color: var(--ink); min-width: 0; }
.cand-s, .score { grid-column: 1; }
.score { display: flex; align-items: center; gap: 8px; }
.score-t { flex: 1; height: 6px; border-radius: 6px; background: var(--line-2); overflow: hidden; }
.score-t i { display: block; height: 100%; border-radius: 6px; background: var(--faint); }
.score-t i.hi { background: var(--brand-500); }
.score-t i.mid { background: #E8A31B; }
.score b { font-size: 12px; font-variant-numeric: tabular-nums; min-width: 22px; text-align: right; }
.cand-b { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
.thr { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 6px; border: 0; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; min-width: 0; }
.thr + .thr { border-top: 1px solid var(--line-2); border-radius: 0 0 8px 8px; }
.thr:hover { background: var(--surface-3); }
.thr > .i { width: 14px; height: 14px; color: var(--muted); flex: none; }
.thr.out > .i { color: var(--brand); }
.thr .grow { display: flex; flex-direction: column; min-width: 0; }
.thr b { font-size: 12.5px; font-weight: 600; }
.thr small { font-size: 11.5px; color: var(--muted); }
.ps-note { margin: 0; padding: 0 4px; font-size: 11.5px; color: var(--muted); line-height: 1.45; }

/* ------------------------------------------------------------------ portali di monitoraggio (impostazioni) */
.por-l { display: flex; flex-direction: column; gap: 10px; }
.por { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface); }
.por.ok { border-color: color-mix(in srgb, var(--ok) 26%, var(--line)); }
.por-h { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.por-ic { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--info-50); color: var(--info); }
.por.ok .por-ic { background: var(--ok-50); color: var(--ok); }
.por-ic .i { width: 18px; height: 18px; }
.por-t { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; font-size: 14px; }
.por-t .chip .i, .por-kv .chip .i { width: 12px; height: 12px; }
.por-m { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.por-m .chip { font-family: var(--mono); font-weight: 500; }
.por-kv { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 8px 16px; margin: 12px 0 0; padding-left: 48px; }
.por-kv dt { margin-bottom: 3px; font-size: 11px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.por-kv dd { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.por-kv .lnk { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.por-kv .lnk .i { width: 13px; height: 13px; }
.por-kv .lnk.sm { font-size: 12px; font-weight: 500; }
.por-n { margin: 8px 0 0; padding-left: 48px; font-size: 12px; line-height: 1.45; color: var(--muted); }
.por-e { margin: 12px 0 0 48px; padding: 14px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface-2); }
@media (max-width: 1100px) { .por-kv { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .por-kv { grid-template-columns: 1fr; padding-left: 0; }
  .por-n { padding-left: 0; }
  .por-e { margin-left: 0; }
}

/* ------------------------------------------------------------------ schede tecniche (archivio aziendale) */
.sk-q { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--faint); box-shadow: var(--shadow-xs); transition: border-color .12s, box-shadow .12s; }
.sk-q .i { width: 19px; height: 19px; flex: none; }
.sk-q input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 15px; color: var(--ink); }
.sk-q input::placeholder { color: var(--faint); }
.sk-q:focus-within { border-color: var(--brand-500); box-shadow: var(--ring); }
.sk-f { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.sk-fr { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.sk-fl { width: 74px; flex: none; padding-top: 6px; font-size: 11px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.sk-fc { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.skf { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s; }
.skf .i { width: 14px; height: 14px; color: var(--muted); }
.skf span { min-width: 18px; height: 17px; padding: 0 5px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--surface-3); color: var(--muted); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.skf:hover { border-color: #C9D3CB; }
.skf:focus-visible { outline: none; box-shadow: var(--ring); }
.skf.on { border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-600); box-shadow: inset 0 0 0 1px var(--brand-500); }
.skf.on .i { color: var(--brand); }
.skf.on span { background: var(--surface); }
.skf.ris .i { color: #B42318; }
.skf.altro { border-style: dashed; color: var(--muted); }
.sk-g { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 44%); gap: 16px; align-items: start; }
.sk-l { overflow: hidden; min-width: 0; }
.sk-l.loading { opacity: .55; transition: opacity .15s; }
.skg + .skg { border-top: 1px solid var(--line); }
.skg-h { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 8px; padding: 9px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line-2); font-size: 13px; }
.skg-h span { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.skr { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto auto; align-items: center; gap: 10px; width: 100%; min-width: 0; padding: 9px 14px; border: 0; border-bottom: 1px solid var(--line-2); background: var(--surface); text-align: left; cursor: pointer; font: inherit; color: inherit; }
.skr:has(.skr-mar) { grid-template-columns: 34px minmax(0, 1fr) minmax(70px, 120px) auto auto auto; }
.skr:last-child { border-bottom: 0; }
.skr:hover { background: var(--surface-2); }
.skr:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--brand-500); }
.skr.on { background: var(--brand-50); box-shadow: inset 3px 0 0 var(--brand); }
.skr-ic { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: var(--surface-3); color: var(--muted); flex: none; }
.skr-ic .i { width: 17px; height: 17px; }
.skr-ic.lg { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-50); color: var(--brand); }
.skr-ic.lg .i { width: 22px; height: 22px; }
.skr.ris .skr-ic { background: var(--danger-50); color: #B42318; }
.skr-m { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.skr-t { font-size: 13.5px; font-weight: 600; color: var(--ink); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.skr-m small { font-size: 12px; color: var(--muted); }
.skr-mar { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.skr-mm { display: none; }   /* marca en la línea de detalle: solo en móvil, donde la columna se oculta */
.skr-n { font-size: 11.5px; color: var(--muted); white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
mark { background: #FFF1A8; color: inherit; border-radius: 3px; padding: 0 1px; }
.chip.skt { height: 20px; font-size: 10.5px; padding: 0 8px; flex: none; }
.chip.skt[data-t="datasheet"] { background: var(--info-50); color: #1D4ED8; }
.chip.skt[data-t="certificazione"] { background: var(--ok-50); color: #15803D; }
.chip.skt[data-t="garanzia"] { background: #F3EEFE; color: #6D28D9; }
.chip.skt[data-t="manuale"] { background: var(--surface-3); color: var(--ink-2); }
.chip.skt[data-t="brochure"] { background: var(--sun-50); color: #8A6100; }
.chip.skt[data-t="listino"] { background: var(--danger-50); color: #B42318; }
.chip.ris-c { height: 18px; font-size: 10px; padding: 0 6px; background: var(--danger-50); color: #B42318; flex: none; }
.ris-t { display: inline-flex; align-items: center; gap: 3px; color: #B42318; font-weight: 600; }
.ris-t .i { width: 13px; height: 13px; }
.sk-p { position: sticky; top: 0; display: flex; flex-direction: column; height: calc(100vh - var(--tb-h) - 48px); min-height: 460px; overflow: hidden; }
.sk-p > .state { margin: auto; }
.sk-info { padding: 14px 16px 10px; border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 10px; }
.sk-ph { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.sk-ph h3 { margin: 0 0 4px; font-size: 16px; font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; }
.sk-pm { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: 12.5px; color: var(--muted); }
.sk-pm b { color: var(--ink-2); }
.sk-pa { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.sk-why { display: flex; align-items: center; gap: 6px; margin: -2px 0 0; }
.sk-why .i { width: 14px; height: 14px; flex: none; }
.sk-why > span { min-width: 0; }
.sk-nopdf { flex: 1; display: grid; place-items: start center; padding-top: 32px; overflow: auto; background: var(--surface); }
.sk-spin { margin: 0 auto 10px; }
.sk-base { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.sk-base .i { width: 14px; height: 14px; flex: none; }
.sk-base .mono { font-size: 11.5px; overflow-wrap: anywhere; }
.sk-mod { display: flex; align-items: baseline; gap: 8px; }
.sk-mod .lbl { margin: 0; flex: none; }
.sk-mod > div { display: flex; flex-wrap: wrap; gap: 4px; }
.sk-mod .chip { height: 20px; font-size: 11px; font-family: var(--mono); font-weight: 500; }
.sk-tabs { display: flex; align-items: center; width: 100%; background: transparent; padding: 0; gap: 4px; }
.sk-tabs button { background: var(--surface-3); }
.sk-tabs button.on { background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.sk-tabs button:disabled { opacity: .45; cursor: not-allowed; }
.sk-rel { flex: 1; min-width: 0; margin-left: 6px; font-size: 11px; color: var(--faint); text-align: right; }
.sk-view { flex: 1; min-height: 0; display: flex; background: #EEF1EE; }
.sk-frame { flex: 1; width: 100%; height: 100%; border: 0; background: #EEF1EE; }
.sk-testo { flex: 1; margin: 0; padding: 16px 18px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 12.5px/1.55 var(--mono); color: var(--ink-2); background: var(--surface); }
.mail-ic.sk { background: var(--info-50); color: var(--info); }
@media (max-width: 1280px) {
  .sk-g { grid-template-columns: minmax(0, 1fr) minmax(340px, 42%); }
  .skr { grid-template-columns: 34px minmax(0, 1fr) auto auto; }
  .skr > .skr-n:last-child { display: none; }
  .skr:has(.skr-mar) { grid-template-columns: 34px minmax(0, 1fr) minmax(60px, 100px) auto auto; }
}
@media (max-width: 1100px) {
  .sk-g { grid-template-columns: 1fr; }
  .sk-p { position: static; height: 72vh; }
  .sk-fl { width: auto; }
  .sk-fr { flex-direction: column; gap: 4px; }
}
@media (max-width: 760px) {
  .skr, .skr:has(.skr-mar) { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .skr .skr-mar, .skr > .skr-n { display: none; }
  .skr-mm { display: inline; }
  .sk-p { height: 78vh; min-height: 420px; }
  .sk-rel { display: none; }
}

/* ------------------------------------------------------------------ assistente (lo pinta chat.js) */
.content.v-assistente { padding: 16px 20px 18px; display: flex; overflow: hidden; }
.chat-host { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.chat-nd { margin: auto; width: min(560px, 100%); }

/* ------------------------------------------------------------------ impostazioni */
.set { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 24px; align-items: start; }
.set-nav { position: sticky; top: 0; display: flex; flex-direction: column; gap: 2px; }
.set-i { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; border: 1px solid transparent; border-radius: 10px; background: transparent; text-align: left; font-size: 13.5px; font-weight: 500; color: var(--ink-2); cursor: pointer; }
.set-i .i { color: var(--muted); }
.set-i:hover { background: var(--surface-3); }
.set-i:focus-visible { outline: none; box-shadow: var(--ring); }
.set-i.on { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow-xs); color: var(--ink); font-weight: 600; }
.set-i.on .i { color: var(--brand); }
.set-adm { font-size: 9.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
.set-note { margin: 10px 12px; font-size: 12px; color: var(--muted); }
.set-b { display: flex; flex-direction: column; gap: 16px; max-width: 980px; min-width: 0; }
.set-c .card-h { padding: 16px 20px; }
.set-c .card-b { padding: 18px 20px 20px; }
.set-c .card-h .sub { margin-top: 2px; line-height: 1.45; }
.form-col { display: flex; flex-direction: column; gap: 14px; }
.form-grid { display: grid; gap: 14px 18px; }
.form-grid.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span2 { grid-column: 1 / -1; }
.form-f { display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.hint { font-size: 11.5px; color: var(--muted); }
.field .lbl { display: flex; align-items: center; gap: 6px; }
span.lbl { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin: 0 0 5px; }
.xs-chip { height: 18px; padding: 0 7px; font-size: 10.5px; }
.acc { display: flex; align-items: center; gap: 14px; }
.acc .avatar { width: 44px; height: 44px; font-size: 15px; }
.acc-n { font-size: 16px; }
.pw-meter { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.pw-m { width: 110px; height: 5px; flex: none; border-radius: 5px; background: var(--line-2); overflow: hidden; }
.pw-m i { display: block; height: 100%; width: 0; border-radius: 5px; transition: width .2s, background .2s; background: var(--danger); }
.pw-m i.m { background: #E8A31B; }
.pw-m i.s { background: var(--ok); }
.note { display: flex; align-items: flex-start; gap: 10px; padding: 10px 13px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 13px; line-height: 1.45; color: var(--ink-2); margin: 0; }
.note .i { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.note.ok { background: var(--ok-50); border-color: #BBF7D0; color: #166534; }
.note.err { background: var(--danger-50); border-color: var(--danger-100); color: #B42318; }
.note.info { background: var(--info-50); border-color: #D1E0FF; color: #1D4ED8; }
.set-c > .note { margin: 0 18px 16px; }
.mail-st { display: flex; align-items: center; gap: 14px; padding: 16px 20px; flex-wrap: wrap; }
.mail-ic { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--brand-50); color: var(--brand); }
.mail-ic .i { width: 20px; height: 20px; }
.mail-ic.as { background: #F3EEFE; color: #7C3AED; }
.mail-st b { font-size: 14px; }
.mail-kv { display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; color: var(--muted); }
.mail-kv b { font-size: 13px; color: var(--ink); }
.chip .sy-d { margin-right: 2px; }
.switch { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 13.5px; min-height: 36px; padding-top: 7px; position: relative; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch > span:last-child { display: flex; flex-direction: column; gap: 1px; }
.switch b { font-weight: 600; }
.switch small { font-size: 12px; color: var(--muted); }
.sw-t { position: relative; width: 38px; height: 22px; flex: none; border-radius: 999px; background: #C9D1CB; transition: background .15s; margin-top: -1px; }
.sw-t::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
.switch input:checked + .sw-t { background: var(--brand); }
.switch input:checked + .sw-t::after { transform: translateX(16px); }
.switch input:focus-visible + .sw-t { box-shadow: var(--ring); }
.pref-r { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line-2); }
.pref-s { display: inline-flex; align-items: center; padding-top: 6px; }
.pref-cal { max-width: 280px; }
.g2c { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.g2c > .card { margin: 0; }
.firma { align-items: start; }
.sig { padding: 18px; border: 1px dashed var(--line); border-radius: 12px; background: #fff; font-size: 13px; line-height: 1.5; }
.sig-c { margin: 0 0 12px; color: var(--ink-2); }
.sig-b { display: flex; gap: 14px; align-items: flex-start; padding-top: 12px; border-top: 2px solid var(--brand); }
.sig-logo { position: relative; width: 52px; height: 42px; overflow: hidden; flex: none; }
.sig-logo img { position: absolute; width: 102px; max-width: none; left: -25px; top: -2px; }
.secret { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.secret code { flex: 1; min-width: 0; font-family: var(--mono); font-size: 13px; word-break: break-all; color: var(--ink); }
.secret.nuovo { border-color: var(--brand-500); background: var(--brand-50); box-shadow: 0 0 0 3px rgba(58, 170, 53, .12); }
.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0 20px 18px; }
.kv dt { font-size: 11.5px; color: var(--muted); }
.kv dd { margin: 2px 0 0; font-size: 13px; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.steps { margin: 0 0 14px; padding-left: 22px; }
.steps li { margin-bottom: 12px; font-size: 13.5px; line-height: 1.6; color: var(--ink-2); padding-left: 4px; }
.steps li::marker { color: var(--brand); font-weight: 700; }
.steps b { color: var(--ink); }
.steps code, .note code, [data-tokhint] code { font-family: var(--mono); font-size: 12px; padding: 1px 6px; border-radius: 5px; background: var(--surface-3); color: var(--ink); }
.code-b { display: flex; flex-direction: column; gap: 2px; margin: 8px 0 2px; padding: 10px 14px; border-radius: 10px; background: #17211B; }
.code-b code { font-family: var(--mono); font-size: 12.5px; color: #CDEFD0; background: none !important; padding: 0 !important; }
.mono-in { font-family: var(--mono); font-size: 12.5px; letter-spacing: .02em; }
.imp-tipi { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.imp-t { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color .12s, background .12s; }
.imp-t:hover { border-color: #C9D3CB; }
.imp-t:has(input:checked) { border-color: var(--brand-500); background: var(--brand-50); box-shadow: 0 0 0 1px var(--brand-500); }
.imp-t input { accent-color: var(--brand); margin: 3px 0 0; }
.imp-t span { display: flex; flex-direction: column; gap: 2px; }
.imp-t b { font-size: 13.5px; }
.imp-t small { font-size: 12px; color: var(--muted); line-height: 1.4; }
.drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 20px; border: 2px dashed var(--line); border-radius: 14px; background: var(--surface-2); cursor: pointer; text-align: center; color: var(--muted); transition: border-color .12s, background .12s; }
.drop:hover, .drop:focus-visible { border-color: #B8C2BB; outline: none; }
.drop.over, .drop.has { border-color: var(--brand-500); background: var(--brand-50); }
.drop-ic { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); color: var(--brand); box-shadow: var(--shadow-xs); margin-bottom: 6px; }
.drop b { font-size: 14px; color: var(--ink); }
.drop small { font-size: 12.5px; }
.imp-res { margin-top: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.imp-res.ok { border-color: #BBF7D0; background: var(--ok-50); }
.imp-res h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 14px; }
.imp-res h4 .i { width: 17px; height: 17px; }
.imp-res.ok h4 { color: #166534; }
.imp-n { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.ft-t { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.ft-t span { font-size: 12px; color: var(--muted); }
.ft-t b { font-size: 21px; font-weight: 650; letter-spacing: -.01em; }
.imp-a { margin-top: 12px; }
.imp-a summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.imp-a.warn summary { color: var(--warn); }
.imp-a summary .i { width: 15px; height: 15px; }
.imp-a ul { max-height: 260px; overflow: auto; margin: 8px 0 0; padding: 10px 12px 10px 28px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; font-size: 12.5px; color: var(--ink-2); }
.imp-a li { margin-bottom: 3px; }
.bk { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; }
.exp-ic { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 11px; background: var(--brand-50); color: var(--brand); }
.bk b { display: block; font-size: 14px; }
.bk small { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
table.ut tr.off td { opacity: .55; }
table.ut .avatar { width: 30px; height: 30px; font-size: 11px; }
.swp { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.swp-i { position: relative; cursor: pointer; }
.swp-i input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swp-i i { display: block; width: 26px; height: 26px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); transition: transform .1s, box-shadow .1s; }
.swp-i input:checked + i { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink-2); transform: scale(.92); }
.swp-i input:focus-visible + i { box-shadow: var(--ring); }
.swp-x { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; border: 1px dashed var(--line); cursor: pointer; overflow: hidden; }
.swp-x input { width: 40px; height: 40px; border: 0; padding: 0; background: none; cursor: pointer; }
.sql { display: flex; flex-direction: column; gap: 8px; }
.sqr { --sq: var(--muted); display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: inset 4px 0 0 var(--sq); }
.sqr.off { opacity: .65; }
.sqr-c { width: 14px; height: 14px; border-radius: 4px; background: var(--sq); flex: none; }
.sqr-m { display: flex; flex-direction: column; gap: 3px; }
.sqr-n { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.sqr-al { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.sqr-al .chip { height: 19px; font-size: 10.5px; padding: 0 7px; font-family: var(--mono); font-weight: 500; }
.sqr-p { display: flex; flex-direction: column; align-items: center; padding: 0 10px; flex: none; }
.sqr-p b { font-size: 20px; font-weight: 650; line-height: 1.1; }
.sqr-p small { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* ------------------------------------------------------------------ avisos de promemoria (arriba a la derecha) */
.nt-stack { position: fixed; top: calc(var(--tb-h) + 10px); right: 16px; z-index: 75; display: flex; flex-direction: column; gap: 10px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.nt { pointer-events: auto; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 12px; border: 1px solid #F3E2A9; border-radius: 14px; background: var(--surface); box-shadow: 0 18px 44px rgba(16, 32, 20, .18), 0 0 0 4px rgba(244, 196, 48, .14); animation: ntin .22s ease-out; transition: opacity .2s, transform .2s; }
.nt.via { opacity: 0; transform: translateX(16px); }
@keyframes ntin { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
.nt-h { display: flex; align-items: center; gap: 8px; min-width: 0; }
.nt-ic { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--sun-50); color: #A16207; }
.nt-ic .i { width: 15px; height: 15px; animation: trillo 1.2s ease-in-out 2; }
@keyframes trillo { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(-14deg); } 30% { transform: rotate(12deg); } 45% { transform: rotate(-8deg); } 60% { transform: rotate(4deg); } }
.nt-k { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8A6100; }
.nt-q { flex: 1; min-width: 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.nt-q.late { color: var(--danger); font-weight: 600; }
.nt-x { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; }
.nt-x .i { width: 15px; height: 15px; }
.nt-x:hover { background: var(--surface-3); color: var(--ink); }
.nt-x:focus-visible { outline: none; box-shadow: var(--ring); }
.nt-t { font-size: 15px; font-weight: 650; line-height: 1.35; color: var(--ink); overflow-wrap: anywhere; }
.nt-c { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); min-width: 0; }
.nt-c .i { width: 14px; height: 14px; color: var(--muted); flex: none; }
.nt-n { font-size: 12.5px; color: var(--ink-2); line-height: 1.45; max-height: 76px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.nt-by { font-size: 11.5px; color: var(--muted); }
.nt-a { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.nt-more { pointer-events: auto; align-self: flex-end; padding: 6px 12px; border-radius: 999px; background: #1E2A23; color: #fff; font-size: 12px; font-weight: 600; box-shadow: var(--shadow-lg); }

/* campana */
.pop.pop-bell { padding: 0; }
.bell { display: flex; flex-direction: column; }
.bell-h { display: flex; align-items: center; gap: 8px; padding: 12px 14px 10px; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.bell-h .linkb { font-size: 12.5px; }
.bell-b { display: flex; flex-direction: column; padding-bottom: 6px; }
.bell-p { padding: 4px 14px; }
.bell-s { padding: 10px 14px 4px; font-size: 11px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.bell-l { display: flex; flex-direction: column; padding: 0 6px; }
.bell-i { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 9px; min-width: 0; }
.bell-i:hover { background: var(--surface-2); }
.bell-t { width: 52px; flex: none; font-size: 12px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.bell-i.late .bell-t { color: var(--danger); }
.bell-i .grow { display: flex; flex-direction: column; min-width: 0; }
.bell-i b { font-size: 13px; font-weight: 600; }
.bell-i small { font-size: 11.5px; color: var(--muted); }
.bell-e { display: flex; align-items: flex-start; gap: 8px; margin: 4px 14px; padding: 9px 11px; border-radius: 10px; background: var(--surface-2); font-size: 12.5px; color: var(--ink-2); line-height: 1.45; }
.bell-e .i { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--muted); }
.bell-e.ok .i { color: var(--ok); }
.bell-r { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 9px; color: var(--ink-2); font-size: 13px; }
.bell-r:hover { background: var(--surface-2); }
.bell-r > .i:first-child { width: 16px; height: 16px; color: var(--muted); }
.bell-r b { color: var(--ink); font-variant-numeric: tabular-nums; }
.bell-go { width: 14px; height: 14px; color: var(--faint); }
.bell-more { display: block; padding: 6px 8px 2px; font-size: 12px; font-weight: 600; }
.bell-perm { display: flex; align-items: center; gap: 8px; margin: 8px 14px 0; padding: 9px 11px; border-radius: 10px; background: var(--info-50); color: #1E3A8A; font-size: 12.5px; line-height: 1.4; }
.bell-perm > .i { width: 16px; height: 16px; flex: none; color: var(--info); }
.bell-f { display: flex; justify-content: flex-end; padding: 10px 14px 8px; border-top: 1px solid var(--line-2); margin-top: 8px; }

/* ------------------------------------------------------------------ modales: promemoria, nuova installazione, sposta, cliente */
.pmf .qk { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.qk-b { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 6px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; text-align: left; transition: border-color .12s, background .12s; }
.qk-b b { font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.qk-b small { font-size: 11px; color: var(--muted); }
.qk-b:hover { border-color: #C9D3CB; background: var(--surface-2); }
.qk-b:focus-visible { outline: none; box-shadow: var(--ring); }
.qk-b.on { border-color: var(--brand-500); background: var(--brand-50); box-shadow: 0 0 0 1px var(--brand-500); }
.qk-b.on b { color: var(--brand-600); }
.pm-dt { display: grid; grid-template-columns: minmax(0, 1fr) 130px; gap: 8px; }
.pmf-q { display: block; margin-top: 6px; font-size: 12.5px; color: var(--brand-600); font-weight: 600; }
.pmf-q.late { color: var(--warn); }
.pmf-g { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pmf-inst { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 6px 0 10px; border: 1px solid var(--brand-100); border-radius: 9px; background: var(--brand-50); color: var(--brand-600); font-size: 13px; font-weight: 600; min-width: 0; }
.pmf-inst .i { width: 15px; height: 15px; flex: none; }
.pmf-inst .ellipsis { flex: 1; min-width: 0; }
.pmf-s { position: relative; }
.pmf-s .lsearch { width: 100%; height: 36px; }
.pmf-r { position: absolute; left: 0; right: 0; top: 40px; z-index: 5; display: flex; flex-direction: column; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); max-height: 220px; overflow: auto; }
.pmf-ri { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 8px; border: 0; border-radius: 7px; background: transparent; text-align: left; cursor: pointer; font-size: 13px; min-width: 0; }
.pmf-ri:hover { background: var(--surface-3); }
.pmf-ri small { color: var(--muted); white-space: nowrap; }
.pmf-e { padding: 8px; font-size: 12.5px; color: var(--muted); }
.ni { display: flex; flex-direction: column; gap: 18px; }
.ni-sec { display: flex; flex-direction: column; gap: 12px; }
.ni-h { display: flex; align-items: center; gap: 8px; margin: 0; padding-bottom: 8px; border-bottom: 1px solid var(--line-2); font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.ni-h .i { width: 16px; height: 16px; color: var(--brand); }
.ni-g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ni-g2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 12px; }
.ni-g3 .span3 { grid-column: 1 / -1; }
.ni-cc { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--brand-100); border-radius: 12px; background: var(--brand-50); }
.ni-cc > .i { width: 20px; height: 20px; color: var(--brand); flex: none; }
.ni-cc b { display: block; font-size: 14px; }
.ni-cc small { display: block; font-size: 12px; color: var(--muted); }
.ni-nh { display: flex; align-items: center; gap: 8px; }
.ni-s { position: relative; }
.ni-s .lsearch { width: 100%; height: 38px; }
.ni-r { position: absolute; left: 0; right: 0; top: 42px; z-index: 5; display: flex; flex-direction: column; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); max-height: 300px; overflow: auto; }
.ni-ri { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; min-width: 0; }
.ni-ri:hover, .ni-ri:focus-visible { background: var(--surface-3); outline: none; }
.ni-ri .grow { display: flex; flex-direction: column; min-width: 0; }
.ni-ri b { font-size: 13px; }
.ni-ri small { font-size: 12px; color: var(--muted); }
.ni-ri.nuovo { border-top: 1px solid var(--line-2); border-radius: 0 0 8px 8px; color: var(--brand-600); font-size: 13px; }
.ni-ri.nuovo .i { width: 15px; height: 15px; }
.ni-ri.nuovo .grow { flex-direction: row; align-items: baseline; gap: 4px; }
.ni-mat { font-family: var(--mono); font-size: 12.5px; }
/* materiale dal DDT della cartella del cliente */
.ni-ddt { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.ni-ddt[hidden] { display: none; }
.ni-ddt-h { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 24px; }
.ni-ddt-h > .i { width: 17px; height: 17px; color: var(--brand); flex: none; }
.ni-ddt-h b { font-size: 13.5px; }
.ni-ddt-h .linkb .i { width: 14px; height: 14px; }
.ni-ddt-st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.ni-ddt-i { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.ni-ddt-i:hover { border-color: var(--brand-100); }
.ni-ddt-i.on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.ni-ddt-i input { accent-color: var(--brand); flex: none; margin: 0; }
.ni-ddt-i .grow { min-width: 0; }
.ni-ddt-i b { font-size: 13.5px; }
.ni-ddt-i small { display: block; font-size: 12px; color: var(--muted); }
.ni-ddt-i .linkb { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.ni-ddt-i .linkb .i { width: 14px; height: 14px; }
.ni-ddt-i.no { background: transparent; border-style: dashed; color: var(--muted); font-size: 13px; padding: 6px 10px; }
.ni-ddt-i.no.on { box-shadow: none; border-color: var(--line); border-style: solid; background: var(--surface); color: var(--ink); }
.ni-ddt-r { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); max-height: 210px; overflow: auto; }
.ni-ddt-r > div { display: flex; align-items: center; gap: 10px; padding: 6px 10px; font-size: 12.5px; border-top: 1px solid var(--line-2); min-width: 0; }
.ni-ddt-r > div:first-child { border-top: 0; }
.ni-ddt-r .q { flex: none; min-width: 54px; text-align: right; font-family: var(--mono); font-weight: 650; color: var(--ink); }
.ni-ddt-r .grow { min-width: 0; }
.ni-ddt-c { flex: none; padding: 1px 7px; border-radius: 999px; background: var(--brand-50); color: var(--brand-600); font-size: 11px; font-weight: 600; white-space: nowrap; }
.ni-ddt-n { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--brand-600); }
.ni-ddt-n .i { width: 14px; height: 14px; flex: none; }
.ni-ddt-e, .ni-ddt-w { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink); }
.ni-ddt-e > .i, .ni-ddt-w > .i { width: 20px; height: 20px; flex: none; color: var(--faint); }
.ni-ddt-e small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.ni-ddt-w { color: var(--muted); }
.ni-spin { display: inline-block; width: 14px; height: 14px; flex: none; border-radius: 50%; border: 2px solid var(--brand-100); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@media (max-width: 640px) { .ni-ddt-e { flex-wrap: wrap; } .ni-ddt-r .q { min-width: 40px; } }
.sqpick { display: flex; flex-wrap: wrap; gap: 6px; }
.sqp { position: relative; cursor: pointer; }
.sqp input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sqp span { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13px; font-weight: 600; color: var(--ink-2); transition: border-color .12s, background .12s; }
.sqp i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.sqp i.nessuna { border: 1.5px dashed var(--faint); }
.sqp:hover span { border-color: #C9D3CB; }
.sqp input:checked + span { border-color: var(--ink-2); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--ink-2); color: var(--ink); }
.sqp input:focus-visible + span { box-shadow: var(--ring); }
.msp-who { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.msp-da { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 9px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 13px; color: var(--ink-2); }
.msp-da .i { width: 15px; height: 15px; color: var(--muted); }
.msp-g { display: grid; grid-template-columns: minmax(0, 1fr) 120px minmax(0, 1fr); gap: 10px; }
.msp-dur { margin: -4px 0 0; }
.msp-conf { font-size: 13px; }
.cli-sc { display: flex; flex-direction: column; gap: 12px; }
.cli-sc-h { display: flex; align-items: center; gap: 10px; }
.cli-sc-h > .i { width: 20px; height: 20px; color: var(--brand); }
.cli-sc-h b { display: block; font-size: 15px; }
.cli-sc-h small { display: block; font-size: 12px; color: var(--muted); }
.cli-sc-l { display: flex; flex-direction: column; gap: 6px; }
.cli-sc-i { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); text-align: left; cursor: pointer; min-width: 0; }
.cli-sc-i:hover { border-color: var(--brand-100); background: var(--brand-50); }
.cli-sc-i .grow { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cli-sc-s { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.cli-sc-s .chip { height: 19px; font-size: 10.5px; }
.dtile { --sq: var(--muted); width: 42px; height: 44px; flex: none; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; background: color-mix(in srgb, var(--sq) 12%, #fff); color: color-mix(in srgb, var(--sq) 80%, #000); }
.dtile b { font-size: 16px; font-weight: 700; }
.dtile small { font-size: 10.5px; font-weight: 600; text-transform: uppercase; margin-top: 3px; letter-spacing: .03em; }

/* ------------------------------------------------------------------ responsive: portatil 13" (1180-1440 px), pantallas grandes, movil */
@media (min-width: 1700px) {
  .pano-top { grid-template-columns: minmax(0, 1fr) 380px; }
}
@media (max-width: 1480px) {
  .lsti .c-att { display: none; }
  table.lsti { min-width: 960px; }
}
@media (max-width: 1366px) {
  :root { --pad-x: 22px; }
  .tb-prom span { display: none; }
  .tb-prom { width: 38px; padding: 0; }
  .kpi-v { font-size: 25px; }
  .fig-v { font-size: 26px; }
  .posta { grid-template-columns: 320px minmax(0, 1fr) 256px; gap: 12px; }
  .att-save > .small { display: none; }
  .pt { padding: 0 4px; font-size: 11.5px; }
  .todo-i { grid-template-columns: minmax(160px, 220px) minmax(0, 1fr) 90px auto; gap: 12px; }
  .lsti .c-em { display: none; }
  .cal-f .lsearch.cal-q { width: 150px; }
}
@media (max-width: 1280px) {
  :root { --sb-w: 228px; }
  .sb-name b { font-size: 13.5px; }
  .wkc { padding: 7px 8px 7px 10px; }
  .pano-top { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pano-g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pano-g3 > .span2 { grid-column: 1 / -1; }
  .set { grid-template-columns: 200px minmax(0, 1fr); gap: 18px; }
  .gs { width: clamp(200px, 24vw, 340px); }
  .tb-new span { display: none; }
  .tb-new { width: 38px; padding: 0; }
  .lsti .c-ddt { width: 84px; }
  .posta { grid-template-columns: 300px minmax(0, 1fr); }
  .pm-side { grid-column: 1 / -1; flex-direction: row; overflow-x: auto; overflow-y: visible; }
  .pm-side > * { flex: 0 0 300px; }
  .content.v-posta { overflow-y: auto; display: block; }
  .posta { height: calc(100vh - var(--tb-h) - 36px); grid-template-rows: minmax(0, 1fr) auto; }
  .sm-h { display: none; }
}
@media (max-width: 1100px) {
  :root { --sb-w: 68px; }
  .sb { padding: 12px 8px; }
  .sb-name, .nav-l, .sb-sec, .sb-sync, .sb .nb { display: none; }
  .sb-brand { justify-content: center; padding: 6px 0 14px; }
  .nav-i, .sb-sq { justify-content: center; padding: 0; }
  .sb-sq { height: 30px; }
  .nav-i { position: relative; }
  .nav-i .nb:not([hidden]) { display: block; position: absolute; top: 4px; right: 8px; min-width: 8px; width: 8px; height: 8px; padding: 0; font-size: 0; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g2c, .pmf-g, .imp-tipi { grid-template-columns: 1fr; }
  .todo-i { grid-template-columns: minmax(0, 1fr) auto; }
  .todo-t { grid-column: 1 / -1; grid-row: 2; }
  .todo-d { text-align: left; flex-direction: row; gap: 6px; }
  .ni-g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .pano-g3 { grid-template-columns: 1fr; }
  .set { grid-template-columns: 1fr; }
  .set-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .set-i { height: 34px; }
  .posta { grid-template-columns: 1fr; height: auto; }
  .pm-list { max-height: 60vh; }
  .pm-read { min-height: 70vh; }
}
@media (max-width: 760px) {
  :root { --pad-x: 14px; --tb-h: 58px; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .sb { position: fixed; top: 0; bottom: 0; left: 0; width: 264px; transform: translateX(-104%); transition: transform .2s ease-out; box-shadow: var(--shadow-lg); }
  .sb-name, .nav-l, .sb-sec, .sb-sync { display: block; }
  .sb .nb:not([hidden]) { display: inline-grid; }
  .nav-i, .sb-sq { justify-content: flex-start; padding: 0 10px; }
  .nav-i .nb:not([hidden]) { position: static; width: auto; min-width: 20px; height: 20px; padding: 0 6px; font-size: 11.5px; }
  .sb-brand { justify-content: flex-start; padding: 6px 8px 14px; }
  .app.menu-aperto .sb { transform: none; }
  .app.menu-aperto .sb-ov { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(18, 28, 22, .35); }
  .tb { gap: 6px; }
  .tb-menu { display: inline-flex; }
  .tb-sub { display: none; }
  .gs { width: 40px; }
  .gs-in { padding: 0 0 0 36px; color: transparent; }
  .gs-in:focus { position: fixed; left: 10px; right: 10px; top: 10px; width: auto; z-index: 40; padding: 0 12px 0 38px; color: var(--ink); }
  .gs-k { display: none; }
  .gs-drop { position: fixed; left: 10px; right: 10px; top: 54px; width: auto; z-index: 41; }
  .tb-prom { display: none; }
  .page-h { flex-direction: column; align-items: flex-start; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-v { font-size: 22px; }
  .mese-f { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fig-v { font-size: 21px; }
  .cal-f .lsearch.cal-q { width: 100%; flex: 1 1 100%; }
  .lsearch { width: 100%; }
  .ord { margin-left: 0; }
  .nt-stack { right: 8px; top: calc(var(--tb-h) + 6px); }
  .form-grid.g2, .ni-g3, .ni-g2, .msp-g { grid-template-columns: 1fr; }
  .ui-modal-wrap { padding: 10px; }
  .content.v-posta { padding: 10px; }
  .todo-h { flex-wrap: wrap; }
}
@media (max-height: 820px) and (min-width: 761px) {
  .sb-sec { margin-top: 12px; }
  .nav-i { height: 33px; }
  .sb-sq { height: 28px; }
  .sb-sync { padding: 7px 10px; gap: 3px; }
}
@media print {
  .sb, .tb, .nt-stack, .ui-toasts, .cal-bar, .cal-f, .wkc-mv, .wk-free, .tray, .ph-a, .lst-f, .stabs { display: none !important; }
  .app { display: block; height: auto; }
  .main { height: auto; }
  .content { overflow: visible; padding: 0; }
  .cal-card { overflow: visible; border: 0; box-shadow: none; }
  .wk { min-width: 0; }
  .wk-sq { position: static; }
}
