:root {
  --bg: #f3f4f6; --panel: #fff; --nav: #fafafa; --nav-active: #fff;
  --line: #e7e8ec; --line-2: #f0f1f4; --soft: #f6f7f9;
  --text: #111318; --muted: #7c818c; --faint: #b8bcc5;
  --dark: #121417; --accent: #3d63dd; --accent-2: #eaf0ff;
  --p1: #e5484d; --p2: #f2711c; --p3: #e5a50a; --p4: #8b95a5;
  --ok: #2f9e5b; --warn: #e5730a; --bad: #e5484d; --info: #3d63dd; --ai: #8a4fe0;
  --g-violet: linear-gradient(150deg, #8f7cf2 0%, #7a9df5 55%, #a9cdf7 100%);
  --g-pink: linear-gradient(140deg, #e8459b 0%, #f0607a 50%, #f6a07a 100%);
  --g-blue: linear-gradient(160deg, #5f86ee 0%, #8fb0f6 60%, #c4d6fb 100%);
  --g-coral: linear-gradient(160deg, #ef6f6c 0%, #f39b8f 60%, #f8c7bd 100%);
  --g-mint: linear-gradient(160deg, #2fae8f 0%, #6fcdb3 60%, #bfe9dc 100%);
  --radius: 18px; --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(17,19,24,.04), 0 4px 16px rgba(17,19,24,.04);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; cursor: pointer; }
h2, h3 { letter-spacing: -.01em; }

/* ---------- layout */
.app { display: grid; grid-template-columns: 240px 1fr; height: 100vh; }
.nav { background: var(--nav); border-right: 1px solid var(--line); display: flex; flex-direction: column; overflow-y: auto; padding: 0 12px; }
.brand { padding: 20px 8px 14px; font-weight: 700; font-size: 16px; display: flex; gap: 10px; align-items: center; }
.brand .logo { width: 30px; height: 30px; border-radius: 9px; background: var(--dark); color: #fff; display: grid; place-items: center; font-size: 14px; }
.brand small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
.nav h6 { margin: 18px 10px 6px; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; color: #3d424c; border-radius: 10px; font-weight: 500; margin-bottom: 1px; }
.nav a:hover { background: #f0f1f4; color: var(--text); }
.nav a.active { background: var(--nav-active); color: var(--text); box-shadow: 0 1px 3px rgba(17,19,24,.08); font-weight: 600; }
.nav a .ico { width: 18px; text-align: center; color: var(--muted); }
.nav a.active .ico { color: var(--text); }
.nav a .count { margin-left: auto; background: var(--dark); color: #fff; border-radius: 10px; min-width: 20px; text-align: center; padding: 0 6px; font-size: 11px; line-height: 18px; }
.nav a .count:empty { display: none; }
.nav a .count.red { background: var(--p1); }
.nav .team-dot { width: 8px; height: 8px; border-radius: 50%; margin: 0 5px; }
.nav .foot { margin-top: auto; padding: 14px 0 14px; font-size: 11.5px; line-height: 1.7; color: var(--muted); }
#status { padding: 0 10px 10px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; }
.dot.on { background: #34c77b; } .dot.off { background: #f0b429; }
.usercard { display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 9px 10px; }
.usercard b { display: block; font-size: 13px; color: var(--text); }
.usercard .small { display: block; color: var(--muted); line-height: 1.3; }
.nav .usercard .links a { display: inline; padding: 0; margin: 0 10px 0 0; font-size: 11.5px; color: var(--muted); font-weight: 400; background: none; box-shadow: none; }
.usercard .links a:hover { color: var(--text); }
.avatar { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12.5px; color: #fff; background: #8b95a5; }
.avatar.sm { width: 28px; height: 28px; flex-basis: 28px; font-size: 11px; }
.avatar.lg { width: 44px; height: 44px; flex-basis: 44px; font-size: 15px; }

.main { display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.topbar { min-height: 76px; display: flex; align-items: center; padding: 16px 28px 8px; gap: 12px; flex-shrink: 0; }
.topbar .titles { min-width: 0; }
.topbar h1 { font-size: 26px; margin: 0; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .crumb { color: var(--muted); font-size: 13px; display: block; margin-top: 2px; }
.topbar .spacer { flex: 1; }
.menu-btn { display: none; }
.search { width: 300px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); }
.content { flex: 1; overflow: auto; padding: 8px 28px 28px; }
.content.flush { overflow: hidden; display: flex; flex-direction: column; }

/* ---------- elements */
.btn { border: 1px solid var(--line); background: var(--panel); border-radius: 22px; padding: 8px 15px; cursor: pointer; font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--soft); }
.btn.primary, .btn.dark { background: var(--dark); color: #fff; border-color: var(--dark); }
.btn.primary:hover, .btn.dark:hover { background: #2a2d33; }
.btn.ai { background: linear-gradient(135deg, #8a4fe0, #e8459b); color: #fff; border: 0; }
.btn.sm { padding: 5px 11px; font-size: 12.5px; }
.btn:disabled { opacity: .55; cursor: wait; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card > header { padding: 16px 20px 10px; display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.card > .body { padding: 6px 20px 18px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: 1fr 1fr; } .g3 { grid-template-columns: repeat(3, 1fr); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); cursor: default; display: flex; gap: 12px; align-items: center; min-width: 0; }
.kpi .ic { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; display: grid; place-items: center; font-size: 17px; background: var(--accent-2); color: var(--accent); }
.kpi .ic.orange { background: #fff1e6; color: var(--p2); } .kpi .ic.green { background: #e7f6ee; color: var(--ok); }
.kpi .ic.violet { background: #f1eafd; color: var(--ai); } .kpi .ic.red { background: #fdecec; color: var(--bad); }
.kpi .txt { min-width: 0; }
.kpi .v { font-size: 22px; font-weight: 650; letter-spacing: -.02em; white-space: nowrap; }
.kpi .l { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .d { font-size: 11.5px; font-weight: 600; margin-left: 6px; }
.kpi .d.up { color: var(--ok); } .kpi .d.down { color: var(--bad); } .kpi .d.flat { color: var(--muted); }
.kpi .spark { margin-left: auto; flex-shrink: 0; }
.kpi.bad .v { color: var(--bad); } .kpi.warn .v { color: var(--warn); } .kpi.ok .v { color: var(--ok); }

.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar select, .toolbar input, .pane-tools select, .pane-tools input { padding: 7px 12px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }
table.list { width: 100%; border-collapse: collapse; background: var(--panel); }
table.list th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; white-space: nowrap; }
table.list td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr.click:hover td { background: var(--soft); cursor: pointer; }
table.list td.num, table.list th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tablewrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; box-shadow: var(--shadow); background: var(--panel); }
.card table.list th { background: transparent; }
.empty { padding: 30px; text-align: center; color: var(--muted); }

.badge { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 11.5px; font-weight: 600; background: var(--line-2); color: var(--muted); white-space: nowrap; }
.badge.P1 { background: #fdecec; color: var(--p1); } .badge.P2 { background: #fff1e6; color: var(--p2); }
.badge.P3 { background: #fdf6e0; color: #a87b00; } .badge.P4 { background: #eef0f3; color: #5d6676; }
.badge.ok { background: #e7f6ee; color: var(--ok); } .badge.warn { background: #fff1e6; color: var(--warn); }
.badge.bad { background: #fdecec; color: var(--bad); } .badge.info { background: var(--accent-2); color: var(--info); }
.badge.ai { background: #f1eafd; color: var(--ai); }
.badge.type { background: #eef0f3; color: #4b5260; text-transform: uppercase; letter-spacing: .03em; font-size: 10.5px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }

/* ---------- forms */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.form .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; padding: 8px 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.field textarea { min-height: 80px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--accent-2); border-color: var(--accent); }

/* ---------- record (cliente) */
.record { display: grid; grid-template-columns: 1fr 360px; gap: 16px; align-items: start; }
.record-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.record-head h2 { margin: 0; font-size: 20px; }
.sla { font-size: 12px; padding: 3px 10px; border-radius: 12px; font-weight: 600; white-space: nowrap; }
.sla.ok { background: #e7f6ee; color: var(--ok); } .sla.bad { background: var(--bad); color: #fff; } .sla.warn { background: #fff1e6; color: var(--warn); }
.stream { display: flex; flex-direction: column; gap: 8px; }
.msg { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; }
.msg .who { font-size: 12px; color: var(--muted); margin-bottom: 4px; display: flex; gap: 8px; }
.msg.activity { padding: 7px 12px; font-size: 12.5px; color: var(--muted); background: var(--soft); border-color: transparent; }
.msg .text { white-space: pre-wrap; line-height: 1.45; }
.aibox { border: 1px solid #e6dafb; background: linear-gradient(180deg, #faf6ff, #fff); border-radius: 14px; padding: 12px 14px; }
.aibox h4 { margin: 0 0 8px; color: var(--ai); font-size: 13px; display: flex; gap: 8px; align-items: center; }
.aibox .text { white-space: pre-wrap; font-size: 13.5px; line-height: 1.45; }
.tabs { display: flex; gap: 4px; margin-bottom: 16px; background: #e9eaee; padding: 4px; border-radius: 24px; width: fit-content; max-width: 100%; overflow-x: auto; }
.tabs a { padding: 7px 16px; color: #50555f; border-radius: 20px; font-weight: 500; white-space: nowrap; }
.tabs a.active { background: var(--dark); color: #fff; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 7px 10px; font-size: 13.5px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* ---------- grafici a punti */
.dots { display: block; }
.ring-wrap { position: relative; display: grid; place-items: center; }
.ring-wrap .center { position: absolute; text-align: center; }

/* ---------- dashboard */
.hello { margin-bottom: 18px; }
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-bottom: 16px; }
.hero:has(.wide) { grid-template-columns: minmax(230px, 1fr) minmax(230px, 1fr) minmax(0, 2fr); }
.hero:has(.wide):has(> :nth-child(2):last-child) { grid-template-columns: minmax(230px, 1fr) minmax(0, 2fr); }
.stat-card { padding: 20px 22px; display: flex; flex-direction: column; min-height: 250px; position: relative; overflow: hidden; }
.stat-card h3 { margin: 0; font-size: 16px; font-weight: 600; }
.stat-card .big { font-size: 40px; font-weight: 650; letter-spacing: -.03em; line-height: 1; }
.stat-card .big small { font-size: 15px; font-weight: 500; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.stat-card .foot { margin-top: auto; color: var(--muted); font-size: 12.5px; display: flex; gap: 14px; flex-wrap: wrap; }
.grad { color: #fff; border: 0; }
.grad.violet { background: var(--g-violet); } .grad.pink { background: var(--g-pink); } .grad.blue { background: var(--g-blue); }
.grad.coral { background: var(--g-coral); } .grad.mint { background: var(--g-mint); }
.grad .big { font-size: 34px; white-space: nowrap; }
.grad .muted, .grad .foot { color: rgba(255,255,255,.82); }
.grad .chip { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.35); border-radius: 16px; padding: 4px 10px; font-size: 12px; backdrop-filter: blur(4px); }
.grad .chip .dot { background: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.lower { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(260px, 1fr); gap: 16px; align-items: start; }
.lower .side { display: grid; gap: 16px; }
.pills { display: flex; gap: 4px; background: var(--panel); border: 1px solid var(--line); padding: 4px; border-radius: 24px; margin-bottom: 12px; overflow-x: auto; }
.pills a { flex: 1; text-align: center; padding: 8px 14px; border-radius: 20px; color: #50555f; font-weight: 500; white-space: nowrap; }
.pills a.active { background: var(--dark); color: #fff; }
.split { display: grid; grid-template-columns: 1fr 1fr; }
.split > section { padding: 18px 20px; min-width: 0; }
.split > section + section { border-left: 1px solid var(--line-2); }
.split h3 { margin: 0 0 12px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.group-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; margin: 14px 0 4px; }
.group-label:first-of-type { margin-top: 2px; }
.item { display: flex; gap: 12px; align-items: center; padding: 9px 0; cursor: pointer; border-radius: 10px; }
.item:hover { background: var(--soft); }
.item .ic { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 14px; }
.item .t { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .s { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .body { flex: 1; min-width: 0; }
.item .when { color: var(--faint); font-size: 11.5px; white-space: nowrap; }
.feed { background: var(--soft); border-radius: 14px; padding: 4px 12px; }
.feed .item + .item { border-top: 1px solid var(--line); border-radius: 0; }
.agent-card { padding: 18px 20px; min-height: 200px; display: flex; flex-direction: column; gap: 12px; }
.agent-card .who { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.agent-card .who small { display: block; font-weight: 400; opacity: .8; font-size: 11px; }
.agent-card .q { font-size: 19px; font-weight: 600; line-height: 1.3; }
.agent-card .q span { opacity: .75; display: block; }
.agent-card form { margin-top: auto; display: flex; gap: 6px; background: #fff; border-radius: 26px; padding: 5px 5px 5px 16px; }
.agent-card input { flex: 1; border: 0; outline: 0; min-width: 0; color: var(--text); background: transparent; }
.agent-card form button { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--dark); color: #fff; cursor: pointer; }
.mini { min-height: 140px; padding: 16px 18px; display: flex; flex-direction: column; cursor: pointer; }
.mini .l { font-size: 13px; opacity: .9; }
.mini .v { margin-top: auto; font-size: 21px; white-space: nowrap; font-weight: 650; letter-spacing: -.02em; }
.mini .s { font-size: 11.5px; opacity: .8; }

/* ---------- workspace ticket a tre pannelli */
.ws { flex: 1; min-height: 0; display: grid; grid-template-columns: 340px minmax(0, 1fr) 320px; gap: 14px; }
.pane { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.pane-head { padding: 14px 16px 10px; border-bottom: 1px solid var(--line-2); }
.pane-body { flex: 1; overflow-y: auto; min-height: 0; }
.vtabs { display: flex; gap: 2px; overflow-x: auto; }
.vtabs a { padding: 6px 8px; border-radius: 16px; color: var(--muted); font-weight: 500; white-space: nowrap; font-size: 13px; }
.vtabs a b { font-size: 11px; margin-left: 3px; background: var(--line-2); border-radius: 8px; padding: 0 6px; color: var(--muted); }
.vtabs a.active { background: var(--dark); color: #fff; }
.vtabs a.active b { background: rgba(255,255,255,.2); color: #fff; }
.pane-tools { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.pane-tools input { flex: 1; min-width: 120px; }
.pane-tools .more { display: none; width: 100%; gap: 6px; flex-wrap: wrap; }
.pane-tools.open .more { display: flex; }
.tl-item { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); cursor: pointer; border-left: 3px solid transparent; }
.tl-item:hover { background: var(--soft); }
.tl-item.sel { background: #f3f6ff; border-left-color: var(--accent); }
.tl-item .body { flex: 1; min-width: 0; }
.tl-item .top { display: flex; gap: 6px; align-items: baseline; }
.tl-item .name { font-weight: 600; font-size: 13px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-item .when { color: var(--faint); font-size: 11.5px; white-space: nowrap; }
.tl-item .subj { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-item .snip { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 2px 0 6px; }
.tl-item .tags { display: flex; gap: 4px; flex-wrap: wrap; }
.tl-item .tags .badge { font-size: 10.5px; padding: 1px 7px; }
.conv-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.conv-head h2 { margin: 0; font-size: 16.5px; flex: 1 1 200px; min-width: 0; }
.thread { padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.bub { display: flex; gap: 10px; align-items: flex-start; }
.bub .content-b { flex: 1; min-width: 0; }
.bub .meta { font-size: 12px; color: var(--muted); margin-bottom: 4px; display: flex; gap: 8px; align-items: center; }
.bub .meta b { color: var(--text); font-size: 13px; }
.bub .text { background: var(--soft); border-radius: 4px 14px 14px 14px; padding: 11px 14px; white-space: pre-wrap; line-height: 1.5; overflow-wrap: anywhere; }
.bub.r-agent .text { background: #eef3ff; }
.bub.r-note .text { background: #fff8db; border: 1px dashed #ecd27a; }
.bub.r-ai .text { background: #f6f0ff; }
.bub.r-lightspeed .text { background: #fff1ec; border-left: 3px solid #f2711c; }
.bub.r-lightspeed_out .text { background: #fff7f2; border: 1px dashed #f5b48c; }
.act { text-align: center; font-size: 11.5px; color: var(--faint); }
.composer { border-top: 1px solid var(--line-2); padding: 10px 14px 14px; }
.suggested { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; align-items: center; }
.suggested .lbl { font-size: 11.5px; color: var(--muted); margin-right: 2px; }
.suggested button { font-size: 12px; border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 4px 11px; cursor: pointer; }
.suggested button:hover { border-color: var(--accent); color: var(--accent); }
.suggested button.ai { border-color: #e6dafb; color: var(--ai); background: #faf6ff; }
.box { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.box.internal { border-color: #ecd27a; background: #fffdf3; }
.box.to-ls { border-color: #f5b48c; background: #fffaf6; }
.lsc-warn { color: var(--bad); font-size: 12px; }
.lsc-msg { border-left: 3px solid var(--line); padding: 6px 10px; margin: 8px 0; white-space: pre-wrap; font-size: 13px; }
.lsc-msg.in { border-color: #f2711c; }
.lsc-msg.out { border-color: var(--accent); }
.box .mode { display: flex; gap: 2px; padding: 6px 8px 0; }
.box .mode a { padding: 5px 10px; font-size: 12.5px; color: var(--muted); border-bottom: 2px solid transparent; font-weight: 500; }
.box .mode a.active { color: var(--text); border-bottom-color: var(--dark); }
.box textarea { width: 100%; border: 0; outline: 0; resize: vertical; min-height: 70px; padding: 10px 12px; background: transparent; }
.box .actions { display: flex; align-items: center; gap: 8px; padding: 6px 8px 8px 12px; }
.side-sec { padding: 16px 18px; border-bottom: 1px solid var(--line-2); }
.side-sec:last-child { border-bottom: 0; }
.side-sec h4 { margin: 0 0 10px; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.side-sec .kv { grid-template-columns: 96px 1fr; font-size: 13px; align-items: center; }
.side-sec .kv select, .side-sec .kv input { width: 100%; padding: 4px 8px; border: 1px solid transparent; border-radius: 8px; background: var(--soft); font-size: 12.5px; }
.side-sec .kv select:hover, .side-sec .kv input:hover { border-color: var(--line); }
.cust { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.cust b { display: block; }
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 5px; font-size: 12.5px; color: var(--muted); }
.rel { display: flex; gap: 8px; align-items: center; padding: 7px 0; cursor: pointer; font-size: 12.5px; }
.rel + .rel { border-top: 1px solid var(--line-2); }
.rel .t { font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rel .body { flex: 1; min-width: 0; }

/* ---------- kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; height: 100%; }
.col { background: #e9eaee; border-radius: var(--radius); display: flex; flex-direction: column; min-height: 300px; }
.col > h3 { margin: 0; padding: 12px 14px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: #50555f; display: flex; justify-content: space-between; }
.col > h3 .sum { text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 500; }
.col .cards { flex: 1; padding: 0 8px 10px; display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.col.over { outline: 2px dashed var(--accent); outline-offset: -4px; }
.kcard { background: #fff; border-radius: 12px; padding: 11px 12px; box-shadow: var(--shadow); cursor: grab; border-left: 3px solid transparent; }
.kcard:active { cursor: grabbing; }
.kcard.dragging { opacity: .4; }
.kcard .t { font-weight: 600; margin-bottom: 3px; }
.kcard .s { color: var(--muted); font-size: 12.5px; }
.kcard .f { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 12.5px; }
.score { font-weight: 700; font-size: 11.5px; padding: 1px 7px; border-radius: 9px; }
.score.hi { background: #e7f6ee; color: var(--ok); } .score.mid { background: #fdf6e0; color: #a87b00; } .score.lo { background: #fdecec; color: var(--bad); }

/* ---------- modal */
.overlay { position: fixed; inset: 0; background: rgba(17,19,24,.38); display: flex; justify-content: center; align-items: flex-start; padding: 6vh 16px; z-index: 50; overflow-y: auto; }
.modal { background: #fff; border-radius: 20px; width: min(720px, 100%); box-shadow: 0 24px 60px rgba(0,0,0,.22); }
.modal.wide { width: min(980px, 100%); }
.modal header { padding: 16px 20px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 10px; }
.modal header h3 { margin: 0; font-size: 16px; flex: 1; }
.modal .body { padding: 18px 20px; }
.modal footer { padding: 12px 20px; border-top: 1px solid var(--line-2); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.x { border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--muted); }

/* ---------- agente */
.agent-fab { position: fixed; right: 22px; bottom: 22px; z-index: 40; border-radius: 26px; padding: 12px 18px; box-shadow: 0 10px 28px rgba(232,69,155,.35); }
.agent { position: fixed; right: 0; top: 0; bottom: 0; width: 420px; max-width: 100vw; background: #fff; border-left: 1px solid var(--line); z-index: 45; display: flex; flex-direction: column; box-shadow: -10px 0 30px rgba(0,0,0,.1); transform: translateX(100%); transition: transform .2s; }
.agent.open { transform: none; }
.agent header { padding: 16px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 8px; background: var(--g-pink); color: #fff; }
.agent header .x { color: #fff; }
.agent header .btn { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.55); color: #fff; }
.agent header .btn:hover { background: rgba(255,255,255,.32); }
.agent header button:focus { outline: none; } .agent header button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.agent header h3 { margin: 0; font-size: 15px; flex: 1; }
.agent .log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--soft); }
.bubble { padding: 10px 13px; border-radius: 14px; max-width: 92%; white-space: pre-wrap; line-height: 1.45; }
.bubble.user { align-self: flex-end; background: var(--dark); color: #fff; }
.bubble.assistant { align-self: flex-start; background: #fff; border: 1px solid var(--line); }
.bubble .tools { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.bubble .tools span { font-size: 10.5px; background: #f1eafd; color: var(--ai); border-radius: 8px; padding: 1px 6px; font-family: ui-monospace, monospace; }
.agent form { border-top: 1px solid var(--line); padding: 10px; display: flex; gap: 8px; }
.agent textarea { flex: 1; resize: none; height: 60px; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.suggest { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; background: var(--soft); }
.suggest button { font-size: 12px; border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 4px 10px; cursor: pointer; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--dark); color: #fff; padding: 10px 16px; border-radius: 12px; z-index: 100; box-shadow: var(--shadow); }
.toast.err { background: var(--bad); }
pre.code { background: var(--dark); color: #d6dbe4; padding: 12px; border-radius: 12px; overflow: auto; font-size: 12.5px; }
.bar { height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); }
.bar.over > span { background: var(--bad); }

@media (max-width: 1280px) { .ws { grid-template-columns: 300px minmax(0, 1fr); } .ws .details { display: none; } .ws.show-details .details { display: flex; grid-column: 1 / -1; } }
@media (max-width: 1100px) {
  .record { grid-template-columns: 1fr; } .g3 { grid-template-columns: 1fr 1fr; }
  .lower { grid-template-columns: 1fr; } .hero:has(.wide) { grid-template-columns: 1fr 1fr; } .hero .wide { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; } .split > section + section { border-left: 0; border-top: 1px solid var(--line-2); }
  .ws { grid-template-columns: 1fr; } .ws .conv { display: none; } .ws.has-sel .conv { display: flex; } .ws.has-sel .list { display: none; }
  .content.flush { overflow: auto; } .ws { flex: none; } .pane { max-height: none; } .ws .pane-body { max-height: 70vh; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; } .nav { position: fixed; z-index: 60; inset: 0 auto 0 0; width: 260px; transform: translateX(-100%); transition: transform .2s; box-shadow: 10px 0 30px rgba(0,0,0,.12); }
  .nav.open { transform: none; } .menu-btn { display: block; }
  .g2, .g3, .form { grid-template-columns: 1fr; }
  .topbar { padding: 12px 16px 6px; flex-wrap: wrap; } .topbar h1 { font-size: 21px; } .search { width: 100%; order: 5; }
  .content { padding: 8px 16px 20px; }
}

/* ---------- accesso */
[hidden] { display: none !important; }
.login-screen { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; background: radial-gradient(60% 60% at 15% 20%, #c9d6fb 0%, transparent 60%), radial-gradient(50% 50% at 85% 80%, #f8c3d8 0%, transparent 60%), var(--bg); }
.login-card { width: 100%; max-width: 380px; background: var(--panel); border-radius: 22px; padding: 30px; box-shadow: 0 20px 60px rgba(17,19,24,.12); display: flex; flex-direction: column; gap: 14px; }
.login-card .brand { padding: 0 0 6px; }
.login-card label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.login-card input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; }
.login-card .btn { width: 100%; padding: 11px; }
.login-card p { margin: 0; color: var(--muted); font-size: 13px; }
.login-err { color: var(--bad); font-size: 13px; min-height: 1em; }
.login-privacy { font-size: 12px; color: var(--muted); text-align: center; text-decoration: none; }
.login-privacy:hover { text-decoration: underline; }

/* ---------- barra di navigazione mobile */
.tabbar { display: none; }
@media (max-width: 760px) {
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; align-items: center; }
  .tabbar[hidden] { display: none; }
  .tabbar a { display: flex; flex-direction: column; align-items: center; font-size: 10.5px; color: var(--muted); gap: 1px; position: relative; min-width: 52px; }
  .tabbar a span { font-size: 18px; line-height: 1.2; }
  .tabbar a.active { color: var(--text); font-weight: 600; }
  .tabbar a i { position: absolute; top: -2px; right: 8px; background: var(--accent); color: #fff; font-style: normal; font-size: 9.5px; border-radius: 8px; padding: 0 5px; }
  .tabbar a i:empty { display: none; }
  .tabbar .plus { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--dark); color: #fff; font-size: 24px; margin-top: -18px; box-shadow: 0 8px 20px rgba(17,19,24,.25); }
  .content { padding-bottom: 90px; }
  .agent-fab { bottom: 84px; }
}
.approve { display: flex; flex-direction: column; gap: 10px; }
.approve .req { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.approve .req .t { font-weight: 600; font-size: 13.5px; }
.approve .req .s { color: var(--muted); font-size: 12px; margin: 2px 0 8px; }
.approve .req .draft { font-size: 12.5px; background: var(--soft); border-radius: 10px; padding: 8px 10px; white-space: pre-wrap; max-height: 90px; overflow: hidden; margin-bottom: 10px; }
.approve .req .row .btn { flex: 1; }
@media (max-width: 760px) {
  .hero, .hero:has(.wide) { grid-template-columns: 1fr !important; } .hero .wide { grid-column: auto; }
  .stat-card { min-height: 0; } .kpis { grid-template-columns: 1fr 1fr; gap: 10px; } .kpi { padding: 12px; } .kpi .spark { display: none; } .kpi .ic { display: none; }
  .conv-head h2 { flex-basis: 100%; }
}
@media (max-width: 760px) {
  #newTicketTop { display: none; }
  .content:has(.ws.has-sel) #wsKpis { display: none; }
  body:has(.ws.has-sel) .agent-fab { display: none; }
}
.side .grid.g2:has(> :only-child) { grid-template-columns: 1fr; }
.kpi:not(:has(.txt)) { flex-direction: column; align-items: flex-start; gap: 4px; }

/* ---------- tema: blu del marchio, look più arioso */
:root {
  --bg: #f2f3f5; --accent: #1b43fe; --accent-2: #e8edff; --info: #1b43fe;
  --g-violet: linear-gradient(150deg, #1b43fe 0%, #4d6dff 50%, #a7b9ff 100%);
  --g-blue: linear-gradient(160deg, #3f63ff 0%, #8aa2ff 60%, #d0dbff 100%);
  --radius: 22px;
  --shadow: 0 1px 2px rgba(17,19,24,.03), 0 8px 24px rgba(17,19,24,.05);
}
.brand .logo { background: var(--accent); }
.brand .logo.text { font-size: 10.5px; font-weight: 800; letter-spacing: -.02em; }
.card, .kpi, .pane, .tablewrap { border-color: transparent; }
.nav a.active { background: #eceef2; box-shadow: none; }
.nav a.active .ico { color: var(--accent); }
.stat-card { min-height: 270px; }
.stat-card .big { font-size: 46px; font-weight: 500; letter-spacing: -.04em; }
.grad .big { font-size: 38px; }
.kpi .v { font-weight: 600; }
.topbar h1 { font-weight: 500; font-size: 28px; }
.hello-strip { display: flex; gap: 4px; background: var(--panel); border-radius: 18px; padding: 4px; box-shadow: var(--shadow); }
.hello-strip span { width: 40px; text-align: center; border-radius: 14px; padding: 4px 0; font-size: 11px; color: var(--faint); line-height: 1.3; }
.hello-strip span b { display: block; font-size: 14px; color: var(--muted); font-weight: 500; }
.hello-strip span.today { background: var(--dark); color: rgba(255,255,255,.7); }
.hello-strip span.today b { color: #fff; }
@media (max-width: 1100px) { .hello-strip { display: none; } }
@media (max-width: 760px) { table.list td, table.list th { white-space: nowrap; } }

/* Beevo: card "cose da sapere" a gradiente mesh e radar del carico per team */
.insight { color: #fff; border: 0; padding: 20px 22px; background:
  radial-gradient(120% 90% at 85% 10%, #8fd18a 0%, transparent 55%),
  radial-gradient(90% 80% at 15% 90%, #5cbf72 0%, transparent 60%),
  radial-gradient(80% 70% at 45% 45%, #f2a65a 0%, transparent 65%), #6cc07a; }
.insight .ttl { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.insight .sub { font-size: 12.5px; opacity: .85; margin-bottom: 10px; padding-bottom: 12px; border-bottom: 1px dashed rgba(255,255,255,.45); }
.insight .ins { display: flex; gap: 12px; align-items: center; padding: 9px 0; cursor: pointer; }
.insight .ins + .ins { border-top: 1px dashed rgba(255,255,255,.35); }
.insight .ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; border: 2px solid rgba(255,255,255,.7); font-size: 14px; }
.insight .t { font-weight: 600; font-size: 14px; } .insight .s { font-size: 12px; opacity: .85; }
.agent-card .go { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.22); color: #fff; cursor: pointer; text-decoration: none; }
.radar-card { padding: 18px 20px 24px; } .radar-card .big { font-size: 30px; margin-top: 4px; }
.radar { position: relative; margin: 6px -6px 0; } .radar svg { width: 100%; height: auto; display: block; }
.rchip { position: absolute; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 10.5px; padding: 3px 8px; border-radius: 12px; background: rgba(30,40,90,.28); backdrop-filter: blur(4px); color: #fff; }
.rchip i { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid #fff; } .rchip b { font-weight: 600; opacity: .85; }

/* Nuovo ticket: scheda laterale clienti + selettori a pulsanti */
.nt-modal { width: min(1060px, 100%); } .nt-modal > .body { padding: 0; }
.nt { display: grid; grid-template-columns: 290px 1fr; min-height: 520px; }
.nt-side { background: #f6f7fb; border-right: 1px solid var(--line-2); padding: 16px; border-bottom-left-radius: 20px; display: flex; flex-direction: column; gap: 8px; max-height: 72vh; overflow: auto; }
.nt-h { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.nt-search, .nt-other input, .nt-newc input { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; background: #fff; font: inherit; }
.nt-clist { display: grid; gap: 6px; }
.nt-c { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 14px; background: #fff; border: 1.5px solid transparent; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.nt-c:hover { box-shadow: 0 2px 10px rgba(20,30,60,.07); }
.nt-c.on { border-color: var(--accent, #1b43fe); box-shadow: 0 0 0 3px rgba(27,67,254,.12); }
.nt-c > div { min-width: 0; flex: 1; } .nt-c b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-c small { color: var(--muted); font-size: 11.5px; }
.nt-other, .nt-newc { display: grid; gap: 6px; } .nt-other[hidden] { display: none; }
.nt-newc { background: #fff; border-radius: 14px; padding: 10px; border: 1.5px dashed var(--line); }
.nt-main { padding: 18px 22px; display: flex; flex-direction: column; gap: 6px; max-height: 72vh; overflow: auto; }
.nt-subject { font-size: 18px; font-weight: 600; border: 0; border-bottom: 1.5px solid var(--line-2); padding: 6px 0 12px; outline: 0; font-family: inherit; }
.nt-subject:focus { border-color: var(--accent, #1b43fe); }
.nt-l { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 12px; }
.nt-main textarea { min-height: 90px; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; font: inherit; resize: vertical; }
.nt-prio { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); background: #f6f7fb; border-radius: 12px; padding: 8px 12px; margin-top: 10px; }
.nt-assets { display: flex; flex-wrap: wrap; gap: 8px; }
.nt-a { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); background: #fff; border-radius: 14px; padding: 7px 12px 7px 8px; cursor: pointer; font: inherit; text-align: left; }
.nt-a .si { width: 28px; height: 28px; border-radius: 9px; background: #eef1ff; color: var(--accent, #1b43fe); display: grid; place-items: center; }
.nt-a b { display: block; font-size: 12.5px; } .nt-a small { color: var(--muted); font-size: 11px; }
.nt-a.on { border-color: var(--accent, #1b43fe); background: #f2f5ff; }

.seg { display: flex; gap: 6px; background: #f1f3f8; border-radius: 16px; padding: 4px; }
.seg button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: transparent; border-radius: 12px; padding: 9px 10px; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; min-width: 0; }
.seg button:hover:not(:disabled) { color: var(--text); background: rgba(255,255,255,.6); }
.seg button.on { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 2px 8px rgba(20,30,60,.10); }
.seg button:disabled { cursor: default; }
.seg .sl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg.ic .si { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; background: rgba(27,67,254,.08); color: var(--accent, #1b43fe); flex: none; }
.seg.ic button.on .si { background: var(--accent, #1b43fe); color: #fff; }
.seg.lv button { flex-direction: column; gap: 6px; padding: 10px 8px; }
.seg.lv button.on[data-v=alto] { box-shadow: 0 0 0 1.5px #e5484d inset, 0 2px 8px rgba(229,72,77,.15); }
.seg.lv button.on[data-v=medio] { box-shadow: 0 0 0 1.5px #f2a01c inset, 0 2px 8px rgba(242,160,28,.15); }
.seg.lv button.on[data-v=basso] { box-shadow: 0 0 0 1.5px #2f9e5b inset, 0 2px 8px rgba(47,158,91,.15); }
.meter { display: inline-flex; gap: 3px; align-items: flex-end; height: 14px; }
.meter i { width: 6px; border-radius: 2px; background: #d6dae4; } .meter i:nth-child(1) { height: 6px; } .meter i:nth-child(2) { height: 10px; } .meter i:nth-child(3) { height: 14px; }
.meter.m-basso i.on { background: #2f9e5b; } .meter.m-medio i.on { background: #f2a01c; } .meter.m-alto i.on { background: #e5484d; }
.si.u-basso { color: #2f9e5b; } .si.u-medio { color: #f2a01c; } .si.u-alto { color: #e5484d; font-size: 15px; }
.seg.chan { flex-wrap: wrap; } .seg.chan button { flex: 1 1 110px; }
/* pannello dettagli: versione compatta */
.kv dt.span, .kv dd.span { grid-column: 1 / -1; } .kv dt.span { margin-top: 4px; }
.seg.sm { border-radius: 13px; padding: 3px; gap: 3px; } .seg.sm button { padding: 6px 4px; font-size: 11.5px; gap: 5px; border-radius: 10px; }
.seg.sm.ic .si { width: 20px; height: 20px; border-radius: 7px; font-size: 11px; }
.seg.sm.ic button { flex-direction: column; gap: 3px; }
.seg.sm.lv button { gap: 4px; }
.caller { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px; border-radius: 14px; background: #f6f7fb; }
.caller > div { flex: 1; min-width: 0; } .caller b { display: block; font-size: 13px; } .caller small { color: var(--muted); font-size: 11.5px; }
.caller .chan { font-size: 11.5px; background: #fff; border-radius: 10px; padding: 4px 8px; white-space: nowrap; }
@media (max-width: 760px) {
  .nt { grid-template-columns: 1fr; } .nt-side { border-right: 0; border-bottom: 1px solid var(--line-2); border-radius: 0; max-height: none; }
  .nt-clist { grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; } .nt-clist .nt-c { scroll-snap-align: start; }
  .nt-main { max-height: none; } .seg.lv button .sl { font-size: 11.5px; white-space: normal; text-align: center; }
}

/* Ticket aperto: due colonne nette, conversazione | cliente e dettagli */
.ws.has-sel { grid-template-columns: minmax(0, 1fr) minmax(340px, 400px); gap: 18px; }
.ws.has-sel .list { display: none; }
.ws.has-sel .details { display: flex; grid-column: auto; }
.ws.has-sel #showDetails { display: none; }
.ws.has-sel .details .side-sec { padding: 18px 20px; }
.ws.has-sel .details .side-sec + .side-sec { border-top: 6px solid var(--bg, #f3f4f8); border-bottom: 0; }
@media (max-width: 860px) {
  .ws.has-sel { grid-template-columns: 1fr; }
  .ws.has-sel .details { display: none; } .ws.has-sel.show-details .details { display: flex; }
  .ws.has-sel #showDetails { display: inline-flex; }
}

/* Installazioni & onboarding */
.ins-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; } .ins-head .pills { margin: 0; }
.flow-chips, .flow-pick { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.flow-pick { flex-direction: column; }
.flow-chip { display: flex; align-items: center; gap: 10px; text-align: left; background: #fff; border: 1.5px solid transparent; border-radius: 16px; padding: 10px 14px 10px 10px; cursor: pointer; font: inherit; box-shadow: var(--shadow); }
.flow-chip b { display: block; font-size: 13.5px; } .flow-chip small { color: var(--muted); font-size: 11.5px; }
.flow-chip.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(27,67,254,.12); }
.fi { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: #fff; flex: none; font-size: 15px; }
.fi.k-installazione { background: var(--g-violet); } .fi.k-onboarding { background: var(--g-pink); } .fi.k-materiale { background: var(--g-mint); }
.funnel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(130px, 1fr); gap: 8px; margin-bottom: 14px; overflow-x: auto; }
.fstep { position: relative; background: #fff; border-radius: 14px; padding: 10px 12px 14px; display: flex; align-items: center; gap: 8px; font-size: 12.5px; overflow: hidden; box-shadow: var(--shadow); }
.fstep .n { width: 20px; height: 20px; border-radius: 50%; background: #eef1ff; color: var(--accent); display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
.fstep b { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .fstep .c { font-weight: 700; font-size: 16px; }
.fstep i { position: absolute; left: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, #1b43fe, #8aa2ff); border-radius: 0 4px 4px 0; }
.kanban.proj { height: auto; min-height: 420px; }
.pcard .t { margin-top: 4px; } .pcard .f { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12px; }
.avatar.xs { width: 20px; height: 20px; font-size: 9px; }
.prog { flex: 1; height: 6px; background: #eceef4; border-radius: 4px; overflow: hidden; min-width: 50px; } .prog span { display: block; height: 100%; background: linear-gradient(90deg, #2f9e5b, #6fcdb3); border-radius: 4px; }
.mat-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.mk { display: flex; align-items: center; gap: 12px; padding: 14px 16px; } .mk .i { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; background: #f1f3f8; }
.mk .v { font-size: 22px; font-weight: 700; } .mk .l { font-size: 12px; color: var(--muted); }
.mk.m-da_ordinare .i { color: #e5484d; } .mk.m-ordinato .i { color: #f2a01c; } .mk.m-arrivato .i { color: #1b43fe; } .mk.m-consegnato .i { color: #2f9e5b; }
.seg.mat { min-width: 380px; } .seg.mat .si { font-size: 12px; }
.seg.mat button.on[data-v=da_ordinare] .si { color: #e5484d; } .seg.mat button.on[data-v=ordinato] .si { color: #f2a01c; } .seg.mat button.on[data-v=arrivato] .si { color: #1b43fe; } .seg.mat button.on[data-v=consegnato] .si { color: #2f9e5b; }
.seg.mat.icons { min-width: 0; flex: none; } .seg.mat.icons button { flex: none; width: 28px; padding: 5px 0; }
/* editor flussi */
.flow-ed { display: grid; grid-template-columns: 270px 1fr; gap: 16px; align-items: start; }
.fl-list { padding: 8px; display: grid; gap: 4px; } .fl-list a { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 14px; cursor: pointer; color: inherit; text-decoration: none; }
.fl-list a b { display: block; font-size: 13.5px; } .fl-list a small { color: var(--muted); font-size: 11.5px; } .fl-list a.on { background: #f2f5ff; } .fl-list a:hover { background: #f6f7fb; }
.fe-head { display: flex; align-items: center; gap: 8px; padding: 16px 20px; margin-bottom: 14px; flex-wrap: wrap; } .fe-head h2 { margin: 0; font-size: 19px; }
.fe-ai { padding: 16px 20px; margin-bottom: 14px; display: grid; gap: 10px; } .fe-ai .who { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; } .fe-ai .who small { display: block; font-weight: 400; opacity: .85; font-size: 11.5px; }
.fe-ai form { display: flex; gap: 6px; background: #fff; border-radius: 26px; padding: 5px 5px 5px 16px; } .fe-ai input { flex: 1; border: 0; outline: 0; min-width: 0; font: inherit; color: var(--text); }
.fe-ai form button { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--dark); color: #fff; cursor: pointer; }
.fe-changes { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; } .fe-changes span { background: rgba(255,255,255,.22); border-radius: 12px; padding: 4px 10px; } .fe-changes em { opacity: .85; padding: 4px 0; }
.fe-stages { display: grid; gap: 10px; counter-reset: st; }
.fe-stage { padding: 12px 14px; position: relative; } .fe-stage + .fe-stage::before { content: ""; position: absolute; left: 27px; top: -11px; height: 10px; border-left: 2px dashed #c9cfdb; }
.fe-top { display: flex; align-items: center; gap: 8px; } .fe-top .n { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.fe-name { flex: 1; min-width: 0; font: inherit; font-weight: 600; font-size: 15px; border: 1px solid transparent; border-radius: 10px; padding: 6px 8px; background: transparent; } .fe-name:hover:not(:disabled), .fe-name:focus { border-color: var(--line); background: #fff; outline: 0; }
.fe-top select { border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; background: #fff; font: inherit; font-size: 12.5px; max-width: 160px; }
.fe-tasks { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px 34px; }
.task-chip { display: inline-flex; align-items: center; gap: 6px; background: #f1f3f8; border-radius: 10px; padding: 5px 6px 5px 10px; font-size: 12.5px; }
.task-chip button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 0 4px; }
.fe-add { border: 1px dashed var(--line); border-radius: 10px; padding: 5px 10px; font: inherit; font-size: 12.5px; min-width: 220px; background: #fff; }
.fe-new { border: 1.5px dashed #c9cfdb; background: transparent; border-radius: 18px; padding: 14px; font: inherit; color: var(--muted); cursor: pointer; } .fe-new:hover { border-color: var(--accent); color: var(--accent); }
/* progetto */
.proj-modal { width: min(1080px, 100%); }
.stepper { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; }
.stepper button { flex: 1 0 auto; display: flex; align-items: center; gap: 8px; border: 0; background: #f1f3f8; border-radius: 12px; padding: 8px 12px; font: inherit; font-size: 12.5px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.stepper button .n { width: 22px; height: 22px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.stepper button.done { background: #e8f6ee; color: #1f7a45; } .stepper button.done .n { background: #2f9e5b; color: #fff; }
.stepper button.on { background: var(--accent); color: #fff; font-weight: 600; } .stepper button.on .n { color: var(--accent); }
.stepper button:disabled { cursor: default; }
.pj-body { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; }
.pj-body aside { background: #f6f7fb; border-radius: 16px; } .pj-body aside .side-sec { border-color: #e6e8ef; }
.tgroup { margin-top: 12px; } .tg-h { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 4px; }
.tgroup.cur { background: #f2f5ff; border-radius: 14px; padding: 10px 12px; }
.task { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-bottom: 1px solid var(--line-2); cursor: pointer; font-size: 13.5px; } .task span { flex: 1; } .task small { color: var(--muted); font-size: 11px; }
.task input { width: 17px; height: 17px; accent-color: #2f9e5b; } .task.done span { color: var(--muted); text-decoration: line-through; } .task .x { visibility: hidden; } .task:hover .x { visibility: visible; }
.addtask, .addmat { display: flex; gap: 6px; margin-top: 10px; } .addtask input, .addmat input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; font: inherit; font-size: 13px; background: #fff; }
.addmat { flex-wrap: wrap; } .addmat input[name=qty] { flex: 0 0 56px; } .addmat input[name=supplier] { flex-basis: 100%; order: 3; } .addmat button { order: 4; }
.mat { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid #e6e8ef; } .mat > div:first-child { flex: 1; min-width: 0; } .mat b { display: block; font-size: 13px; } .mat small { color: var(--muted); font-size: 11.5px; }
.plog > div { display: flex; flex-direction: column; padding: 5px 0; font-size: 12.5px; } .plog small { color: var(--muted); font-size: 11px; }
.file { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-2); } .file > div { flex: 1; min-width: 0; } .file a { font-weight: 600; font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .file small { color: var(--muted); font-size: 11px; }
.ft { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 9.5px; font-weight: 700; color: #fff; background: #8b93a7; flex: none; }
.ft-PDF { background: #e5484d; } .ft-IMG { background: #8a4fe0; } .ft-DOC { background: #1b43fe; } .ft-XLS, .ft-CSV { background: #2f9e5b; }
.drop { display: block; margin-top: 10px; border: 1.5px dashed #c9cfdb; border-radius: 14px; padding: 14px; text-align: center; font-size: 12.5px; color: var(--muted); cursor: pointer; } .drop.over, .drop:hover { border-color: var(--accent); color: var(--accent); background: #f2f5ff; }
/* scheda vendita */
.lead-page { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.lead-main, .lead-side { display: grid; gap: 16px; }
.lead-hero { padding: 18px 20px; } .lead-hero .row { gap: 14px; } .lead-hero .big { font-size: 30px; font-weight: 700; }
.lead-steps { margin: 16px 0 0; } .btn.win { background: #2f9e5b; color: #fff; border-color: #2f9e5b; }
.composer-l textarea { flex: 1; min-height: 64px; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; font: inherit; resize: vertical; }
.composer-l .seg { max-width: 420px; }
.timeline { margin-top: 14px; display: grid; } .tl { display: flex; gap: 12px; padding: 9px 0; position: relative; font-size: 13.5px; } .tl small { color: var(--muted); font-size: 11.5px; }
.tl + .tl::before { content: ""; position: absolute; left: 14px; top: -9px; height: 18px; border-left: 2px solid #eceef4; }
.ti { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #f1f3f8; color: var(--muted); flex: none; font-size: 13px; }
.ti.k-chiamata { background: #e8f6ee; color: #2f9e5b; } .ti.k-email { background: #eef1ff; color: #1b43fe; } .ti.k-meeting { background: #fff3e0; color: #f2711c; } .ti.k-fase { background: #f3ecfd; color: #8a4fe0; } .ti.k-allegato { background: #fdecef; color: #e5484d; }
.doc { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); } .doc > div { flex: 1; min-width: 0; } .doc b { font-size: 13px; } .doc small { display: block; color: var(--muted); font-size: 11.5px; }
.doc .fi { width: 30px; height: 30px; font-size: 13px; border-radius: 9px; }
.contact { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); align-items: flex-start; } .contact > div:nth-child(2) { flex: 1; min-width: 0; }
.contact b { font-size: 13.5px; } .contact small { display: block; color: var(--muted); font-size: 11.5px; } .contact .links { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; font-size: 12.5px; } .contact .links a { color: var(--accent); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact .acts { display: flex; } .contact .acts .x { font-size: 13px; }
.lead-ai { min-height: 0; }
@media (max-width: 1100px) { .lead-page, .pj-body, .flow-ed { grid-template-columns: 1fr; } .mat-kpis { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .seg.mat { min-width: 300px; } .seg.mat .sl { display: none; } .flow-chips { flex-wrap: nowrap; overflow-x: auto; } .flow-chip { flex: none; } }
.seg.mat .si { font-weight: 700; font-size: 12px; }
.lead-ai .q { font-size: 16px; } .lead-ai .q span { font-size: 13px; font-weight: 400; margin-top: 6px; opacity: .9; }
/* selettori più compatti */
.seg { padding: 3px; gap: 3px; border-radius: 12px; }
.seg button { padding: 6px 10px; border-radius: 9px; font-size: 13px; gap: 7px; }
.seg button:focus { outline: none; } .seg button:focus-visible { outline: 2px solid rgba(27,67,254,.35); outline-offset: 1px; }
.seg.ic .si { width: 22px; height: 22px; border-radius: 7px; font-size: 12px; }
.seg.lv button { flex-direction: row; padding: 6px 10px; gap: 8px; }
.seg.lv button.on[data-v=alto] { box-shadow: 0 0 0 1px #e5484d inset, 0 1px 4px rgba(229,72,77,.12); }
.seg.lv button.on[data-v=medio] { box-shadow: 0 0 0 1px #f2a01c inset, 0 1px 4px rgba(242,160,28,.12); }
.seg.lv button.on[data-v=basso] { box-shadow: 0 0 0 1px #2f9e5b inset, 0 1px 4px rgba(47,158,91,.12); }
.meter { height: 12px; } .meter i { width: 5px; } .meter i:nth-child(1) { height: 5px; } .meter i:nth-child(2) { height: 8px; } .meter i:nth-child(3) { height: 12px; }
.seg.sm.lv button { flex-direction: column; gap: 3px; padding: 5px 4px; }
.nt-l { margin-top: 10px; } .nt-prio { margin-top: 8px; padding: 6px 12px; }

/* Knowledge base */
.kb-top { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; margin-bottom: 16px; }
.kb-ask { padding: 20px 22px; display: grid; gap: 12px; }
.kb-ask .who { display: flex; align-items: center; gap: 8px; font-weight: 600; } .kb-ask .who small { display: block; font-weight: 400; opacity: .85; font-size: 12px; }
.kb-ask form { display: flex; gap: 6px; background: #fff; border-radius: 26px; padding: 6px 6px 6px 18px; } .kb-ask input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 15px; min-width: 0; color: var(--text); }
.kb-ask form button { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--dark); color: #fff; cursor: pointer; }
.kb-ex { display: flex; flex-wrap: wrap; gap: 6px; } .kb-ex button { border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.18); color: #fff; border-radius: 14px; padding: 4px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.kb-answer { background: #fff; color: var(--text); border-radius: 16px; padding: 14px 16px; }
.kb-answer .src { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.kb-answer .src a { background: #f2f5ff; color: var(--accent); border-radius: 10px; padding: 3px 9px; cursor: pointer; }
.md h3 { font-size: 15px; margin: 14px 0 6px; } .md h3:first-child { margin-top: 0; } .md p { margin: 6px 0; } .md ol, .md ul { margin: 6px 0; padding-left: 22px; } .md li { margin: 3px 0; }
.md code { background: #f1f3f8; padding: 1px 5px; border-radius: 5px; font-size: 12.5px; }
.kb-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .kb-stats .card { display: flex; align-items: center; gap: 12px; padding: 14px; }
.kb-stats .i { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: #f2f5ff; color: var(--accent); } .kb-stats .v { font-size: 22px; font-weight: 700; } .kb-stats .l { font-size: 12px; color: var(--muted); }
.kb-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.kb-tools { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; } .kb-tools .pills { margin: 0; flex-wrap: wrap; } .kb-tools .search { width: 220px; margin-left: auto; }
.kb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.kb-card { background: #fff; border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow); cursor: pointer; display: flex; flex-direction: column; gap: 6px; transition: transform .15s, box-shadow .15s; }
.kb-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(20,30,60,.10); } .kb-card .row { gap: 6px; }
.kb-card .t { font-weight: 600; font-size: 14.5px; line-height: 1.3; } .kb-card .s { color: var(--muted); font-size: 12.5px; line-height: 1.45; flex: 1; }
.kb-card .f { display: flex; gap: 10px; font-size: 11.5px; color: var(--muted); }
.kb-ico { width: 28px; height: 28px; border-radius: 9px; display: inline-grid; place-items: center; background: #f2f5ff; color: var(--accent); flex: none; } .kb-ico.sm { width: 24px; height: 24px; font-size: 12px; }
.kb-tk { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line-2); } .kb-tk > div { flex: 1; min-width: 0; } .kb-tk b { font-size: 13px; display: block; } .kb-tk small { color: var(--muted); font-size: 11.5px; }
.kb-article { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; } .kb-article article { padding: 22px 26px; }
.kb-text { font-size: 14.5px; line-height: 1.6; margin-top: 14px; }
.kb-vote { display: flex; align-items: center; gap: 8px; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line-2); font-size: 13px; color: var(--muted); }
.kb-ed-row { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: end; } .kb-ed-row select { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; font: inherit; width: 100%; background: #fff; }
.kb-ed { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .kb-ed textarea { min-height: 300px; border: 1px solid var(--line); border-radius: 14px; padding: 12px; font: 13px/1.5 ui-monospace, monospace; resize: vertical; }
.kb-prev { border: 1px solid var(--line-2); border-radius: 14px; padding: 12px 14px; background: #fafbfd; max-height: 420px; overflow: auto; font-size: 13.5px; }
@media (max-width: 1100px) { .kb-top, .kb-body, .kb-article { grid-template-columns: 1fr; } .kb-stats { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 760px) { .kb-stats { grid-template-columns: 1fr 1fr; } .kb-ed, .kb-ed-row { grid-template-columns: 1fr; } .kb-tools .search { width: 100%; } }
.kb-stats { align-self: start; } .kb-editor-fix, .modal .nt-subject { width: 100%; }
.kb-tools .pills { display: flex; flex-wrap: wrap; width: auto; } .kb-tools .pills a { flex: none; }

/* Stepper di stato numerato */
.psteps { display: flex; align-items: center; gap: 0; overflow-x: auto; padding: 2px 0; }
.psteps .ps { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; font: inherit; cursor: pointer; padding: 4px 2px; flex: none; color: var(--muted); }
.psteps .ps:disabled { cursor: default; }
.psteps .dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: #fff; border: 1.5px solid #d6dae4; color: var(--muted); flex: none; transition: all .15s; }
.psteps .lb { font-size: 12.5px; font-weight: 500; white-space: nowrap; text-align: left; } .psteps .lb small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }
.psteps .bar { flex: 1 1 24px; min-width: 18px; height: 2px; background: #e3e6ee; margin: 0 8px; border-radius: 2px; }
.psteps .ps.done .dot { background: #2f9e5b; border-color: #2f9e5b; color: #fff; } .psteps .ps.done { color: var(--text); }
.psteps .ps.done + .bar { background: #2f9e5b; }
.psteps .ps.on .dot { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 4px rgba(27,67,254,.15); } .psteps .ps.on { color: var(--text); font-weight: 600; } .psteps .ps.on .lb { font-weight: 600; }
.psteps .ps:not(:disabled):hover .dot { border-color: var(--accent); }
.psteps.off .ps.on .dot { background: #e5484d; border-color: #e5484d; box-shadow: 0 0 0 4px rgba(229,72,77,.15); }
.conv-steps { padding: 10px 18px; border-bottom: 1px solid var(--line-2); background: #fafbfd; }
.lead-steps { margin-top: 16px; padding: 12px 14px; background: #f6f7fb; border-radius: 16px; }
/* KPI con periodo e confronto */
.kpi-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.period { display: flex; gap: 2px; background: #fff; border-radius: 14px; padding: 3px; box-shadow: var(--shadow); }
.period a { padding: 5px 12px; border-radius: 11px; font-size: 12.5px; color: var(--muted); cursor: pointer; } .period a.active { background: var(--dark); color: #fff; }
.kpi .txt .d { display: block; font-size: 11.5px; margin-top: 2px; } .kpi .v small { font-size: 12px; font-weight: 500; color: var(--muted); }
/* tab di sezione sottolineati */
.tabs { background: transparent; padding: 0; border-radius: 0; gap: 22px; border-bottom: 1px solid var(--line); width: 100%; }
.tabs a { padding: 10px 2px; border-radius: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.tabs a.active { background: transparent; color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
/* sempre tema chiaro: niente campi scuri se il sistema è in modalità scura */
:root { color-scheme: light; }
input, textarea, select { background-color: #fff; color: var(--text); }
textarea::placeholder, input::placeholder { color: #9aa1b1; }
.psteps .bar { min-width: 8px; margin: 0 6px; } .psteps .ps { gap: 6px; } .psteps .dot { width: 24px; height: 24px; font-size: 11.5px; } .psteps .lb { font-size: 12px; }
.lead-steps { padding: 10px 12px; }

/* documenti Bexio espandibili */
[data-doc] { cursor: pointer; }
[data-doc] .chev { display: inline-block; color: var(--muted); transition: transform .15s; font-weight: 600; }
[data-doc].open .chev { transform: rotate(90deg); color: var(--primary, #1b43fe); }
.doc.click:hover, tr.click[data-doc]:hover { background: #f5f7ff; }
.docx-wrap > td { padding: 0 !important; background: #f8f9fd; }
div.docx-wrap { margin: -2px 0 10px; }
.docx { padding: 14px 16px; border-radius: 12px; background: #f8f9fd; border: 1px solid #e6e9f5; }
.docx-wrap > td .docx { border: 0; border-radius: 0; }
.docx-steps { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.docx-steps .psteps { flex: 1; }
.docx-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(220px, 1fr); gap: 16px; }
.docx-lines { background: #fff; border-radius: 10px; }
.docx-lines td, .docx-lines th { font-size: 13px; }
.docx-lines tr.sub td { color: var(--muted); border-bottom: 0; padding-top: 4px; padding-bottom: 4px; }
.docx-lines tr.tot td { font-weight: 700; border-top: 2px solid #e1e5f2; }
.docx-side { display: flex; flex-direction: column; gap: 8px; }
.docx-side .kv { display: flex; justify-content: space-between; font-size: 13px; }
.docx-side .kv span { color: var(--muted); }
.docx-ex { background: linear-gradient(135deg, #eef2ff, #f7f3ff); border-radius: 10px; padding: 10px 12px; }
.docx-ex .h { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 13px; }
.docx-ex ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.5; }
.docx-ex li + li { margin-top: 3px; }
@media (max-width: 900px) { .docx-grid { grid-template-columns: 1fr; } }
.docx { container-type: inline-size; }
@container (max-width: 620px) { .docx-grid { grid-template-columns: 1fr; } .docx-steps .psteps .lb { font-size: 11px; } }
@media (max-width: 760px) { .docx-wrap > td > .docx { position: sticky; left: 0; width: calc(100vw - 34px); box-sizing: border-box; padding: 12px; } }
.docx table.docx-lines { min-width: 0; width: 100%; }
@container (max-width: 520px) { .docx-lines th:nth-child(2), .docx-lines th:nth-child(3), .docx-lines tr:not(.sub):not(.tot) td:nth-child(2), .docx-lines tr:not(.sub):not(.tot) td:nth-child(3) { display: none; } .docx-lines tr.sub td[colspan], .docx-lines tr.tot td[colspan] { } }
.docx table.list td { white-space: normal; }
.docx-lines .qp { display: none; color: var(--muted); font-size: 12px; }
@container (max-width: 520px) { .docx-lines .qp { display: block; } }
.docx-tot { background: #fff; border-radius: 0 0 10px 10px; margin-top: -4px; padding: 6px 14px 10px; border-top: 1px solid var(--line-2); font-size: 13px; }
.docx-tot > div { display: flex; justify-content: space-between; padding: 3px 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.docx-tot > div.g { color: var(--text); font-weight: 700; border-top: 2px solid #e1e5f2; margin-top: 4px; padding-top: 8px; }
.docx-lines { border-radius: 10px 10px 0 0; }
.docx-grid > * { min-width: 0; }
@container (max-width: 620px) { .docx-grid { grid-template-columns: minmax(0, 1fr); } }
.docx table.list td.num { white-space: nowrap; }

/* ticket aperto: conversazione e dettagli in un unico riquadro */
@media (min-width: 861px) {
  .ws.has-sel { gap: 0; }
  .ws.has-sel .conv { border-top-right-radius: 0; border-bottom-right-radius: 0; border-right: 0; box-shadow: none; }
  .ws.has-sel .details { border-top-left-radius: 0; border-bottom-left-radius: 0; border-left: 1px solid var(--line); box-shadow: none; background: #fbfcfe; }
  .ws.has-sel { border-radius: var(--radius); box-shadow: var(--shadow); }
  .ws.has-sel .details .side-sec + .side-sec { border-top: 1px solid var(--line-2); }
}
.conv-steps { overflow-x: auto; scrollbar-width: none; }
.conv-steps .psteps { min-width: max-content; }

/* richieste materiale */
.mk { cursor: pointer; border: 1.5px solid transparent; transition: border-color .15s, transform .15s; } .mk:hover { transform: translateY(-1px); }
.mk.on { border-color: var(--primary, #1b43fe); }
.mk.m-da_ordinare .i, .mi.m-da_ordinare { background: #fdecec; color: #d93036; } .mk.m-ordinato .i, .mi.m-ordinato { background: #fff4e0; color: #c97a00; }
.mk.m-arrivato .i, .mi.m-arrivato { background: #e8eeff; color: #1b43fe; } .mk.m-consegnato .i, .mi.m-consegnato { background: #e6f6ec; color: #2f9e5b; }
.mat-card { overflow: hidden; } .mat-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px 6px; }
.mat-table th { text-align: left; } .mat-table td { vertical-align: middle; }
.mat-it { display: flex; align-items: center; gap: 12px; } .mi { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; flex: none; }
.mat-table .qty { display: inline-block; min-width: 34px; text-align: center; padding: 3px 8px; border-radius: 8px; background: #f1f3f8; font-weight: 600; font-size: 13px; }
.mat-table .plink { font-weight: 500; cursor: pointer; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #f1f3f8; font-size: 12.5px; white-space: nowrap; }
.mtrack { display: flex; align-items: center; width: 168px; }
.mtrack i { flex: 1; height: 2px; background: #e3e6ee; }
.mtrack .md { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid #dfe3ec; background: #fff; color: #a0a7b8; font-size: 12px; font-weight: 700; display: grid; place-items: center; padding: 0; cursor: pointer; flex: none; }
.mtrack .md:disabled { cursor: default; }
.mtrack .md.done { background: #2f9e5b; border-color: #2f9e5b; color: #fff; }
.mtrack .md.on { color: #fff; border-color: transparent; box-shadow: 0 0 0 4px rgba(27, 67, 254, .12); }
.mtrack .md.on.m-da_ordinare { background: #e5484d; } .mtrack .md.on.m-ordinato { background: #f5a524; } .mtrack .md.on.m-arrivato { background: #1b43fe; } .mtrack .md.on.m-consegnato { background: #2f9e5b; }
.mtrack .md:not(:disabled):hover { border-color: var(--primary, #1b43fe); }
.mlbl { font-size: 11.5px; margin-top: 4px; font-weight: 600; } .mlbl.m-da_ordinare { color: #d93036; } .mlbl.m-ordinato { color: #c97a00; } .mlbl.m-arrivato { color: #1b43fe; } .mlbl.m-consegnato { color: #2f9e5b; }

/* magazzino */
.nav a .count.warn { background: #f5a524; }
.inv-kpis { margin-bottom: 14px; }
.inv-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; align-items: start; }
.cat-tree .body { padding: 6px 8px 10px; display: flex; flex-direction: column; }
.cat-tree .ct { display: flex; align-items: center; padding: 7px 10px; border-radius: 9px; font-size: 13px; cursor: pointer; color: var(--text); }
.cat-tree .ct span { margin-left: auto; font-size: 11px; color: var(--muted); background: #f1f3f8; border-radius: 8px; padding: 0 7px; }
.cat-tree .ct.lv0 { font-weight: 600; margin-top: 4px; } .cat-tree .ct.lv1 { padding-left: 20px; color: #4a5160; }
.cat-tree .ct:hover { background: #f5f7ff; } .cat-tree .ct.on { background: #e8eeff; color: #1b43fe; }
.toolbar .chk { display: flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.toolbar input#invQ { min-width: 220px; }
.whchips { display: flex; flex-wrap: wrap; gap: 5px; }
.whc { font-size: 12px; background: #f1f3f8; border-radius: 8px; padding: 2px 8px; white-space: nowrap; color: #4a5160; } .whc b { color: var(--text); }
.whc.in { background: #f2eefe; color: #6e4ad9; }
.mv { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 8px; background: #f1f3f8; text-transform: capitalize; }
.mv.k-carico { background: #e6f6ec; color: #2f9e5b; } .mv.k-scarico { background: #fdecec; color: #d93036; }
.mv.k-trasferimento { background: #e8eeff; color: #1b43fe; } .mv.k-rettifica { background: #fff4e0; color: #c97a00; }
b.pos, .pos { color: #2f9e5b; } b.neg, .neg { color: #d93036; }
.trend { font-weight: 600; } .trend.up { color: #d93036; } .trend.down { color: #2f9e5b; } .trend.flat { color: var(--muted); }
.lchart { display: block; overflow: visible; }
.mbar { height: 8px; border-radius: 6px; background: #eef0f5; overflow: hidden; flex: 1; } .mbar span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #1b43fe, #7a5af8); }
.mg-sum { margin-bottom: 14px; } .mg-sum .big small { font-size: 14px; color: var(--muted); font-weight: 500; }
details.hist { margin-top: 14px; } details.hist summary { cursor: pointer; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.site header small { font-weight: 400; font-size: 12px; }
.wh { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-radius: 10px; cursor: pointer; } .wh + .wh { border-top: 1px solid var(--line-2); }
.wh:hover { background: #f8f9fd; } .wh small { display: block; color: var(--muted); font-size: 12px; } .wh .num { font-variant-numeric: tabular-nums; font-weight: 600; }
.whi { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: #e8eeff; color: #1b43fe; font-size: 17px; }
.whi.k-furgone { background: #fff4e0; color: #c97a00; } .whi.k-presso-cliente { background: #e6f6ec; color: #2f9e5b; }
.cat-list .cat { display: flex; align-items: center; gap: 8px; padding: 9px 4px; border-bottom: 1px solid var(--line-2); } .cat-list .cat.lv1 { padding-left: 26px; }
.item-m h4 { margin: 16px 0 8px; font-size: 13px; }
.im-tabs { margin-top: 14px; }
.whbar { display: grid; grid-template-columns: 220px 1fr 50px; align-items: center; gap: 10px; font-size: 13px; padding: 4px 0; } .whbar b { text-align: right; }
.moves .mvr { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.ph-head { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 12px 0; }
.ph-head > div { background: #f8f9fd; border-radius: 10px; padding: 10px 12px; } .ph-head small { display: block; color: var(--muted); font-size: 11.5px; } .ph-head b { font-size: 16px; }
.ph-chart { background: #fff; border: 1px solid var(--line-2); border-radius: 12px; padding: 14px 14px 6px; margin-bottom: 10px; }
.ph-x { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }
.ph-sup { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; } .ph-sup span { font-size: 12px; background: #f1f3f8; padding: 3px 10px; border-radius: 999px; } .ph-sup .best { background: #e6f6ec; color: #2f9e5b; }
.po-m .psteps { margin-bottom: 14px; }
.po-meta { margin-bottom: 12px; gap: 10px; } .po-meta > div { background: #f8f9fd; border-radius: 10px; padding: 10px 12px; } .po-meta small { display: block; color: var(--muted); font-size: 11.5px; }
.po-m tr.tot td { border-top: 2px solid #e1e5f2; }
.po-line { display: grid; grid-template-columns: minmax(0, 1fr) 80px 110px auto auto; gap: 8px; align-items: center; margin-bottom: 6px; }
.po-total { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.docx-mg { background: #fff; border: 1px solid #e6e9f5; border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.docx-mg .h { display: flex; align-items: center; font-size: 13px; } .docx-mg .kv { display: flex; justify-content: space-between; font-size: 13px; } .docx-mg .kv span { color: var(--muted); }
.po-link { cursor: pointer; } .po-link:hover { color: #1b43fe; }
@media (max-width: 900px) { .inv-layout { grid-template-columns: 1fr; } .cat-tree { display: none; } .whbar { grid-template-columns: 1fr 1fr 40px; } .ph-head { grid-template-columns: 1fr 1fr; } .po-line { grid-template-columns: 1fr 70px 90px auto; } .po-line .small { grid-column: 1 / -1; } }
table.list td.num { white-space: nowrap; }
.mg-sum .big { font-size: 24px; font-weight: 700; margin-top: 4px; }

/* onboarding per prodotto */
.onb-intro { display: flex; align-items: center; gap: 16px; padding: 16px 20px; margin-bottom: 14px; background: linear-gradient(135deg, #eef2ff, #f7f3ff); border: 0; }
.onb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.onb-card { padding: 16px 18px; cursor: pointer; display: flex; flex-direction: column; gap: 12px; transition: transform .15s; } .onb-card:hover { transform: translateY(-2px); }
.onb-card .row { display: flex; align-items: center; gap: 10px; }
.prods { display: flex; flex-wrap: wrap; gap: 6px; } .prod { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #e8eeff; color: #1b43fe; }
.onb-prog { display: flex; align-items: center; gap: 10px; } .onb-prog b { font-size: 13px; min-width: 36px; text-align: right; }
.onb-stats { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12.5px; color: var(--muted); } .onb-stats b { color: var(--text); }
.saved { color: #2f9e5b; font-weight: 600; font-size: 12px; background: #e6f6ec; border-radius: 999px; padding: 1px 8px; }
.prod-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.pp { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; font-size: 13px; cursor: pointer; color: var(--text); }
.pp.on { border-color: #1b43fe; background: #e8eeff; color: #1b43fe; font-weight: 600; } .pp:disabled { cursor: default; }
.ob-plan { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.plan { display: grid; grid-template-columns: 1fr 1.3fr; gap: 18px; }
.nt-l .saved { margin-left: 6px; }
.pf { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border-radius: 10px; background: #f8f9fd; margin-bottom: 6px; } .pf small { display: block; color: var(--muted); font-size: 12px; }
.pf.chained { margin-left: 22px; background: #f6f2ff; } .pf.click { cursor: pointer; } .pf.click:hover { background: #eef2ff; }
.pr, .rq-row { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; margin-bottom: 4px; } .pr small, .rq-row small { display: block; color: var(--muted); font-size: 12px; }
.pr.shared, .rq-row.shared { background: #f2f5ff; }
.ri { width: 30px; height: 30px; border-radius: 9px; background: #f1f3f8; display: grid; place-items: center; flex: none; font-size: 14px; }
.pr > div, .rq-t { flex: 1; min-width: 0; }
.onb-m .onb-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; margin-top: 14px; }
.sec-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.rq-st { display: flex; align-items: center; gap: 3px; flex: none; }
.rs { width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: #a0a7b8; font-size: 12px; cursor: pointer; padding: 0; }
.rs.on { color: #fff; border-color: transparent; } .rs.on.s-da_richiedere { background: #8a93a6; } .rs.on.s-richiesto { background: #f5a524; } .rs.on.s-ricevuto { background: #1b43fe; } .rs.on.s-verificato { background: #2f9e5b; }
.rl { font-size: 11.5px; font-weight: 600; width: 74px; margin-left: 6px; } .rl.s-richiesto { color: #c97a00; } .rl.s-ricevuto { color: #1b43fe; } .rl.s-verificato { color: #2f9e5b; } .rl.s-da_richiedere { color: var(--muted); }
.legal { color: #6e4ad9; }
.fe-cfg { margin-top: 14px; } .fe-cfg .nt-l { margin: 4px 0 8px; }
.req-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.rp { display: flex; gap: 10px; align-items: center; text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 8px 10px; cursor: pointer; color: var(--text); }
.rp small { display: block; color: var(--muted); font-size: 11.5px; } .rp.on { border-color: #1b43fe; background: #f2f5ff; } .rp.on .ri { background: #1b43fe; color: #fff; }
.rp.add { border-style: dashed; }
@media (max-width: 900px) { .plan, .onb-m .onb-cols { grid-template-columns: 1fr; } .rq-row { flex-wrap: wrap; } .rl { display: none; } }

/* scheda articolo (campi come Bexio) */
.modal.xwide { width: min(1180px, 96vw); }
.inherit { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: linear-gradient(135deg, #eef2ff, #f7f3ff); margin-bottom: 16px; }
.inherit small { display: block; color: var(--muted); font-size: 12px; } .inherit select { margin-left: auto; max-width: 360px; }
.pf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pf-grid h4 { margin: 0 0 8px; font-size: 13.5px; } .pf-box { background: #f8f9fd; border-radius: 12px; padding: 14px; }
.pf-sep { border-top: 1px solid var(--line); margin: 2px 0; padding: 0; }
.kind-pick { display: flex; gap: 6px; } .kind-pick .pp { padding: 6px 12px; }
.cat-row { display: flex; gap: 6px; } .cat-row select { flex: 1; }
.cat-new { display: flex; gap: 6px; margin-top: 6px; } .cat-new input { flex: 1; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 13px; }
@media (max-width: 900px) { .pf-grid { grid-template-columns: 1fr; } .inherit { flex-wrap: wrap; } .inherit select { margin-left: 0; max-width: none; width: 100%; } }

.form .field label.chk { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); cursor: pointer; }
.chk input[type=checkbox] { width: 16px; height: 16px; flex: none; margin: 0; accent-color: #1b43fe; }
.inherit select { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; font-size: 13px; }

/* anagrafiche */
.bchip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 2px 9px 2px 6px; background: #f1f3f8; border-radius: 999px; white-space: nowrap; }
.bchip i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.pills.sm a { padding: 5px 12px; font-size: 12.5px; }
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.brand-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; cursor: pointer; transition: transform .15s; } .brand-card:hover { transform: translateY(-2px); }
.brand-card .row { display: flex; align-items: center; gap: 12px; }
.blogo { width: 40px; height: 40px; border-radius: 12px; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; text-transform: uppercase; flex: none; }
.bstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; } .bstats > * { background: #f8f9fd; border-radius: 10px; padding: 8px; text-align: center; color: var(--text); }
.bstats b { display: block; font-size: 15px; } .bstats small { color: var(--muted); font-size: 11px; } .bstats a:hover { background: #eef2ff; }
.blinks { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12.5px; } .blinks span { color: var(--muted); }
#catTab table.list td:first-child { min-width: 240px; }
.bstats b { font-size: 14px; white-space: nowrap; } .bstats > * { padding: 8px 4px; }

/* flussi: menu a tendina multi selezione */
.flow-dd { position: relative; }
.fdd-btn { display: inline-flex; align-items: center; gap: 8px; max-width: 340px; }
.fdd-btn b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .fdd-btn .muted { font-size: 12px; } .fdd-btn .car { font-size: 11px; color: var(--muted); }
.fdd-btn .fi, .fdd-it .fi { width: 24px; height: 24px; border-radius: 8px; font-size: 11px; flex: none; }
.fdd-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 320px; padding: 6px; display: flex; flex-direction: column; }
.fdd-menu[hidden] { display: none; }
.fdd-top { display: flex; align-items: center; gap: 12px; padding: 6px 8px 8px; font-size: 12.5px; border-bottom: 1px solid var(--line); margin-bottom: 4px; } .fdd-top a { cursor: pointer; }
.fdd-it { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; cursor: pointer; } .fdd-it:hover { background: #f4f6fc; }
.fdd-it input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; } .fdd-it b { display: block; font-size: 13px; } .fdd-it small { color: var(--muted); font-size: 11.5px; }
.flow-sec { display: flex; align-items: center; gap: 10px; margin: 22px 0 10px; } .flow-sec:first-of-type { margin-top: 4px; } .flow-sec b { font-size: 15px; }
.flow-sec .fi { width: 28px; height: 28px; border-radius: 9px; font-size: 12px; }
@media (max-width: 760px) { .flow-dd { order: 5; width: 100%; } .fdd-btn { max-width: none; width: 100%; } .fdd-btn .car { margin-left: auto; } .fdd-menu { left: 0; right: auto; width: 100%; } }

/* contratti vendor */
.ctr-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ctr-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; margin-top: 16px; }
.ctr-grid textarea { font-family: inherit; line-height: 1.5; min-height: 300px; }
.ctr-side { background: #f8f9fd; border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 8px; align-self: start; }
.ctr-side .kv { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; } .ctr-side .kv span { color: var(--muted); }
.ctr-l b { display: block; font-size: 13px; } .ctr-l small { color: var(--muted); font-size: 11.5px; }
.ctr-note { border-top: 1px solid var(--line); padding-top: 8px; }
@media (max-width: 860px) { .ctr-grid { grid-template-columns: 1fr; } .ctr-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* archivio documenti */
.docs-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 16px; align-items: start; }
.doc-cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; }
.doc-cats a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; background: #fff; border-radius: 999px; font-size: 12.5px; color: var(--text); white-space: nowrap; cursor: pointer; box-shadow: var(--shadow); text-transform: capitalize; }
.doc-cats a b { font-size: 12.5px; } .doc-cats a span { color: var(--muted); } .doc-cats a.on { background: var(--text); color: #fff; } .doc-cats a.on span { color: #fff; }
.doc-table .dcat-sel { padding: 5px 8px; font-size: 12.5px; border-radius: 9px; max-width: 160px; }
.docs-wait { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.docs-wait header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.dw { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #fff8ec; border-radius: 10px; }
.dw > div { flex: 1; min-width: 0; } .dw b { display: block; font-size: 13px; } .dw small { color: var(--muted); font-size: 11.5px; }
@media (max-width: 1100px) { .docs-layout { grid-template-columns: 1fr; } }

/* utenti, team, permessi, SSO */
.u-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.u-kpis .card { padding: 14px 16px; display: flex; flex-direction: column; } .u-kpis b { font-size: 22px; } .u-kpis span { color: var(--muted); font-size: 12.5px; }
.role-chip { display: inline-block; font-size: 12px; padding: 3px 10px; border-radius: 999px; background: #eef2ff; color: #2b3a8f; white-space: nowrap; }
.role-chip.r-admin { background: #111; color: #fff; } .role-chip.r-tecnico { background: #e8f6ee; color: #1f7a45; } .role-chip.r-commerciale { background: #fff3e0; color: #a35b00; } .role-chip.r-amministrazione { background: #f3ecff; color: #6b3fc4; }
.perm-mini { display: flex; flex-wrap: wrap; gap: 6px; background: #f8f9fd; border-radius: 12px; padding: 10px; }
.perm-mini .nt-l { width: 100%; } .pmi { font-size: 11.5px; padding: 3px 8px; border-radius: 8px; background: #fff; color: var(--muted); } .pmi.w { color: #1f7a45; } .pmi.r { color: #2b3a8f; }
.tdot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.perm-table th.pc, .perm-table td.pc { text-align: center; min-width: 130px; } .perm-table th.pc b { display: block; font-size: 12.5px; color: var(--text); } .perm-table th.pc small { font-weight: 400; font-size: 11px; color: var(--muted); text-transform: none; letter-spacing: 0; }
.perm-table th.pc a { cursor: pointer; color: var(--bad, #e5484d); }
.lvseg { display: inline-flex; background: #f1f3f8; border-radius: 10px; padding: 2px; gap: 2px; } .lvseg button { border: 0; background: none; width: 34px; height: 28px; border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--muted); }
.lvseg button.on { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); color: var(--text); } .lvseg button.on.write { color: #1f7a45; } .lvseg button.on.read { color: #1b43fe; }
.lvseg.lock { opacity: .5; } .lvseg button:disabled { cursor: not-allowed; }
.plv { display: inline-grid; place-items: center; width: 34px; height: 28px; border-radius: 8px; background: #111; color: #fff; font-size: 13px; }
.lv-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.team-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; cursor: pointer; border-top: 4px solid var(--tc); transition: transform .15s; } .team-card:hover { transform: translateY(-2px); }
.team-card .row { display: flex; gap: 12px; align-items: center; }
.tlogo { width: 40px; height: 40px; border-radius: 12px; background: var(--tc); color: #fff; display: grid; place-items: center; font-weight: 700; text-transform: uppercase; flex: none; }
.tstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; } .tstats > div { background: #f8f9fd; border-radius: 10px; padding: 8px; text-align: center; } .tstats b { display: block; font-size: 15px; } .tstats small { color: var(--muted); font-size: 11px; }
.tmem { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; } .tmem .small { margin-left: 6px; }
.tfeat { display: flex; flex-wrap: wrap; gap: 6px; } .tfeat span { font-size: 11.5px; padding: 3px 8px; border-radius: 8px; background: #f4f5f8; color: #a0a6b4; } .tfeat span.on { background: #e8f6ee; color: #1f7a45; }
.feat-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.feat-pick label.chk, .sso-card label.chk { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 12px; background: #f8f9fd; cursor: pointer; text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--text); }
.feat-pick label.chk b, .sso-card label.chk b { display: block; font-size: 13px; } .feat-pick label.chk small, .sso-card label.chk small { color: var(--muted); font-size: 11.5px; font-weight: 400; }
.feat-pick input, .sso-card label.chk input { margin-top: 2px; accent-color: var(--accent); width: 16px; height: 16px; }
.sso-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 14px; margin-bottom: 14px; }
.sso-card { padding: 18px; display: flex; flex-direction: column; gap: 12px; } .sso-card > .row { display: flex; align-items: center; gap: 12px; }
.sso-ico { width: 34px; height: 34px; border-radius: 10px; display: inline-grid; place-items: center; flex: none; vertical-align: middle; }
.sso-ico.ms { grid-template-columns: 9px 9px; grid-template-rows: 9px 9px; gap: 2px; place-content: center; background: #fff; border: 1px solid var(--line); }
.sso-ico.ms i:nth-child(1) { background: #f25022; } .sso-ico.ms i:nth-child(2) { background: #7fba00; } .sso-ico.ms i:nth-child(3) { background: #00a4ef; } .sso-ico.ms i:nth-child(4) { background: #ffb900; }
.sso-ico.gg { background: #fff; border: 1px solid var(--line); font-weight: 700; color: #4285f4; font-size: 16px; }
td .sso-ico { width: 22px; height: 22px; border-radius: 6px; } td .sso-ico.ms { grid-template-columns: 6px 6px; grid-template-rows: 6px 6px; gap: 1px; } td .sso-ico.gg { font-size: 12px; }
.copy-row { display: flex; gap: 8px; } .copy-row input { flex: 1; font-family: ui-monospace, monospace; font-size: 12px; background: #f8f9fd; }
.sso-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .sso-actions label.chk { flex: 1; min-width: 220px; }
.sso-help { padding: 16px 18px; } .sso-help ol { padding-left: 18px; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.sso-btns { display: flex; flex-direction: column; gap: 8px; } .sso-btns .or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 4px 0; }
.sso-btns .or::before, .sso-btns .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sso-btn { display: flex; align-items: center; justify-content: center; gap: 10px; background: #fff; } .sso-btn .sso-ico { width: 22px; height: 22px; border-radius: 6px; } .sso-btn .sso-ico.ms { grid-template-columns: 6px 6px; grid-template-rows: 6px 6px; gap: 1px; } .sso-btn .sso-ico.gg { font-size: 12px; border: 0; }
.nav a.muted-link { color: var(--muted); font-size: 12.5px; }
@media (max-width: 760px) { .u-kpis { grid-template-columns: 1fr 1fr; } .sso-grid { grid-template-columns: 1fr; } }
.sso-ico.ms i { display: block; width: 100%; height: 100%; }

/* fornitori per marchio e prodotto */
.bsup { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .bsup .chip { font-size: 11.5px; }
.src-rec { display: flex; gap: 12px; align-items: center; background: linear-gradient(135deg, #eef7f1, #f4fbf6); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.src-rec b { display: block; } .src-rec small { color: var(--muted); } .src-i { width: 34px; height: 34px; border-radius: 10px; background: #2f9e5b; color: #fff; display: grid; place-items: center; flex: none; }
.src-add { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) 100px 80px auto; gap: 8px; margin-top: 10px; }
@media (max-width: 760px) { .src-add { grid-template-columns: 1fr 1fr; } }

/* scheda cliente */
.cu-hero { display: flex; gap: 24px; align-items: center; padding: 22px 24px; margin-bottom: 16px; background: linear-gradient(120deg, #fff 0%, #fff 55%, #eef1ff 100%); position: relative; overflow: hidden; }
.cu-id { display: flex; gap: 16px; align-items: center; flex: 1; min-width: 0; }
.avatar.lg { width: 64px; height: 64px; border-radius: 20px; font-size: 22px; flex: none; }
.cu-id h2 { margin: 4px 0 6px; font-size: 26px; letter-spacing: -.02em; }
.cu-tags { display: flex; flex-wrap: wrap; gap: 6px; } .cu-tags span { font-size: 11.5px; padding: 3px 9px; border-radius: 999px; background: #f1f3f8; color: var(--muted); } .cu-tags .ok { color: #1f7a45; background: #e8f6ee; }
.tier { text-transform: uppercase; font-weight: 600; letter-spacing: .04em; } .tier.t-gold { background: #fff4d6 !important; color: #9a6a00 !important; } .tier.t-silver { background: #eef1f6 !important; color: #4b5563 !important; } .tier.t-bronze { background: #fbeee4 !important; color: #9a4f1d !important; }
.cu-contact { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); } .cu-contact a { color: var(--text); }
.cu-health { display: flex; gap: 16px; align-items: center; z-index: 1; } .cu-health .center b { display: block; font-size: 26px; line-height: 1; } .cu-health .center small { color: var(--muted); font-size: 11px; }
.cu-health > div:last-child { max-width: 260px; } .cu-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.cu-prio { display: flex; gap: 6px; } .cu-prio span { display: flex; flex-direction: column; align-items: center; font-size: 11px; color: var(--muted); padding: 6px 10px; border-radius: 12px; background: #f8f9fd; }
.cu-prio b { font-size: 16px; color: var(--text); } .cu-prio .p-P1:not(.zero) { background: #fde8e8; } .cu-prio .p-P2:not(.zero) { background: #fff1e4; } .cu-prio .zero b { color: #c3c8d4; }
.cu-mid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 16px; }
.cu-small { min-height: 230px; gap: 10px; } .cu-small .big { font-size: 30px; }
.cu-num { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; } .cu-num b { font-size: 30px; font-weight: 600; letter-spacing: -.03em; } .cu-num b small { font-size: 16px; color: var(--muted); } .cu-num span { color: var(--muted); font-size: 12.5px; }
.cu-list { display: flex; flex-direction: column; gap: 6px; } .cu-list > div { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; padding: 7px 10px; background: #f8f9fd; border-radius: 10px; }
.cu-list span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cu-list b { white-space: nowrap; } .cu-list b.warn { color: #c25e00; }
.cu-types { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; }
.cu-split { display: flex; height: 10px; border-radius: 6px; overflow: hidden; background: #f1f3f8; margin: 14px 0 8px; } .cu-split span { background: #2f9e5b; } .cu-split i { background: #f5a524; }
.cu-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); } .cu-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; } .cu-legend .g { background: #2f9e5b; } .cu-legend .o { background: #f5a524; } .cu-legend b { color: var(--text); }
.cu-low { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.cu-work { display: flex; flex-direction: column; gap: 8px; }
.cu-pj { display: grid; grid-template-columns: minmax(0, 1fr) 110px auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: #f8f9fd; cursor: pointer; color: var(--text); }
.cu-pj:hover { background: #eef2ff; } .cu-pj b { display: block; font-size: 13px; } .cu-pj small { color: var(--muted); font-size: 11.5px; }
.cu-tk { display: flex; flex-direction: column; gap: 4px; } .cu-tk a { display: flex; gap: 10px; align-items: center; padding: 8px 6px; border-radius: 10px; cursor: pointer; color: var(--text); } .cu-tk a:hover { background: #f4f6fc; }
.cu-tk a > div { flex: 1; min-width: 0; } .cu-tk b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cu-tk small { color: var(--muted); font-size: 11.5px; }
.pdot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: #c3c8d4; } .pdot.p-P1 { background: #e5484d; } .pdot.p-P2 { background: #f2711c; } .pdot.p-P3 { background: #3d63dd; }
.cu-teams { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); } .cu-teams span { font-size: 11.5px; background: #f1f3f8; padding: 3px 9px; border-radius: 999px; }
.cu-tl { display: flex; flex-direction: column; gap: 0; } .cu-tl > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 6px 0; font-size: 13px; border-left: 2px solid var(--line); margin-left: 5px; padding-left: 10px; position: relative; }
.cu-tl i { position: absolute; left: -6px; top: 11px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); } .cu-tl small { color: var(--muted); white-space: nowrap; }
@media (max-width: 860px) { .cu-hero { flex-direction: column; align-items: flex-start; } .cu-id h2 { font-size: 21px; } .avatar.lg { width: 52px; height: 52px; } .cu-pj { grid-template-columns: 1fr; } }
.cu-small .mbar { height: 8px; flex: none; }
.cu-teams b { display: inline; font-size: 11.5px; }

/* Asset per macro tipologia */
.ag-list { display: flex; flex-direction: column; gap: 14px; }
.ag { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.ag summary { display: flex; align-items: center; gap: 12px; padding: 14px 18px; cursor: pointer; list-style: none; }
.ag summary::-webkit-details-marker { display: none; }
.ag[open] summary { border-bottom: 1px solid var(--line); }
.ag-t { display: flex; flex-direction: column; min-width: 0; }
.ag-t b { font-size: 15px; }
.ag-t small { color: var(--muted); font-size: 12px; }
.ag-t small::first-letter { text-transform: uppercase; }
.ag-body table.list { table-layout: fixed; min-width: 900px; }
.ag-body table.list td { overflow-wrap: anywhere; }
.ag-n { min-width: 28px; height: 28px; border-radius: 14px; background: var(--line-2); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; padding: 0 8px; }
.ag-chev { color: var(--muted); transition: transform .15s; font-size: 18px; }
.ag[open] .ag-chev { transform: rotate(90deg); }
.ag-body { overflow: auto; }
.ag-body table.list th { position: static; }
.ag-ico { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 17px; flex: none; color: #fff; background: #8a93a3; }
.ag-ico.sm { width: 20px; height: 20px; border-radius: 6px; font-size: 11px; }
.ag-ico.cassa { background: linear-gradient(135deg, #f59e0b, #ea580c); }
.ag-ico.rete { background: linear-gradient(135deg, #3b82f6, #6366f1); }
.ag-ico.display { background: linear-gradient(135deg, #a855f7, #ec4899); }
.ag-ico.postazioni { background: linear-gradient(135deg, #10b981, #0d9488); }
.ag-ico.server { background: linear-gradient(135deg, #475569, #1e293b); }
.ag-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ag-chips button { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--panel); border-radius: 20px; padding: 6px 13px; font: inherit; font-size: 13px; cursor: pointer; color: var(--text); }
.ag-chips button b { color: var(--muted); font-weight: 600; }
.ag-chips button.on { background: var(--text); color: var(--panel); border-color: var(--text); }
.ag-chips button.on b { color: inherit; opacity: .7; }
.cu-grp { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
@media (max-width: 760px) { .ag summary .badge { display: none; } }

/* Livelli SLA: bronze, silver, gold, platinum, diamond */
.tier { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 10px; font-size: 11px; white-space: nowrap; }
.tier.t-bronze { background: linear-gradient(135deg, #fbeee4, #f5dcc8) !important; color: #8a4517 !important; }
.tier.t-silver { background: linear-gradient(135deg, #f3f5f8, #e2e6ec) !important; color: #4b5563 !important; }
.tier.t-gold { background: linear-gradient(135deg, #fff6d9, #ffe79a) !important; color: #8a5e00 !important; }
.tier.t-platinum { background: linear-gradient(135deg, #e8eef5, #c9d6e6) !important; color: #2f4a68 !important; }
.tier.t-diamond { background: linear-gradient(135deg, #67e8f9, #818cf8 55%, #c084fc) !important; color: #fff !important; box-shadow: 0 2px 8px rgba(129, 140, 248, .35); }

/* Gruppi di clienti */
.cseg { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12.5px; color: var(--text); }
.cseg i { width: 9px; height: 9px; border-radius: 50%; background: var(--sc); flex: none; }
.cu-tags .cseg { background: color-mix(in srgb, var(--sc) 12%, #fff); color: color-mix(in srgb, var(--sc) 70%, #000); }
.cl-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.cl-k { padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.cl-k small { color: var(--muted); font-size: 12px; }
.cl-k b { font-size: 26px; letter-spacing: -.02em; }
.cl-k span { color: var(--muted); font-size: 12px; }
.cl-segs { display: flex; gap: 10px; overflow-x: auto; margin-bottom: 14px; padding-bottom: 2px; }
.cl-segs button { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--panel); border-radius: 14px; padding: 10px 14px; cursor: pointer; font: inherit; color: var(--text); white-space: nowrap; }
.cl-segs button i { width: 10px; height: 10px; border-radius: 50%; background: var(--sc); }
.cl-segs button b { font-size: 16px; }
.cl-segs button span { color: var(--muted); font-size: 13px; }
.cl-segs button.on { border-color: var(--sc, var(--text)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--sc, #111) 25%, transparent); background: color-mix(in srgb, var(--sc, #888) 7%, var(--panel)); }
.cl-segs button.on span { color: var(--text); }
.cl-id { display: flex; align-items: center; gap: 12px; }
.cl-open { display: inline-flex; min-width: 24px; height: 24px; padding: 0 7px; align-items: center; justify-content: center; border-radius: 12px; background: #fdecec; color: var(--bad); font-weight: 700; }
.sg-list { display: flex; flex-direction: column; gap: 10px; }
.sg-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.sg-row > i { width: 12px; height: 12px; border-radius: 50%; background: var(--sc); margin-top: 5px; flex: none; }
.sg-types { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sg-types span { background: var(--line-2); border-radius: 8px; padding: 3px 9px; font-size: 12px; }
.sg-types b { color: var(--muted); }
@media (max-width: 900px) { .cl-kpis { grid-template-columns: repeat(2, 1fr); } }

/* Service Desk a tre colonne: stessa scheda del ticket aperto (conversazione e dettagli uniti), colonne laterali più strette */
@media (min-width: 1281px) {
  .ws:not(.has-sel) { grid-template-columns: 290px minmax(0, 1fr) 330px; column-gap: 0; }
  .ws:not(.has-sel) .list { margin-right: 14px; }
  .ws:not(.has-sel) .conv { border-top-right-radius: 0; border-bottom-right-radius: 0; border-right: 0; box-shadow: var(--shadow); }
  .ws:not(.has-sel) .details { border-top-left-radius: 0; border-bottom-left-radius: 0; border-left: 1px solid var(--line); box-shadow: var(--shadow); background: #fbfcfe; }
  .ws:not(.has-sel) .details .side-sec { padding: 16px 18px; }
  .ws:not(.has-sel) .details .side-sec + .side-sec { border-top: 1px solid var(--line-2); border-bottom: 0; }
  .ws:not(.has-sel) #showDetails { display: none; }
  .ws:not(.has-sel) .conv-head h2 { flex: 1 1 calc(100% - 50px); }
  .ws:not(.has-sel) .conv-steps .psteps .bar { min-width: 8px; margin: 0 5px; }
  .ws:not(.has-sel) .conv-steps .psteps .ps { gap: 6px; }
  .ws:not(.has-sel) .conv-steps .psteps .dot { width: 22px; height: 22px; font-size: 11px; }
  .ws:not(.has-sel) .conv-steps .psteps .lb { font-size: 12px; }
  .ws:not(.has-sel) .conv-head #triage { margin-left: auto; }
}

/* Integrazioni */
.int-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.int-card { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.int-h { display: flex; align-items: center; gap: 12px; } .int-h b { font-size: 15px; }
.int-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-size: 19px; flex: none; }
.int-card p { margin: 0; }
.int-miss { background: #fff6e8; color: #a05a00; border-radius: 10px; padding: 8px 10px; }
.int-ev { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--line-2); padding-top: 10px; margin-top: auto; }
.int-ev > div { display: flex; gap: 8px; justify-content: space-between; font-size: 12.5px; } .int-ev > div span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.int-ev > div small { color: var(--muted); white-space: nowrap; } .int-ev > div.bad span { color: var(--bad); }
.int-step { background: #f7f8fc; border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; font-size: 13.5px; }
.int-code { display: flex; gap: 8px; align-items: center; margin-top: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px 6px 6px 10px; }
.int-code code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font-size: 12px; }
.int-on { display: flex; gap: 8px; align-items: center; font-weight: 600; margin-bottom: 12px; }
.int-legal { margin-top: 14px; background: #f1f5ff; border-radius: 10px; padding: 10px 12px; color: #33415c; }
.m365 { padding: 18px 20px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 12px; background: linear-gradient(135deg, #eef3ff, #fff 55%); }
.m365-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } .m365-h b { font-size: 15px; }
.m365-ico { background: #fff; border: 1px solid var(--line); }
.m365-how { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; color: #33415c; }
.m365-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 18px; }
.m365-grid > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; } .m365-grid .mono { overflow-wrap: anywhere; }
.m365 .bad { color: var(--bad); }
.m365-grid .badge { white-space: normal; display: inline-block; margin: 0 4px 4px 0; max-width: 100%; }
.m365-steps summary { cursor: pointer; color: var(--muted); } .m365-steps > div { padding: 2px 0 2px 4px; }
.m365-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.m365-next { display: flex; gap: 12px; align-items: center; border-top: 1px solid var(--line-2); padding-top: 12px; }
.m365-feats { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; } .m365-feats small { display: block; color: var(--muted); }
.m365-script { max-height: 220px; overflow: auto; background: #0f172a; color: #e2e8f0; padding: 10px 12px; border-radius: 10px; font-size: 11.5px; white-space: pre; margin: 8px 0; }
/* Chiamate */
.call-hero { display: flex; align-items: center; gap: 18px; padding: 22px 24px; margin-bottom: 16px; background: linear-gradient(135deg, #eef3ff, #fff 60%); flex-wrap: wrap; }
.call-hero.unknown { background: linear-gradient(135deg, #fff4e6, #fff 60%); }
.call-hero h2 { margin: 2px 0 6px; font-size: 24px; }
.call-ring { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: #1b43fe; color: #fff; font-size: 26px; box-shadow: 0 0 0 8px rgba(27,67,254,.12), 0 0 0 16px rgba(27,67,254,.06); flex: none; }
.unknown .call-ring { background: #f2711c; box-shadow: 0 0 0 8px rgba(242,113,28,.12), 0 0 0 16px rgba(242,113,28,.06); }
.call-sub { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: var(--muted); font-size: 13.5px; }
.call-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.call-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.call-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); color: inherit; cursor: pointer; }
.call-row:last-child { border-bottom: 0; }

/* ---------------------------------------------------------------- ore, pacchetti e bollettini */
.svc-h { font-size: 14px; margin: 20px 0 10px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.pk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-bottom: 8px; }
.pk-card { padding: 16px; cursor: pointer; display: flex; flex-direction: column; gap: 8px; transition: transform .12s, box-shadow .12s; }
.pk-card:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(17,19,24,.08); }
.pk-num b { font-size: 26px; letter-spacing: -.02em; } .pk-num span { color: var(--muted); font-size: 13px; margin-left: 6px; }
.pk-bar { position: relative; height: 8px; border-radius: 6px; background: var(--line-2); overflow: visible; }
.pk-bar span { position: absolute; inset: 0 auto 0 0; border-radius: 6px; background: linear-gradient(90deg, #2f9e5b, #6fcf97); }
.pk-bar i { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--faint); border-radius: 2px; }
.st-in_esaurimento .pk-bar span, .pk-bar.st-in_esaurimento span { background: linear-gradient(90deg, #f2711c, #fbbf24); }
.st-esaurito .pk-bar span, .pk-bar.st-esaurito span { background: linear-gradient(90deg, #e5484d, #f87171); }
.st-scaduto, .st-annullato { opacity: .7; } .st-scaduto .pk-bar span, .st-annullato .pk-bar span { background: var(--faint); }
.pk-bar.sm { height: 6px; margin: 6px 0 4px; }
.pk-f { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); } .pk-f a { cursor: pointer; color: var(--accent); }
.svc-al { margin-bottom: 14px; } .svc-al .body { display: flex; flex-direction: column; gap: 4px; }
.svc-al-r { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; color: inherit; font-size: 13px; }
.svc-al-r:hover { background: var(--soft); } .svc-al-r .i { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: #fff4e5; color: #b45309; flex: none; }
.svc-al-r.k-extra .i { background: #e8edff; color: var(--accent); } .svc-al-r.k-scadenza .i { background: #fdecec; color: #c0392b; }
.t-pk { padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.rep-kind { flex-wrap: wrap; } .rep-kind button { flex: 1 1 120px; }
.mat-row { display: grid; grid-template-columns: 1fr 80px 70px auto; gap: 6px; margin-bottom: 6px; }
.rep-head { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 14px; background: var(--soft); border-radius: 12px; }
.rep-view h4 { margin: 16px 0 6px; font-size: 13px; color: var(--muted); }
.rep-work { line-height: 1.55; white-space: normal; }
.rep-out { display: flex; gap: 10px; align-items: center; margin-top: 14px; }
.rep-sig { display: flex; gap: 16px; align-items: center; margin-top: 16px; padding: 12px; border: 1px dashed var(--line); border-radius: 12px; }
.rep-sig img { width: 200px; max-width: 45%; background: #fff; border-bottom: 1px solid var(--faint); }
.sig-sum { padding: 12px; background: var(--soft); border-radius: 12px; margin-bottom: 12px; } .sig-sum .rep-work { margin-top: 6px; color: var(--muted); }
.sig-pad { position: relative; height: 200px; border: 1px solid var(--line); border-radius: 14px; background: #fff; margin: 10px 0; touch-action: none; }
.sig-pad canvas { width: 100%; height: 100%; display: block; cursor: crosshair; touch-action: none; }
.sig-pad .sig-line { position: absolute; left: 24px; right: 24px; bottom: 44px; border-top: 1px solid var(--faint); font-size: 11px; color: var(--faint); padding-top: 4px; pointer-events: none; }
.sig-pad .btn { position: absolute; top: 8px; right: 8px; }
.pr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin-bottom: 14px; }
.pr-plan { display: grid; grid-template-columns: 1fr 110px 110px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.pr-plan label, .pr-kv label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.pr-kv { display: flex; flex-direction: column; gap: 8px; } .pr-grid input { width: 84px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; text-align: right; }
.q-prof { margin-bottom: 12px; }
.q-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.q-plan { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 6px; background: linear-gradient(180deg, #fff, var(--soft)); }
.q-plan:nth-child(2) { border-color: var(--accent); box-shadow: 0 6px 20px rgba(27,67,254,.12); }
.q-price { font-size: 26px; font-weight: 700; letter-spacing: -.02em; } .q-price small { font-size: 13px; color: var(--muted); font-weight: 400; }
.q-plan ul { list-style: none; padding: 0; margin: 6px 0; } .q-plan li { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; }
.q-hours { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-top: 14px; }
.q-h { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.q-h span { font-size: 18px; font-weight: 700; } .q-h small { color: var(--muted); }
.q-sla { margin-top: 14px; } .sla-t td, .sla-t th { padding: 6px 10px; }
@media (max-width: 720px) { .rep-head { grid-template-columns: 1fr 1fr; } .pr-plan { grid-template-columns: 1fr 1fr; } }
.pr-grid > .card:first-child { grid-column: 1 / -1; } .pr-plan { grid-template-columns: 1fr 150px 150px; }

/* ---------------------------------------------------------------- assistenti AI */
.ai-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin: 14px 0; }
.ai-card { padding: 16px; display: flex; flex-direction: column; gap: 10px; } .ai-card.on { border-color: var(--accent); box-shadow: 0 6px 20px rgba(27,67,254,.1); }
.ai-card ol { margin: 0; padding-left: 18px; color: var(--muted); line-height: 1.55; } .ai-card .form { margin: 0; }
.ai-act { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: auto; }
.ai-url .body { display: flex; gap: 12px; align-items: center; } .ai-url code { font-size: 15px; word-break: break-all; }
.ai-warn { margin-bottom: 14px; background: #fff7ed; border-color: #fed7aa; } .ai-warn .body { font-size: 13px; color: #9a3412; }
.pr-kv input { width: 90px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; text-align: right; }

/* accesso rapido clienti (impostazioni) */
.ql-kpi { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.ql-kpi .card { padding: 14px 16px; display: flex; flex-direction: column; } .ql-kpi b { font-size: 24px; } .ql-kpi span { font-size: 12.5px; color: var(--muted); }
.ql-card { padding: 18px; margin-bottom: 14px; } .ql-card h3 { margin: 0 0 12px; }
.ql-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.ql-m { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; background: #f8f9fd; cursor: pointer; }
.ql-m input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.ql-i { width: 30px; height: 30px; border-radius: 9px; background: #fff; display: grid; place-items: center; flex: none; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.ql-t { display: flex; flex-direction: column; gap: 4px; min-width: 0; } .ql-t small { color: var(--muted); font-size: 11.5px; } .ql-t em { font-style: normal; align-self: flex-start; }
.ql-sel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.ql-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin-bottom: 14px; }
.ql-prov { padding: 18px; display: flex; flex-direction: column; gap: 10px; } .ql-prov > .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
@media (max-width: 700px) { .ql-kpi, .ql-sel { grid-template-columns: 1fr; } }

/* QR personale di accesso al portale */
.qrk { display: flex; flex-direction: column; gap: 12px; } .qrk p { margin: 0; }
.qrk-act { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-size: 13px; flex-wrap: wrap; }
.qrk-wrap { display: grid; place-items: center; padding: 8px 0 12px; }
.qrk-card { width: 320px; border: 1px solid var(--line); border-radius: 20px; padding: 20px; background: #fff; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 10px 30px rgba(20,30,60,.08); }
.qrk-top { display: flex; align-items: center; gap: 10px; } .qrk-top b { display: block; } .qrk-top small { color: var(--muted); font-size: 12px; }
.qrk-qr { border-radius: 14px; background: #fff; border: 1px solid var(--line-2, #eef0f5); padding: 4px; line-height: 0; } .qrk-qr svg { width: 100%; height: auto; }
.qrk-who { text-align: center; display: flex; flex-direction: column; } .qrk-who b { font-size: 17px; } .qrk-who span { color: var(--muted); font-size: 13px; }
.qrk-card ol { margin: 0; padding-left: 18px; font-size: 12.5px; display: flex; flex-direction: column; gap: 3px; }
.qrk-foot { font-size: 11px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 8px; }
@media print { .qrk-card { box-shadow: none; } }
.qrk-top .logo { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, #1b43fe, #6a5cff); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.qrk .card.qrk-act { display: flex; flex-direction: row; } .qrk-act > span:nth-child(2) { flex: 1; min-width: 200px; }

/* nuovo articolo nello stile del nuovo ticket */
.pf-nt .nt-main { gap: 6px; }
.pf-code { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 4px; }
.pf-code[hidden] { display: none; }
.pf-code label, .pf-px label, .pf-min { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--muted); font-weight: 500; }
.pf-code input, .pf-code select, .pf-px input, .pf-min input { border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; font: inherit; font-size: 14px; color: var(--text); background: #fff; }
.pf-px { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pf-px input { font-variant-numeric: tabular-nums; }
.pf-stock { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.pf-sw { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; flex: 1 1 200px; }
.pf-sw:has(input:checked) { border-color: var(--accent, #1b43fe); background: #f2f5ff; }
.pf-sw input { margin-top: 3px; accent-color: var(--accent, #1b43fe); width: 16px; height: 16px; }
.pf-sw b { display: block; font-size: 13px; } .pf-sw small { color: var(--muted); font-size: 11.5px; }
.pf-min { width: 130px; }
.pf-stock .badge { align-self: center; }
.nt-c.pf-cat.sub { margin-left: 22px; padding: 6px 10px; } .nt-c.pf-cat.sub b { font-size: 12.5px; }
.pf-more { margin-top: 12px; border-top: 1px solid var(--line-2); padding-top: 10px; }
.pf-more summary { cursor: pointer; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pf-more .form { margin-top: 10px; }
@media (max-width: 760px) {
  .nt { grid-template-columns: 1fr; } .nt-side { max-height: none; border-right: 0; border-bottom: 1px solid var(--line-2); border-radius: 0; }
  .nt-main { max-height: none; } .pf-px { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pf-code { grid-template-columns: 1fr; }
}
.nt-clist > * { min-width: 0; }
.pf-br { display: inline-flex; align-items: center; gap: 7px; border: 1.5px solid var(--line); background: #fff; border-radius: 20px; padding: 6px 12px 6px 9px; font: inherit; font-size: 12.5px; cursor: pointer; }
.pf-br i { width: 10px; height: 10px; border-radius: 50%; } .pf-br.on { border-color: var(--accent, #1b43fe); background: #f2f5ff; font-weight: 600; }

/* menu brand con logo e ricerca */
.bp { position: relative; max-width: 420px; }
.bp-btn { width: 100%; display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line); background: #fff; border-radius: 14px; padding: 7px 12px 7px 8px; font: inherit; cursor: pointer; text-align: left; }
.bp-btn.open, .bp-btn:focus-visible { border-color: var(--accent, #1b43fe); box-shadow: 0 0 0 3px rgba(27,67,254,.12); outline: 0; }
.bp-btn small { color: var(--muted); font-size: 11.5px; } .bp-name { flex: 1; font-weight: 600; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-chev { color: var(--muted); font-size: 12px; }
.bl { width: 30px; height: 30px; border-radius: 9px; display: inline-grid; place-items: center; flex: none; color: #fff; font-size: 11px; font-weight: 700; object-fit: contain; background: #fff; }
img.bl { border: 1px solid var(--line-2, #eef0f5); padding: 2px; }
.bp-pop { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 40px rgba(20,30,60,.16); padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.bp-q { border: 1px solid var(--line); border-radius: 11px; padding: 9px 12px; font: inherit; }
.bp-list { max-height: 260px; overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.bp-it { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 11px; cursor: pointer; }
.bp-it:hover { background: #f4f6fb; } .bp-it.on { background: #f2f5ff; }
.bp-it > span:not(.bl):not(.avatar):not(.badge) { flex: 1; min-width: 0; } .bp-it b { display: block; font-size: 13.5px; } .bp-it small { color: var(--muted); font-size: 11.5px; }
.bp-it i { color: var(--accent, #1b43fe); font-style: normal; font-weight: 700; } .bp-none { color: var(--muted); font-size: 13px; padding-left: 12px; }
.bp-empty { padding: 6px 10px; }
.bp-create { border: 1.5px dashed var(--accent, #1b43fe); color: var(--accent, #1b43fe); background: #f6f8ff; border-radius: 11px; padding: 9px; font: inherit; font-weight: 600; cursor: pointer; }
.bp-new { border: 1.5px dashed var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.bp-new-h { display: flex; align-items: center; gap: 10px; }
.bp-file { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--accent, #1b43fe); cursor: pointer; } .bp-file input { display: none; }

/* menu a due livelli: barra di sezioni + pannello */
.app { grid-template-columns: auto 1fr; }
.nav { display: grid; grid-template-columns: 72px 232px; padding: 0; overflow: hidden; transition: grid-template-columns .18s; }
.nav.collapsed { grid-template-columns: 72px 0; }
.rail { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 0 14px; border-right: 1px solid var(--line); background: #f3f4f7; overflow-y: auto; }
.rail .rl-logo { padding: 0 0 12px; }
.rl-b { position: relative; width: 60px; border: 0; background: none; border-radius: 14px; padding: 8px 0 6px; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; color: #5b6170; font: inherit; font-size: 10.5px; font-weight: 600; }
.rl-b svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.rl-b:hover { background: #e9ebf0; color: var(--text); }
.rl-b.on { background: #fff; color: var(--accent); box-shadow: 0 1px 3px rgba(17,19,24,.08); }
.rl-n { position: absolute; top: 3px; right: 6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--dark); color: #fff; font-style: normal; font-size: 10px; line-height: 17px; text-align: center; box-shadow: 0 0 0 2px #f3f4f7; }
.rl-n:empty { display: none; } .rl-n.red { background: var(--p1); } .rl-n.warn { background: #f5a524; }
.rl-me { border: 0; background: none; padding: 6px 0 0; cursor: pointer; }
.npanel { min-width: 0; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; padding: 0 12px; width: 232px; box-sizing: border-box; }
.np-head { display: flex; align-items: center; justify-content: space-between; }
.np-head .brand { padding: 22px 8px 6px; }
.np-close { border: 0; background: none; color: var(--muted); font-size: 17px; cursor: pointer; border-radius: 8px; width: 28px; height: 28px; margin-top: 16px; }
.np-close:hover { background: #eceef2; color: var(--text); }
.ng h6:first-child { margin-top: 12px; }
@media (max-width: 760px) {
  .nav, .nav.collapsed { width: auto; grid-template-columns: 72px 232px; }
}

/* pulsante «Nuovo» con menu e azioni rapide */
.nw { position: relative; }
.nw-car { font-size: 11px; opacity: .7; margin-left: 4px; }
.nw-pop { position: absolute; z-index: 70; top: calc(100% + 8px); right: 0; width: 380px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 20px 50px rgba(20,30,60,.18); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.nw-h, .nw-g { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint, #9aa3b2); font-weight: 600; padding: 0 4px; }
.nw-g { margin-top: 6px; }
.nw-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.nw-quick button { border: 1px solid var(--line); background: #f7f8fb; border-radius: 14px; padding: 9px 4px 8px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text); }
.nw-quick button:hover { border-color: var(--accent); background: #f2f5ff; color: var(--accent); }
.nw-i { width: 30px; height: 30px; border-radius: 10px; display: inline-grid; place-items: center; background: #eef1ff; color: var(--accent); font-size: 14px; flex: none; }
.nw-q { border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; font: inherit; font-size: 14px; }
.nw-q:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(27,67,254,.12); }
.nw-list { max-height: 340px; overflow: auto; display: flex; flex-direction: column; gap: 1px; }
.nw-list button { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 7px 6px; border-radius: 11px; font: inherit; text-align: left; cursor: pointer; color: var(--text); }
.nw-list button:hover, .nw-list button.on { background: #f4f6fb; }
.nw-list b { display: block; font-size: 13.5px; } .nw-list small { color: var(--muted); font-size: 11.5px; }
.nw-empty { padding: 8px; }
.nw-foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line-2, #eef0f5); padding: 8px 4px 0; }
.nw-foot a { font-size: 12.5px; cursor: pointer; }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; font-size: 11px; background: #fff; }
.nw-pop.sheet { position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: auto; border-radius: 22px 22px 0 0; max-height: 82vh; padding: 16px 14px 24px; }
.nw-pop.sheet .nw-foot { display: none; }
.nw-bg { position: fixed; inset: 0; z-index: 69; background: rgba(15,20,35,.35); }
.qa-sel { display: flex; flex-direction: column; gap: 6px; }
.qa-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 6px 8px; }
.qa-all { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 6px; }
.qa-add { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; text-align: left; border: 1.5px dashed var(--line); background: #fff; border-radius: 12px; padding: 7px 9px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.qa-add .nw-i { grid-row: span 2; } .qa-add small { color: var(--muted); font-weight: 400; font-size: 11px; }
.qa-add:hover:not(:disabled) { border-color: var(--accent); } .qa-add:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 760px) { .nw-pop:not(.sheet) { right: auto; left: 0; width: min(380px, calc(100vw - 32px)); } }

.nav.nopanel { grid-template-columns: 72px 0; }
.nav.nopanel .npanel { visibility: hidden; }
@media (max-width: 760px) { .nav.nopanel { grid-template-columns: 72px 0; } }

/* menu utente dall'avatar in fondo alla barra */

.rl-me .avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 3px transparent; transition: box-shadow .15s; } .rl-me:hover .avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent); }
.me-pop { position: fixed; z-index: 80; left: 80px; bottom: 14px; width: 280px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 50px rgba(20,30,60,.18); padding: 10px; display: flex; flex-direction: column; gap: 8px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.me-pop .usercard { border: 0; padding: 4px; }
.me-pop .usercard .links { display: flex; gap: 12px; margin-top: 4px; } .me-pop .usercard .links a { font-size: 12.5px; color: var(--accent); cursor: pointer; }
.me-pop #status { border-top: 1px solid var(--line-2, #eef0f5); padding: 8px 4px 2px; }

/* foto profilo */
img.avatar { object-fit: cover; padding: 0; background: #eef0f5; }
.avatar.xl { width: 84px; height: 84px; flex-basis: 84px; font-size: 26px; }
.ph-top { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; } .ph-top p { margin: 4px 0 8px; }
.ph-top label.btn { cursor: pointer; display: inline-flex; }
.ph-emo { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin: 8px 0 10px; }
.ph-emo button { font-size: 24px; border: 1.5px solid transparent; background: #f5f6f9; border-radius: 12px; padding: 6px 0; cursor: pointer; }
.ph-emo button.on, .ph-emo button:hover { border-color: var(--accent); background: #fff; }
.ph-bg { display: flex; gap: 8px; margin-bottom: 8px; }
.ph-bg button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.ph-bg button.on { box-shadow: 0 0 0 2px var(--accent); }
@media (max-width: 560px) { .ph-emo { grid-template-columns: repeat(6, 1fr); } }
img.avatar { border-radius: 50% !important; }
.me-pop .usercard .links { flex-wrap: wrap; } .me-pop .usercard .links a { white-space: nowrap; margin: 0; }

/* crea il tuo avatar */
.ph-svg { overflow: hidden; padding: 0; background: none; } .ph-svg svg { width: 100%; height: 100%; display: block; }
.ph-tabs { margin-top: 4px; display: inline-flex; }
.ph-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; } .ph-l { width: 80px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.ph-chips { display: flex; gap: 6px; } .ph-chips button { border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; } .ph-chips button.on { background: var(--text); color: #fff; border-color: var(--text); }
.ph-parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; margin: 10px 0; }
.ph-part { display: flex; align-items: center; gap: 6px; background: #f5f6f9; border-radius: 12px; padding: 5px 6px 5px 12px; font-size: 13px; }
.ph-part span { flex: 1; font-weight: 600; } .ph-part b { font-weight: 500; color: var(--muted); font-size: 12px; min-width: 52px; text-align: center; }
.ph-part button { width: 28px; height: 28px; border-radius: 9px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 16px; line-height: 1; }
.ph-part button:hover { border-color: var(--accent); color: var(--accent); }
.ph-drop { display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center; border: 1.5px dashed var(--line); border-radius: 16px; padding: 28px; cursor: pointer; text-align: center; }
.ph-drop:hover { border-color: var(--accent); }
.ph-tabs button { white-space: nowrap; }

/* ---------- Agenda */
.avatar.xs { width: 20px; height: 20px; flex-basis: 20px; font-size: 9px; }
.dh-side .ag-today { min-height: 0; padding: 18px 20px; }
.dh-side .ag-today .ag-tl { margin: 12px 0 14px; }
.ag-today .ag-tl { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 12px; }
.ag-today .ag-tl > div { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.ag-today .ag-tl .t.task { font-size: 11px; color: var(--muted); }
.ag-today .ag-tl .t { font-weight: 650; font-variant-numeric: tabular-nums; width: 42px; }
.ag-today .ag-tl i { width: 4px; align-self: stretch; border-radius: 2px; }
.ag-today .ag-tl .x { display: flex; flex-direction: column; min-width: 0; font-weight: 500; font-size: 14px; line-height: 1.35; color: var(--text); }
.ag-today .ag-tl small { color: var(--muted); font-weight: 400; font-size: 12px; }
.ag-tlist { padding: 0; margin-bottom: 6px; overflow: hidden; }
.ag-task { display: flex; gap: 12px; align-items: flex-start; padding: 12px 18px; border-top: 1px solid var(--line-2); }
.ag-task:first-child { border-top: 0; }
.ag-task.risk { background: linear-gradient(90deg, rgba(220,38,38,.07), transparent 55%); box-shadow: inset 3px 0 0 var(--bad); }
.ag-task.done .t { text-decoration: line-through; color: var(--muted); }
.ag-task .body { flex: 1; min-width: 0; }
.ag-task .t { font-weight: 550; }
.ag-task .s { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.ag-task .acts { display: flex; gap: 6px; flex-shrink: 0; }
.ag-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--faint); background: #fff; cursor: pointer; flex: 0 0 22px; margin-top: 1px; display: grid; place-items: center; font-size: 12px; color: #fff; padding: 0; }
.ag-check:hover { border-color: var(--ok); }
.ag-task.done .ag-check { background: var(--ok); border-color: var(--ok); }
.ag-who { display: inline-flex; gap: 5px; align-items: center; }
.ag-fu { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; padding: 8px 10px; background: #fff7ec; border: 1px solid #f8dcb4; border-radius: 12px; font-size: 12.5px; }
.ag-fu > span { margin-right: auto; font-weight: 550; color: #9a5300; }
.ag-fu.prop { background: #f1eafd; border-color: #ddd0f8; } .ag-fu.prop > span { color: var(--ai); }
.ag-log { margin-top: 14px; font-size: 13px; display: grid; gap: 4px; max-height: 180px; overflow: auto; }
.ag-log h4 { margin: 0 0 4px; }
.ag-warn { background: #fff7ec; border: 1px solid #f8dcb4; border-radius: 12px; padding: 10px 12px; font-size: 13px; color: #9a5300; display: grid; gap: 3px; margin-top: 10px; }
.ag-people { display: flex; flex-wrap: wrap; gap: 6px; }
.form .ag-people label.chip-check, .chip-check { display: inline-flex; flex-direction: row; margin: 0; color: var(--text); font-weight: 500; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 18px; padding: 4px 10px 4px 6px; cursor: pointer; font-size: 13px; }
.chip-check:has(input:checked) { background: var(--accent-2); border-color: var(--accent); }
.chip-check input { display: none; }
.ag-calbar { flex-wrap: wrap; }
.ag-caltitle { font-size: 16px; text-transform: capitalize; }
.ag-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; align-items: center; }
.ag-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.ag-week { --cols: 7; }
.ag-wh, .ag-wb { display: grid; grid-template-columns: 52px repeat(var(--cols), minmax(0, 1fr)); }
.ag-wh > div { padding: 10px 8px; font-size: 12.5px; font-weight: 600; text-transform: capitalize; border-bottom: 1px solid var(--line); }
.ag-wh > div.today { color: var(--accent); }
.ag-wb { max-height: calc(100vh - 260px); overflow-y: auto; position: relative; padding-top: 8px; }
.ag-hours > div { font-size: 11px; color: var(--muted); text-align: right; padding-right: 8px; transform: translateY(-6px); }
.ag-col { position: relative; border-left: 1px solid var(--line-2); background-image: repeating-linear-gradient(to bottom, var(--line-2) 0 1px, transparent 1px 44px); cursor: copy; }
.ag-col.today { background-color: #f8faff; }
.ag-ev { position: absolute; left: 3px; right: 3px; border-radius: 8px; background: color-mix(in srgb, var(--c) 14%, #fff); border-left: 3px solid var(--c); padding: 3px 6px; font-size: 11.5px; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; line-height: 1.3; }
.ag-ev b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-ev span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--bad); }
.ag-now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.ag-abs { font-size: 11px; font-weight: 500; color: var(--muted); background: repeating-linear-gradient(135deg, #f1f2f5 0 6px, #e8e9ee 6px 12px); border-radius: 6px; padding: 2px 6px; margin-top: 3px; text-transform: none; }
.ag-chip { font-size: 11.5px; padding: 3px 7px; border-radius: 7px; background: color-mix(in srgb, var(--c) 14%, #fff); border-left: 3px solid var(--c); margin-top: 3px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-chip small { display: block; color: var(--muted); }
.ag-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.ag-month .h { padding: 8px; font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); text-transform: capitalize; }
.ag-month .c { min-height: 104px; padding: 6px; border-top: 1px solid var(--line-2); border-left: 1px solid var(--line-2); min-width: 0; }
.ag-month .c.out { background: var(--soft); color: var(--faint); }
.ag-month .c.today b { background: var(--accent); color: #fff; border-radius: 10px; padding: 0 6px; }
.ag-plan { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 16px; align-items: start; }
.ag-bl .body { display: grid; gap: 10px; max-height: calc(100vh - 230px); overflow-y: auto; }
.ag-hint { background: var(--accent-2); color: #2846a8; border-radius: 12px; padding: 8px 10px; font-size: 12.5px; }
.ag-area { display: grid; gap: 6px; }
.ag-bi { border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 10px; padding: 8px 10px; cursor: grab; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; background: #fff; }
.ag-bi span { color: var(--muted); font-size: 12px; }
.ag-bi:hover { box-shadow: var(--shadow); }
.ag-grid-wrap { overflow-x: auto; }
.ag-grid { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 760px; }
.ag-grid th { font-size: 12px; font-weight: 600; padding: 10px 6px; text-align: left; text-transform: capitalize; border-bottom: 1px solid var(--line); }
.ag-grid th.today { color: var(--accent); }
.ag-grid th.who { width: 190px; overflow: hidden; display: flex; gap: 8px; align-items: center; text-transform: none; border-bottom: 0; }
.ag-grid th.who div { display: flex; flex-direction: column; min-width: 0; }
.ag-grid th.who b, .ag-grid th.who span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-grid tr:first-child th:first-child { width: 190px; }
.ag-grid tr { border-top: 1px solid var(--line-2); }
.ag-grid td { vertical-align: top; padding: 6px; border-left: 1px solid var(--line-2); height: 92px; }
.ag-grid td.off { background: var(--soft); }
.ag-grid td.over { background: var(--accent-2); outline: 2px dashed var(--accent); outline-offset: -3px; }
.ag-load { height: 5px; border-radius: 3px; background: var(--line-2); overflow: hidden; margin-bottom: 4px; }
.ag-load i { display: block; height: 100%; }
.ag-route .body { display: grid; gap: 0; padding-top: 16px; }
.ag-stop { display: flex; gap: 14px; align-items: center; padding: 10px 0; position: relative; }
.ag-stop:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 42px; bottom: -10px; width: 2px; background: var(--line); }
.ag-stop .n { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--accent); font-weight: 650; z-index: 1; }
.ag-stop.base .n { background: var(--dark); }
.ag-stop > div { display: flex; flex-direction: column; min-width: 0; cursor: pointer; }
@media (max-width: 900px) {
  .ag-plan { grid-template-columns: 1fr; }
  .ag-task { flex-wrap: wrap; } .ag-task .acts { width: 100%; justify-content: flex-end; }
  .ag-wh, .ag-wb { grid-template-columns: 40px repeat(var(--cols), minmax(90px, 1fr)); }
  #cal { overflow-x: auto; }
}
/* Nuovo ticket: cliente e contatto in alto, a tendina */
.nt.nt-v2 { display: block; min-height: 0; }
.nt-top { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; padding: 16px 22px; background: #f6f7fb; border-bottom: 1px solid var(--line-2); border-top-left-radius: 0; }
.nt-top .nt-l { margin: 0 0 6px; }
.nt-top .bp { max-width: none; }
.nt-top .bp-btn { min-height: 46px; }
.nt-top .bp-btn small { max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-top .bp-pop { max-height: 380px; }
.nt-top .bp-create { margin-top: 2px; }
.nt-src { font-style: normal; font-size: 11px; color: var(--muted); background: #eef0f5; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.nt-v2 .nt-main { padding-top: 18px; }
.overlay.sub { z-index: 1200; background: rgba(15,20,40,.28); }
.sm-modal { width: min(520px, 100%); }
.sm-modal .form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sm-modal .full { grid-column: 1 / -1; }
@media (max-width: 720px) { .nt-top { grid-template-columns: 1fr; padding: 14px 16px; } .sm-modal .form { grid-template-columns: 1fr; } }
.bp-it > .avatar, .bp-btn > .avatar { flex: 0 0 28px; }

/* ---------- Panoramica (idee da Kept e FacilityFlow, colori D4B) ---------- */
@font-face { font-family: "Doto"; src: url("/static/vendor/fonts/doto-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
.doto { font-family: "Doto", ui-monospace, monospace; font-weight: 800; letter-spacing: -.02em; line-height: .9; font-variant-numeric: tabular-nums; }
.doto-u { font-family: "Doto", ui-monospace, monospace; font-weight: 800; font-size: .45em; margin-left: 2px; align-self: flex-end; }
.dh { display: grid; gap: 18px; }
.dh-nextup { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 500; white-space: nowrap; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
.dh-counts { display: flex; gap: clamp(18px, 4vw, 56px); padding: 2px 4px 0; flex-wrap: wrap; }
.dh-counts a { display: flex; flex-direction: column; gap: 6px; color: inherit; text-decoration: none; cursor: pointer; }
.dh-counts small { color: var(--muted); font-size: 12.5px; }
.dh-counts .doto { font-size: 40px; }
.dh-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.dh-k { background: #fff; border-radius: 22px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; color: var(--text); text-decoration: none; cursor: pointer; box-shadow: 0 1px 2px rgba(20,30,60,.04); border: 1px solid var(--line-2); transition: transform .15s, box-shadow .15s; min-height: 150px; }
.dh-k:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(20,30,60,.08); }
.dh-kh { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; font-weight: 600; }
.dh-kh i { font-style: normal; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: #f2f4f8; font-size: 13px; }
.dh-kv { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; flex: 1; }
.dh-kv .doto { font-size: 52px; }
.dh-k > small { color: var(--muted); font-size: 12px; }
.dh-k.risk { background: linear-gradient(150deg, #ffb36b 0%, #ff8a3d 60%, #ff7a2e 100%); border: 0; color: #2a1400; }
.dh-k.risk > small, .dh-k.risk .dh-win small { color: rgba(42,20,0,.75); } .dh-k.risk .dh-kh i { background: #2a1400; color: #ffb36b; }
.dh-k.ok { background: linear-gradient(150deg, #b8f0a6 0%, #7fdc8f 55%, #4cc37a 100%); border: 0; color: #0d3b22; }
.dh-k.ok > small { color: rgba(13,59,34,.75); } .dh-k.ok .dh-kh i { background: #0d3b22; color: #b8f0a6; }
.dh-k.violet { background: var(--g-violet); border: 0; color: #fff; } .dh-k.violet > small { color: rgba(255,255,255,.8); } .dh-k.violet .dh-kh i { background: rgba(255,255,255,.22); }
.dh-mini { display: block; overflow: visible; } .dh-mini text { font-size: 9px; fill: var(--muted); }
.dh-avs { display: flex; align-items: center; flex-direction: column; gap: 6px; align-items: flex-end; }
.dh-avs .avatar { margin-left: -8px; border: 2px solid #fff; display: inline-grid; }
.dh-chip { display: inline-flex; align-items: center; font-size: 11.5px; font-style: normal; background: #eef1f7; color: #2b3242; border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.dh-chip.warn { background: #fff1e6; color: #b45309; }
.dh-avs .dh-chip { background: var(--accent-2); color: var(--accent); font-weight: 600; }
.dh-win { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; width: 46%; }
.dh-win::before { content: ""; display: block; width: 100%; height: 4px; border-radius: 4px; background: rgba(42,20,0,.18); }
.dh-win b { display: block; height: 4px; border-radius: 4px; background: #2a1400; margin-top: -8px; align-self: flex-start; }
.dh-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(280px, 4fr); gap: 18px; align-items: start; }
.dh-main, .dh-side { display: grid; gap: 18px; min-width: 0; }
.dh-card { padding: 18px 20px; }
.dh-ph { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; } .dh-ph b { font-size: 15.5px; } .dh-ph a { font-size: 12.5px; cursor: pointer; color: var(--muted); }
.dh-n { font-size: 11.5px; background: #eef1f7; border-radius: 999px; padding: 2px 8px; font-weight: 600; }
.pills.sm { margin: 0; } .pills.sm a { padding: 5px 11px; font-size: 12.5px; }
.dh-gl { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 12px 0 6px; }
.dh-gl .dot { width: 7px; height: 7px; border-radius: 50%; }
.dh-it, .dh-wk { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: #f7f8fb; margin-bottom: 6px; cursor: pointer; transition: background .15s; }
.dh-it:hover, .dh-wk:hover { background: #eef1f8; }
.dh-it .ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 700; flex: none; }
.dh-it-b { flex: 1; min-width: 0; } .dh-it-b b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .dh-it-b small { color: var(--muted); font-size: 12px; }
.dh-chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.dh-wk { background: transparent; border-bottom: 1px solid var(--line-2); border-radius: 0; margin: 0; padding: 10px 4px; }
.dh-wk:hover { background: #f7f8fb; border-radius: 12px; }
.dh-wk-h { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 12px 0 2px; }
.dh-ring { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #c9cfdb; flex: none; } .dh-ring.late { border-color: #e5484d; } .dh-ring.soon { border-color: #ff8a3d; }
.dh-who { max-width: 170px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; background: #f2f4f8; border-radius: 999px; padding: 3px 10px 3px 3px; font-size: 12.5px; min-width: 110px; }
.dh-who .avatar { width: 22px; height: 22px; flex-basis: 22px; font-size: 9px; }
.dh-date { font-size: 12.5px; color: var(--muted); min-width: 78px; }
.dh-st { font-size: 11.5px; border-radius: 999px; padding: 3px 9px; background: #eef1f7; color: #4a5164; min-width: 82px; text-align: center; }
.dh-st.late { background: #fdecec; color: #c4262e; } .dh-st.soon { background: #fff1e6; color: #b45309; }
.dh-big { display: flex; align-items: baseline; gap: 10px; margin: 2px 0 12px; } .dh-big .doto { font-size: 36px; } .dh-big small { color: var(--muted); font-size: 12.5px; }
.dh-leg { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); } .dh-leg i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-left: 8px; }
.dh-leg i.o, .dh-pair i.o { background: #ff8a3d; } .dh-leg i.r, .dh-pair i.r { background: var(--accent); }
.dh-pairs { display: flex; align-items: flex-end; gap: 4px; height: 124px; border-bottom: 1px dashed var(--line); }
.dh-pair { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 3px; height: 100%; }
.dh-pair i { width: min(7px, 30%); border-radius: 4px 4px 1px 1px; display: block; }
.dh-pair-x { display: flex; gap: 4px; margin-top: 6px; } .dh-pair-x span { flex: 1; text-align: center; font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.dh-risk { background: linear-gradient(170deg, #ffc28a 0%, #ff9a4d 100%); border-radius: 24px; padding: 16px; color: #2a1400; }
.dh-risk .dh-n { background: #2a1400; color: #ffc28a; } .dh-risk .dh-ph a { color: #2a1400; }
.dh-rc { background: #fff; border-radius: 18px; padding: 12px 14px; margin-bottom: 10px; color: var(--text); }
.dh-rc-h { display: flex; align-items: center; gap: 10px; } .dh-rc-h > div { flex: 1; min-width: 0; } .dh-rc-h b { display: block; font-size: 13.5px; } .dh-rc-h small { color: var(--muted); font-size: 11.5px; }
.dh-due { font-size: 11px; background: #fff1e6; color: #b45309; border-radius: 999px; padding: 3px 8px; white-space: nowrap; } .dh-due.bad { background: #fdecec; color: #c4262e; }
.dh-rc p { margin: 10px 0; font-size: 13.5px; line-height: 1.4; }
.dh-rc-f { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dh-more { display: block; font-size: 12.5px; font-weight: 600; color: #2a1400; cursor: pointer; padding: 2px 4px; }
.dh-next { background: radial-gradient(120% 90% at 0% 0%, #1b2a6b 0%, #10131c 55%); color: #fff; border-radius: 24px; padding: 16px; }
.dh-next .dh-ph small { color: rgba(255,255,255,.6); font-size: 11.5px; }
.dh-nx { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.07); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; }
.dh-nx b { display: block; font-size: 13.5px; } .dh-nx small { color: rgba(255,255,255,.65); font-size: 11.5px; }
.dh-nx-ic { width: 32px; height: 32px; border-radius: 10px; background: #fff; color: var(--accent); display: grid; place-items: center; flex: none; }
.dh-ask { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.1); border-radius: 999px; padding: 5px 5px 5px 14px; margin-top: 6px; }
.dh-ask span { color: #a7b9ff; } .dh-ask input { flex: 1; background: transparent; border: 0; color: #fff; font: inherit; font-size: 13px; outline: 0; min-width: 0; } .dh-ask input::placeholder { color: rgba(255,255,255,.55); }
.dh-ask button { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; cursor: pointer; font-size: 14px; }
.dh-team { padding: 16px 18px; }
.dh-tm { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 13.5px; } .dh-tm b { width: 18px; text-align: right; }
.dh-lvl { display: flex; gap: 3px; align-items: flex-end; } .dh-lvl i { width: 4px; border-radius: 2px; background: #d9dde6; } .dh-lvl i:nth-child(1) { height: 8px; } .dh-lvl i:nth-child(2) { height: 12px; } .dh-lvl i:nth-child(3) { height: 16px; } .dh-lvl i.on { background: #2f9e5b; }
@media (max-width: 1180px) { .dh-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dh-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .dh-kpis { grid-template-columns: 1fr 1fr; gap: 10px; } .dh-k { padding: 14px; min-height: 0; border-radius: 18px; } .dh-kv .doto { font-size: 38px; } .dh-kv .dh-mini, .dh-win, .dh-avs { display: none; }
  .dh-counts .doto { font-size: 30px; } .dh-wk { flex-wrap: wrap; } .dh-who, .dh-date, .dh-st { min-width: 0; } .dh-it { flex-wrap: wrap; } .dh-chips { width: 100%; justify-content: flex-start; padding-left: 44px; } .dh-nextup { display: none; } }
.dh-more2 { display: inline-block; font-size: 12.5px; color: var(--muted); cursor: pointer; margin: 0 0 4px 12px; }
.dh-who > span:last-child { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { .dh-ph { flex-wrap: wrap; } .dh-ph .pills.sm { width: 100%; overflow-x: auto; } }

/* icone Lucide */
svg.lu { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: block; flex: none; }
.ico.has-lu, .si.has-lu, .ic.has-lu { display: inline-grid; place-items: center; }
.npanel .ico svg.lu { width: 17px; height: 17px; }
.dh-kh i svg.lu { width: 15px; height: 15px; }
.d-ico svg.lu { width: 20px; height: 20px; } .d-ico.lg svg.lu { width: 28px; height: 28px; }

/* approvazioni */
.ap { display: grid; gap: 16px; }
.ap-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.ap-chips a { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 12px 5px 6px; font-size: 13px; cursor: pointer; color: var(--text); text-decoration: none; }
.ap-chips a:first-child { padding-left: 12px; } .ap-chips a.on { background: var(--dark, #121417); color: #fff; border-color: transparent; } .ap-chips a.zero { opacity: .55; }
.ap-chips b { font-size: 11.5px; background: #eef1f7; color: #2b3242; border-radius: 999px; padding: 1px 7px; } .ap-chips a.on b { background: rgba(255,255,255,.2); color: #fff; }
.ap-ic { width: 24px; height: 24px; border-radius: 8px; display: inline-grid; place-items: center; color: #fff; font-size: 12px; flex: none; } .ap-ic.lg { width: 36px; height: 36px; border-radius: 11px; font-size: 16px; }
.ap-g { padding: 18px 20px; } .ap-g .dh-ph { gap: 12px; margin-bottom: 12px; }
.ap-r { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: #f7f8fb; border-radius: 16px; margin-bottom: 8px; }
.ap-note { margin-top: 8px; background: #fff; border: 1px dashed var(--line); border-radius: 12px; padding: 8px 10px; font-size: 12.5px; color: #4a5164; white-space: pre-wrap; max-height: 90px; overflow: auto; }
.ap-v { font-weight: 650; font-size: 14px; white-space: nowrap; }
.ap-a { display: flex; gap: 6px; flex: none; }
.ap-r { cursor: pointer; transition: background .15s; } .ap-r:hover { background: #eef1f8; } .ap-r:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ap-go { color: var(--muted); display: inline-grid; place-items: center; flex: none; } .ap-go i { font-style: normal; display: inline-grid; } .ap-go svg { width: 16px; height: 16px; }
.ap-kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 0 0 14px; font-size: 13.5px; }
.ap-kv dt { color: var(--muted); } .ap-kv dd { margin: 0; font-weight: 550; overflow-wrap: anywhere; }
.ap-dnote { background: #f7f8fb; border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; font-size: 13px; } .ap-dnote p { margin: 4px 0 0; white-space: pre-wrap; color: #3a4152; }
.ap-dnote.ai { background: #fbf3ff; }
.modal h3 .ap-ic { vertical-align: -6px; margin-right: 4px; }
@media (max-width: 760px) { .ap-go { display: none; } }
.ap-empty { padding: 40px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.count.bad { background: #e5484d; color: #fff; }
@media (max-width: 640px) { .ap-r { flex-wrap: wrap; } .ap-a { width: 100%; justify-content: flex-end; } }

/* ricerca rapida ⌘K */
.ck-wrap { position: fixed; inset: 0; z-index: 90; background: rgba(15,20,35,.38); backdrop-filter: blur(3px); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.ck { width: min(640px, 100%); background: #fff; border-radius: 22px; box-shadow: 0 30px 80px rgba(15,20,40,.28); display: flex; flex-direction: column; overflow: hidden; max-height: 72vh; }
.ck-in { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.ck-in input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 16px; background: none; color: var(--text); min-width: 0; }
.ck-s { color: var(--muted); display: inline-grid; }
.ck kbd, .ck-foot kbd { font: 600 11px/1 inherit; font-family: inherit; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 3px 6px; color: var(--muted); background: #f7f8fb; margin-right: 3px; }
.ck-tabs { display: flex; gap: 6px; padding: 10px 14px 4px; overflow-x: auto; scrollbar-width: none; }
.ck-tabs button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--muted); white-space: nowrap; }
.ck-tabs button.on { background: var(--text); border-color: var(--text); color: #fff; }
.ck-list { overflow: auto; padding: 4px 8px 8px; display: flex; flex-direction: column; gap: 1px; }
.ck-g { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint, #9aa3b2); font-weight: 600; padding: 10px 8px 4px; }
.ck-list button { display: flex; align-items: center; gap: 11px; border: 0; background: none; padding: 7px 8px; border-radius: 12px; font: inherit; text-align: left; cursor: pointer; color: var(--text); }
.ck-list button.on { background: #f2f4fa; }
.ck-i { width: 32px; height: 32px; border-radius: 10px; background: #f1f3f8; display: inline-grid; place-items: center; color: var(--muted); flex: none; font-size: 14px; }
.ck-i svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ck-list button.on .ck-i { background: #e8edff; color: var(--accent); }
.ck-list button.ai .ck-i { background: linear-gradient(135deg, #7c5cff, #c06bff); color: #fff; }
.ck-t { flex: 1; min-width: 0; } .ck-t b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ck-t small { display: block; color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ck-go { color: var(--faint, #9aa3b2); font-size: 12px; opacity: 0; } .ck-list button.on .ck-go { opacity: 1; }
.ck-empty { padding: 14px 10px; }
.ck-foot { display: flex; align-items: center; gap: 14px; padding: 9px 16px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); background: #fafbfd; }
.ck-foot .grow { flex: 1; }
#gsearch { cursor: pointer; }
@media (max-width: 700px) { .ck-wrap { padding: 10px 10px; } .ck { max-height: 86vh; } .ck-foot { display: none; } }

.chan-i { font-style: normal; display: inline-grid; vertical-align: -2px; }
.chan-i svg.lu { width: 14px; height: 14px; }
.chan { display: inline-flex; align-items: center; gap: 4px; }

/* magazzino: filtri stato, scansione, ricevimento merce, check-in */
.inv-st { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 10px; }
.inv-st button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 13px; font: inherit; font-size: 13px; cursor: pointer; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.inv-st button b { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.inv-st button.on { background: var(--text); color: #fff; border-color: var(--text); } .inv-st button.on b { color: #fff; }
.inv-st .st-sotto-scorta:not(.on) b { color: #c2610c; } .inv-st .st-esaurito:not(.on) b { color: #d13438; } .inv-st .st-ok:not(.on) b { color: #2f9e5b; }
.scanf { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 3px 4px 3px 10px; min-width: 260px; flex: 1; max-width: 460px; }
.scanf:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(27,67,254,.12); }
.scanf input { border: 0 !important; outline: 0; box-shadow: none !important; flex: 1; min-width: 0; padding: 6px 2px !important; font: inherit; background: none; }
.scanf-i { color: var(--muted); display: inline-grid; }
.scanf .btn.sm { padding: 5px 8px; }
.cam { display: flex; flex-direction: column; gap: 10px; align-items: center; position: relative; }
.cam video { width: 100%; max-height: 52vh; border-radius: 16px; background: #0d1220; object-fit: cover; }
.cam-frame { position: absolute; top: 18%; left: 14%; right: 14%; height: 34%; border: 3px solid #f2a33a; border-radius: 14px; pointer-events: none; }
.rcv-top { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 12px; margin-bottom: 12px; }
.rcv-k { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; position: relative; display: flex; flex-direction: column; gap: 2px; }
.rcv-k small { color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: 10.5px; font-weight: 600; }
.rcv-k b { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rcv-k .ki { position: absolute; right: 14px; top: 14px; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: #e8edff; color: var(--accent); }
.rcv-k .ki.green { background: #e3f6ea; color: #2f9e5b; }
.rcv-scan { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.rcv-scan .scanf { max-width: none; }
.rc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.rc { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.rc.part { border-left: 4px solid #f2a33a; }
.rc-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.rc-h b { font-size: 15px; display: block; } .rc-h small { color: var(--muted); }
.rc-kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rc-kv small { display: block; font-size: 11px; color: var(--muted); } .rc-kv b { font-size: 13px; }
.rc-pg { display: flex; flex-direction: column; gap: 6px; }
.rc-pl { display: flex; justify-content: space-between; font-size: 13px; }
.rc .mbar span, .ci-pg .mbar span { background: #f2a33a; }
.rc-a { display: flex; gap: 8px; } .rc-a .btn:first-child { flex: 1; justify-content: center; }
.btn.warm { background: #f2a33a; border-color: #f2a33a; color: #fff; }
.ci { display: flex; flex-direction: column; gap: 12px; }
.ci-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .ci-top .scanf { max-width: none; }
.ci-wh { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.ci-pg { display: flex; flex-direction: column; gap: 6px; }
.ci-pg .mbar span { transition: width .25s; }
.ci-l { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: #f6f7fa; margin-bottom: 6px; transition: background .3s; }
.ci-l.full { background: #e8f6ee; } .ci-l.part { background: #fff6e8; } .ci-l.flash { background: #dfe7ff; }
.ci-c { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #fff; color: var(--muted); flex: none; }
.ci-l.full .ci-c { color: #2f9e5b; } .ci-l.part .ci-c { color: #c2610c; }
.ci-t { flex: 1; min-width: 0; } .ci-t b { display: block; font-size: 13.5px; } .ci-t small { display: block; color: var(--muted); font-size: 11.5px; }
.ci-q { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; } .ci-q small { color: var(--muted); font-size: 11px; }
.ci-step { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.ci-step button { border: 0; background: none; width: 30px; height: 30px; font-size: 16px; cursor: pointer; color: var(--text); }
.ci-step input { width: 46px; border: 0 !important; text-align: center; font: inherit; font-weight: 700; padding: 0 !important; box-shadow: none !important; }
.im-k { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 6px 0 14px; }
.im-k > div { border: 1px solid var(--line); border-radius: 14px; padding: 12px; position: relative; display: flex; flex-direction: column; }
.im-k small { color: var(--muted); font-size: 12px; } .im-k b { font-size: 22px; font-variant-numeric: tabular-nums; } .im-k span { font-size: 11.5px; color: var(--muted); }
.im-k i { position: absolute; right: 10px; top: 10px; color: var(--muted); font-style: normal; display: inline-grid; }
.im-k .in b { color: var(--accent); } .im-k .low b { color: #c2610c; } .im-k .low { background: #fff7ec; }
@media (max-width: 760px) { .rcv-top { grid-template-columns: 1fr 1fr; } .rcv-scan { grid-column: 1 / -1; } .im-k { grid-template-columns: 1fr 1fr; } .rc-kv { grid-template-columns: 1fr 1fr; } .scanf { min-width: 0; max-width: none; } }

.ck-in, .ck-tabs, .ck-foot { flex: none; }

/* Panoramica: testata con giorni e prossimo impegno */
.dh-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dh-top .dh-nextup { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hello-strip span.has { position: relative; }
.hello-strip span.has::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: #f2711c; }
@media (max-width: 1400px) { .dh-top .dh-nextup { max-width: 200px; } }
.dh .hero { margin-bottom: 0; }
.dh-top .hello-strip span { width: 34px; }
.dh-top .dh-nextup { max-width: 230px; }
@media (max-width: 1400px) { .dh-top .dh-nextup { max-width: 150px; } }
@media (max-width: 1250px) { .dh-top .dh-nextup { display: none; } }
@media (max-width: 700px) { .dh-wk { flex-wrap: wrap; } .dh-wk .dh-who { display: none; } .dh-wk .dh-it-b { flex: 1 1 60%; } }

/* menu su telefono: pannello dal basso */
.msheet-bg { position: fixed; inset: 0; z-index: 80; background: rgba(15,20,35,.38); opacity: 0; transition: opacity .22s; }
.msheet-bg.in { opacity: 1; }
.msheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 81; background: #fff; border-radius: 26px 26px 0 0; box-shadow: 0 -20px 50px rgba(15,20,40,.22);
  display: flex; flex-direction: column; max-height: 84vh; transform: translateY(100%); transition: transform .24s cubic-bezier(.2,.8,.2,1); padding-bottom: env(safe-area-inset-bottom); }
.msheet.in { transform: none; }
.ms-grab { width: 40px; height: 5px; border-radius: 3px; background: #d7dbe4; margin: 8px auto 2px; flex: none; }
.ms-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 18px 4px; flex: none; }
.ms-head b { font-size: 19px; }
.ms-body { overflow: auto; padding: 4px 10px 10px; display: flex; flex-direction: column; gap: 2px; min-height: 120px; }
.ms-h { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint, #9aa3b2); font-weight: 600; padding: 12px 10px 4px; }
.ms-it { display: flex; align-items: center; gap: 12px; padding: 11px 10px; border-radius: 14px; color: var(--text); font-size: 16px; text-decoration: none; }
.ms-it:active, .ms-it.on { background: #f1f3f8; } .ms-it.on { font-weight: 600; }
.ms-it.big { font-size: 17px; font-weight: 600; }
.ms-ic { width: 34px; height: 34px; border-radius: 11px; background: #f3f5fa; display: grid; place-items: center; color: var(--muted); flex: none; }
.ms-ic .ico, .ms-ic .dot, .ms-ic i { display: inline-grid; place-items: center; margin: 0; }
.ms-it.on .ms-ic { background: #e8edff; color: var(--accent); }
.ms-it > span:nth-child(2) { flex: 1; min-width: 0; }
.ms-n { font-size: 12px; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--text); color: #fff; display: inline-grid; place-items: center; }
.ms-n.warn { background: #f2a33a; } .ms-n.red, .ms-n.bad { background: #e5484d; }
.ms-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--line); padding: 8px 8px 10px; flex: none; background: #fafbfd; }
.ms-tabs::-webkit-scrollbar { display: none; }
.ms-tabs button { flex: none; min-width: 74px; display: flex; flex-direction: column; align-items: center; gap: 3px; border: 0; background: none; padding: 7px 6px; border-radius: 14px; font: inherit; font-size: 11.5px; color: var(--muted); position: relative; }
.ms-tabs button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ms-tabs button.on { background: #fff; color: var(--accent); font-weight: 600; box-shadow: 0 2px 10px rgba(20,30,60,.08); }
.ms-tabs button i { position: absolute; top: 2px; right: 12px; font-style: normal; font-size: 10px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: #fff; display: grid; place-items: center; }
.ms-tabs button i.red { background: #e5484d; } .ms-tabs button i.warn { background: #f2a33a; } .ms-tabs button i:empty { display: none; }
@media (max-width: 760px) { .nav.open { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .msheet, .msheet-bg { transition: none; } }

/* il pannello resta sopra la barra in basso, che rimane visibile e cliccabile */
.msheet-bg { bottom: var(--tbh, 0px); z-index: 53; }
.msheet { bottom: var(--tbh, 0px); z-index: 54; max-height: calc(100dvh - var(--tbh, 0px) - 70px); box-shadow: 0 -16px 40px rgba(15,20,40,.18); }
.msheet:not(.in) { transform: translateY(calc(100% + var(--tbh, 0px))); }
body.ms-open .msheet { padding-bottom: 0; }
body.ms-open .tabbar { box-shadow: none; }
body.ms-open .tabbar #tabMore { color: var(--accent); font-weight: 600; }
body.ms-open #demoBar, body.ms-open .agent-fab { display: none !important; }

/* su telefono il menu si apre da "Altro" nella barra in basso: niente hamburger in alto */
@media (max-width: 760px) { #menuBtn { display: none !important; } }

/* barra in basso personalizzabile */
.tabbar .tb-ic { display: grid; place-items: center; height: 24px; }
.tabbar .tb-ic svg, .tabbar .tb-ic .ico svg { width: 21px; height: 21px; }
.tabbar .tb-ic .dot, .tabbar .tb-ic .team-dot { width: 10px; height: 10px; border-radius: 50%; }
.tabbar a.tb-slot.active { color: var(--accent); }
.ms-head { gap: 8px; } .ms-head b { flex: 1; }
.ms-cust { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.ms-cust svg { width: 14px; height: 14px; }
.tb-ed { padding: 4px 8px 8px; display: flex; flex-direction: column; gap: 10px; }
.tb-prev { display: flex; justify-content: space-around; align-items: center; background: #f6f7fb; border-radius: 14px; padding: 10px 6px; font-size: 12px; color: var(--muted); }
.tb-prev span.p { width: 30px; height: 30px; border-radius: 50%; background: var(--dark, #111318); color: #fff; display: grid; place-items: center; }
.tb-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; }
.tb-row select { flex: 1; max-width: 62%; padding: 9px 10px; border-radius: 12px; border: 1px solid var(--line); font: inherit; font-size: 15px; background: #fff; }

/* Agenda: collegamenti dei task a qualsiasi oggetto */
.ag-ref { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 2px 9px 2px 7px; border-radius: 999px; background: var(--line-2); font-size: 12px; color: var(--text); }
.ag-ref .ic { display: inline-flex; width: 14px; height: 14px; color: var(--muted); flex-shrink: 0; }
.ag-ref .ic svg { width: 14px; height: 14px; }
.ag-ref a { cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.ag-ref a:hover { text-decoration: underline; }
.ag-ref button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 0 0 2px; font-size: 11px; }
.ag-refbox { margin-top: 14px; }
.ag-refbox h4 { margin: 0 0 8px; font-size: 13px; }
.ag-refs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.ag-refsearch { position: relative; display: flex; gap: 8px; }
.ag-refsearch select, .ag-refsearch input { font: inherit; font-size: 14px; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; outline: none; }
.ag-refsearch select { flex: 0 0 auto; max-width: 42%; }
.ag-refsearch input { flex: 1; min-width: 0; }
.ag-refsearch input:focus, .ag-refsearch select:focus { border-color: var(--accent); }
.ag-refres { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 20; max-height: 260px; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; }
.ag-refres button { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 10px; cursor: pointer; color: var(--text); }
.ag-refres button:hover { background: var(--line-2); }
.ag-refres .ic { display: inline-flex; width: 16px; height: 16px; color: var(--muted); }
.ag-refres .x { display: flex; flex-direction: column; min-width: 0; font-size: 14px; font-weight: 500; color: var(--text); line-height: 1.3; }
.ag-refres small { color: var(--muted); font-size: 11.5px; }
.ag-refres > .muted { padding: 8px 10px; }
.ag-linked:empty { display: none; }
.ag-linked-h { display: flex; align-items: center; gap: 8px; padding: 12px 18px 6px; }
.side-sec.ag-linked .ag-linked-h, .ag-linked.in-modal .ag-linked-h, .docx-side .ag-linked-h { padding: 0 0 6px; }
.side-sec.ag-linked .ag-task, .ag-linked.in-modal .ag-task, .docx-side .ag-task { padding: 10px 0; }
.ag-linked.in-modal { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.docx-side .ag-linked { margin-top: 12px; }
.ag-linked .ag-none { padding: 8px 18px 14px; }
.side-sec.ag-linked .ag-none, .ag-linked.in-modal .ag-none, .docx-side .ag-none { padding: 4px 0; }
.cu-tasks { margin-top: 16px; }
/* scheda ticket su telefono: un solo scorrimento (la pagina), niente riquadri che scorrono uno dentro l'altro */
@media (max-width: 860px) {
  .ws .pane, .ws .pane-body, .ws .conv, .ws .details, .ws .thread { max-height: none !important; overflow-y: visible !important; overflow-x: clip !important; min-height: 0; min-width: 0; }
  .ws.has-sel .conv { height: auto; }
  .ws.has-sel.show-details .conv > :not(.conv-head) { display: none !important; }
  .ws.has-sel.show-details .conv { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
  .ws.has-sel.show-details .details { display: flex; flex-direction: column; }
  .ws.has-sel .details .side-sec { padding: 14px 16px; }
}

/* Agenda: nuovo task e scheda task, stesso linguaggio della scheda ticket */
.ag-nt .nt-main { gap: 8px; }
.ag-due { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ag-due .chip { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 6px 12px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 550; color: var(--text); }
.ag-due .chip small { font-size: 11px; font-weight: 400; color: var(--muted); }
.ag-due .chip.on { border-color: var(--accent); background: #eef3ff; color: var(--accent); }
.ag-due input[type=date] { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; font: inherit; font-size: 13px; background: var(--panel); color: var(--text); }
.ag-people { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ag-pchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 6px 3px 4px; border-radius: 999px; background: var(--line-2); font-size: 12.5px; }
.ag-pchip button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 11px; }
.ag-people select, .ag-addp { border: 1px dashed var(--line); border-radius: 999px; padding: 5px 12px; background: var(--panel); font: inherit; font-size: 12.5px; color: var(--muted); }
.ag-addp { margin-top: 8px; width: 100%; border-radius: 12px; }
.ag-nc { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--muted); }
.ag-nc svg { width: 13px; height: 13px; }
.ag-task a.t { color: var(--text); cursor: pointer; display: block; }
.ag-task a.t:hover { color: var(--accent); }
.task-ws { height: calc(100vh - 150px); min-height: 520px; }
.task-ws .conv { display: flex; flex-direction: column; }
.ag-bar { margin: 10px 18px 0; }
.ag-desc { background: #f6f7fb; border-radius: 14px; padding: 12px 14px; cursor: pointer; }
.ag-desc:hover { background: #eff1f7; }
.ag-desc h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ag-desc .text { white-space: pre-wrap; line-height: 1.5; overflow-wrap: anywhere; }
.ag-mention { color: var(--accent); font-weight: 600; }
.ag-plist { display: grid; gap: 8px; }
.ag-prow { display: flex; align-items: center; gap: 10px; }
.ag-prow > span:not(.avatar) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ag-prow small { color: var(--muted); font-size: 11.5px; }
.side-sec.ag-refbox { margin-top: 0; }
.side-sec.ag-refbox h4 { font-size: 13.5px; margin-bottom: 10px; }
.side-sec .ag-refsearch { flex-wrap: wrap; } .side-sec .ag-refsearch select { max-width: none; flex: 1 1 100%; }
@media (max-width: 860px) {
  .task-ws { height: auto; min-height: 0; }
  .task-ws .conv .pane-body { max-height: none; }
  .ws.has-sel.task-ws.show-details .conv { display: none; }
}
@media (max-width: 860px) {
  .ag-nt .seg { flex-wrap: wrap; }
  .ag-nt .seg button { flex: 1 1 calc(50% - 4px); min-width: 0; }
  .ag-nt .seg button .sl { white-space: nowrap; overflow: visible; }
  .ag-due .chip { flex-direction: row; align-items: center; padding: 7px 12px; }
  .ag-due .chip small { display: none; }
  .ag-due input[type=date] { flex: 1 1 100%; }
}
.ag-backc { display: none; }
@media (max-width: 860px) { .ag-backc { display: block; padding-bottom: 0 !important; } }
/* Panoramica personalizzabile: griglia a 12 colonne, altezza a passi di 8px (incastro tipo masonry) */
.dgrid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 8px; grid-auto-flow: row; column-gap: 16px; align-items: start; }
.dwg { min-width: 0; position: relative; }
.dwg > :not(.dw-tools):not(.dw-rs) { margin: 0 !important; }
.dwg > .card, .dwg > .dh-risk, .dwg > .dh-next { height: auto; }
.dwg[data-size="xs"] { grid-column: span 2; } .dwg[data-size="s"] { grid-column: span 3; } .dwg[data-size="m"] { grid-column: span 4; } .dwg[data-size="l"] { grid-column: span 6; }
.dwg[data-size="xl"] { grid-column: span 8; } .dwg[data-size="full"] { grid-column: span 12; }
.dwg .stat-card.wide { grid-column: auto; }
@media (min-width: 1101px) { .dwg[data-cols] { grid-column: span var(--cols) !important; } }
.dwg[data-size="xs"] .mini, .dwg[data-cols="2"] .mini { min-height: 96px; padding: 12px 14px; }
.dwg[data-size="xs"] .mini .v, .dwg[data-cols="2"] .mini .v { font-size: 18px; }
@media (max-width: 1100px) { .dwg[data-size="xs"] { grid-column: span 4; } .dwg[data-size="s"] { grid-column: span 6; } .dwg[data-size="m"] { grid-column: span 6; } .dwg[data-size="l"], .dwg[data-size="xl"], .dwg[data-size="full"] { grid-column: span 12; } }
@media (max-width: 760px) { .dgrid { grid-auto-rows: auto; row-gap: 14px; } .dwg { grid-column: span 12 !important; } }
.dw-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; } .dw-btn i { font-style: normal; display: inline-grid; } .dw-btn span:empty { display: none; } .dw-btn svg { width: 15px; height: 15px; } .dw-btn.on { background: var(--dark, #111318); color: #fff; border-color: transparent; }
.dgrid.editing .dwg { outline: 2px dashed #c9d2ea; outline-offset: 3px; border-radius: 18px; cursor: grab; }
.dgrid.editing .dwg > :not(.dw-tools):not(.dw-rs) { pointer-events: none; user-select: none; }
.dgrid.editing .dwg.dragging { opacity: .45; }
.dw-tools { position: absolute; z-index: 6; top: -13px; right: 10px; display: flex; align-items: center; gap: 2px; background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: 9px; padding: 2px; box-shadow: 0 4px 12px rgba(20,30,60,.14); font-size: 11px; pointer-events: auto; }
.dw-tools button { border: 0; background: transparent; border-radius: 6px; width: 22px; height: 22px; padding: 0; display: inline-grid; place-items: center; cursor: pointer; color: var(--text); flex: none; }
.dw-tools button:hover { background: #f1f3f8; }
.dw-tools button svg, .dw-grip svg { width: 13px; height: 13px; }
.dw-tools button[data-dw="del"] { color: #e5484d; }
.dw-tools .dw-size { height: 22px; border: 0; background: #f1f3f8; border-radius: 6px; font: inherit; font-size: 11px; font-weight: 600; color: var(--accent); padding: 0 4px; cursor: pointer; max-width: 104px; }
.dw-grip { cursor: grab; color: var(--muted); display: inline-grid; place-items: center; width: 18px; height: 22px; }
.dw-grip i, .dw-tools button i { font-style: normal; display: inline-grid; }
.dw-rs { position: absolute; z-index: 6; right: -4px; bottom: -4px; width: 16px; height: 16px; border-radius: 5px; background: #fff; border: 1px solid #b9c4e6; cursor: ew-resize; box-shadow: 0 2px 6px rgba(20,30,60,.15); }
.dw-rs::after { content: ""; position: absolute; inset: 4px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); border-radius: 0 0 2px 0; }
.dgrid.editing .dwg.resizing { outline-color: var(--accent); }
.dgrid.editing { row-gap: 0; }
@media (max-width: 760px) { .dw-rs { display: none; } }
.sla-row { display: flex; align-items: center; gap: 16px; margin: 6px 0 2px; }
.sla-row .ring-wrap { flex: none; }
.sla-stats { display: grid; gap: 8px; min-width: 0; }
.sla-stats > div { display: flex; flex-direction: column; line-height: 1.15; }
.sla-stats b { font-size: 16px; font-weight: 650; color: var(--text); }
.sla-stats span { font-size: 12px; color: var(--muted); }
.dw-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; align-items: center; padding: 14px 18px; margin-bottom: 18px; border: 1px solid #dfe5f7; }
.dw-off { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.dw-off .chip { border: 1px dashed #b9c4e6; background: #f7f9ff; color: var(--accent); cursor: pointer; padding: 6px 11px; border-radius: 999px; font: inherit; font-size: 12.5px; }
@media (max-width: 760px) { .dw-btn span { display: none; } .dw-bar { grid-template-columns: 1fr; } .dgrid.editing { row-gap: 14px; } }

/* Nuovo task su due colonne: titolo grande, descrizione a sinistra, il resto a destra */
.ag-nt2 { display: flex; flex-direction: column; }
.ag-title { font-size: 24px; font-weight: 650; letter-spacing: -.01em; border: 0; border-bottom: 1.5px solid var(--line-2); padding: 20px 24px 16px; outline: 0; font-family: inherit; background: transparent; color: var(--text); width: 100%; }
.ag-title:focus { border-color: var(--accent); }
.ag-cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); min-height: 460px; }
.ag-left { padding: 16px 22px 20px 24px; display: flex; flex-direction: column; gap: 8px; }
.ag-left .nt-l { margin-top: 0; }
.ag-left textarea { flex: 1; min-height: 300px; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font: inherit; line-height: 1.55; resize: vertical; background: var(--panel); color: var(--text); }
.ag-right { padding: 6px 24px 20px 22px; background: #f6f7fb; border-left: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 6px; }
.ag-right .seg button { padding-left: 6px; padding-right: 6px; }
.ag-right .seg .sl { font-size: 12.5px; }
.ag-right .ag-due .chip { padding: 5px 10px; }
.ag-right .ag-due input[type=date] { flex: 1 1 130px; padding: 6px 10px; }
.ag-right .ag-due .chip small { display: none; }
.ag-right .nt-l { margin-top: 8px; }
.ag-right .ag-refsearch { flex-wrap: wrap; } .ag-right .ag-refsearch select { max-width: none; flex: 1 1 100%; }
.ag-right .ag-refbox { margin-top: 10px; }
.ag-right .ag-refbox h4 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ag-right .seg { flex-wrap: wrap; } .ag-right .seg button { flex: 1 1 auto; }
@media (max-width: 860px) {
  .ag-title { font-size: 20px; padding: 16px 18px 12px; }
  .ag-cols { grid-template-columns: 1fr; }
  .ag-left { padding: 14px 18px; } .ag-left textarea { min-height: 120px; }
  .ag-right { border-left: 0; border-top: 1px solid var(--line-2); max-height: none; padding: 6px 18px 18px; }
  .ag-right .seg button { flex: 1 1 calc(50% - 4px); }
  .ag-due .chip small { display: none; }
}
/* Nuovo task: rifinitura grafica (testata, foglio descrizione, gruppi a card, priorità a colori) */
.ag-head { padding: 18px 26px 14px; border-bottom: 1px solid var(--line-2); background: linear-gradient(180deg, #f7f9ff 0%, #fff 100%); }
.ag-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); background: var(--accent-2); padding: 4px 10px 4px 8px; border-radius: 999px; }
.ag-kicker .ic, .ag-card-h .ic, .ag-sumc .ic { display: inline-flex; width: 14px; height: 14px; }
.ag-kicker svg, .ag-card-h svg, .ag-sumc svg { width: 14px; height: 14px; }
.ag-head .ag-title { border: 0; padding: 10px 0 2px; font-size: 26px; background: transparent; }
.ag-head .ag-title::placeholder { color: #c3c7d0; }
.ag-cols { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); background: #f4f5f9; min-height: 0; }
.ag-left { padding: 18px 10px 18px 22px; }
.ag-paper { flex: 1; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 1px 2px rgba(17,19,24,.03), 0 6px 18px rgba(17,19,24,.04); overflow: hidden; }
.ag-paper:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-2); }
.ag-paper-h { display: flex; align-items: center; padding: 12px 14px 6px 16px; }
.ag-paper-h .nt-l { margin: 0; }
.ag-mini { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 12px; color: var(--muted); cursor: pointer; }
.ag-mini:hover { color: var(--accent); border-color: var(--accent); }
.ag-left .ag-paper textarea { flex: 1; min-height: 340px; border: 0; border-radius: 0; padding: 6px 16px 16px; box-shadow: none; outline: 0; font-size: 14.5px; line-height: 1.65;
  background-image: repeating-linear-gradient(180deg, transparent 0, transparent 23px, #f1f2f6 23px, #f1f2f6 24px); background-attachment: local; background-position: 0 6px; }
.ag-right { background: transparent; border-left: 0; padding: 18px 22px 18px 10px; gap: 12px; }
.ag-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px 14px; box-shadow: 0 1px 2px rgba(17,19,24,.03); display: flex; flex-direction: column; gap: 6px; }
.ag-card-h { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; color: var(--text); margin-bottom: 2px; }
.ag-card-h .ic { width: 26px; height: 26px; border-radius: 9px; background: var(--accent-2); color: var(--accent); align-items: center; justify-content: center; }
.ag-card .nt-l { margin-top: 6px; font-size: 11px; }
.ag-card .bp-btn { min-height: 44px; border-width: 1px; }
.ag-right .ag-due .chip { border-radius: 999px; padding: 6px 12px; font-weight: 550; }
.ag-right .ag-due input[type=date] { border-radius: 999px; }
.ag-est { background: #f4f5f9; } .ag-est button { padding: 7px 6px; font-size: 12.5px; }
.ag-prio button { flex-direction: column; gap: 4px; padding: 10px 6px; }
.ag-prio button[data-v=bassa] .si { background: #eef1f6; color: #6b7385; }
.ag-prio button[data-v=normale] .si { background: var(--accent-2); color: var(--accent); }
.ag-prio button[data-v=alta] .si { background: #fff1e6; color: #e5730a; }
.ag-prio button[data-v=urgente] .si { background: #fdecec; color: #e5484d; }
.ag-prio button.on[data-v=bassa] { box-shadow: 0 0 0 1.5px #9aa1ad inset; } .ag-prio button.on[data-v=bassa] .si { background: #6b7385; color: #fff; }
.ag-prio button.on[data-v=normale] { box-shadow: 0 0 0 1.5px var(--accent) inset; } .ag-prio button.on[data-v=normale] .si { background: var(--accent); color: #fff; }
.ag-prio button.on[data-v=alta] { box-shadow: 0 0 0 1.5px #e5730a inset, 0 2px 8px rgba(229,115,10,.15); } .ag-prio button.on[data-v=alta] .si { background: #e5730a; color: #fff; }
.ag-prio button.on[data-v=urgente] { box-shadow: 0 0 0 1.5px #e5484d inset, 0 2px 8px rgba(229,72,77,.18); } .ag-prio button.on[data-v=urgente] .si { background: #e5484d; color: #fff; }
.ag-card .ag-refbox { margin-top: 4px; } .ag-card .ag-refbox h4 { margin-top: 6px; font-size: 11px; }
.ag-sum { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.ag-sumc { display: inline-flex; align-items: center; gap: 5px; background: #f4f5f9; border-radius: 999px; padding: 4px 10px; font-size: 12.5px; color: var(--text); white-space: nowrap; }
.ag-sumc .ic { color: var(--muted); }
@media (max-width: 860px) {
  .ag-head { padding: 14px 18px 10px; } .ag-head .ag-title { font-size: 21px; }
  .ag-left { padding: 14px 14px 0; } .ag-left .ag-paper textarea { min-height: 140px; }
  .ag-right { padding: 12px 14px 16px; }
  .ag-sum { display: none; }
}
/* compattezza: la finestra sta nello schermo, la colonna destra scorre da sola */
.ag-cols { height: min(600px, calc(100vh - 290px)); }
.ag-left { display: flex; } .ag-left .ag-paper textarea { min-height: 0; }
.ag-right { overflow-y: auto; padding-bottom: 18px; }
.ag-assign { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ag-assign .nt-l { margin-top: 2px; }
.ag-prio button { flex-direction: row; gap: 8px; padding: 8px 6px; }
.ag-card { padding: 12px 14px; gap: 4px; }
@media (max-width: 860px) { .ag-cols { height: auto; } .ag-right { overflow: visible; } .ag-assign { grid-template-columns: 1fr; } }
.ag-assign > div { min-width: 0; }
.ag-assign .bp-btn { min-width: 0; } .ag-assign .bp-btn small { display: none; }
.ag-assign .bp-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; text-align: left; }
.ag-head .ag-title { padding-top: 4px; }
@media (max-width: 860px) {
  .ag-cols { grid-template-columns: 1fr; height: auto; }
  .ag-left { padding: 14px 14px 0; } .ag-right { padding: 12px 14px 16px; overflow: visible; }
  .ag-left .ag-paper textarea { min-height: 150px; }
  .ag-assign { grid-template-columns: 1fr; }
  .ag-due .chip { padding: 6px 12px; }
}

/* Scheda task: intestazioni sezioni come nel Nuovo task */
.task-ws .details .side-sec h4.ag-sh { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; }
.task-ws .details .ag-sh .ic { display: inline-flex; width: 26px; height: 26px; border-radius: 9px; background: var(--accent-2); color: var(--accent); align-items: center; justify-content: center; }
.task-ws .details .ag-sh svg { width: 14px; height: 14px; }
.task-ws .details .kv select, .task-ws .details .kv input { border: 1px solid transparent; border-radius: 10px; background: var(--line-2); padding: 6px 10px; width: 100%; }
.task-ws .details .kv select:hover, .task-ws .details .kv input:hover { border-color: var(--line); }
.ag-card .ag-refbox h4.ag-sh .ic { display: none; }
.ag-card .ag-refbox h4.ag-sh { display: block; }
.ag-nc { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; }
.ag-nc .ic { display: inline-flex; width: 13px; height: 13px; } .ag-nc svg { width: 13px; height: 13px; }
/* Avanzamento ordine nel task di evasione */
.ag-ord { margin: 12px 0 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(180deg, var(--accent-2), #fff 70%); }
.ag-ord-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ag-ord-h .ic, .ag-ordln .ic, .ag-ordok .ic { display: inline-flex; width: 16px; height: 16px; color: var(--accent); }
.ag-ord svg { width: 16px; height: 16px; }
.ag-ordsteps { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ag-ordsteps span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.ag-ordsteps i { font-style: normal; display: inline-flex; width: 20px; height: 20px; border-radius: 50%; align-items: center; justify-content: center; background: var(--line-2); font-size: 11px; }
.ag-ordsteps .on { color: var(--text); } .ag-ordsteps .on i { background: var(--accent); color: #fff; }
.ag-ordsteps .cur { border-color: var(--accent); font-weight: 600; }
.ag-ordmeta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-bottom: 8px; }
.ag-ordok { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: #2f9e5b; }
.ag-ordpo { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-top: 8px; }
.ag-ordpo .row { gap: 8px; align-items: center; flex-wrap: wrap; }
.ag-ordln { display: flex; align-items: center; gap: 8px; padding-top: 6px; font-size: 13px; flex-wrap: wrap; }
.ag-ordact { margin-top: 10px; gap: 8px; }
/* lingue: niente lampo di testo italiano mentre si carica il catalogo (i18n.js) */
html.i18n-wait body { visibility: hidden; }
.lang-pick { font: inherit; font-size: 12px; padding: 4px 8px; border: 1px solid var(--line, #e5e7eb); border-radius: 8px; background: transparent; color: inherit; }
.login-lang { display: flex; justify-content: flex-end; margin-top: 10px; }
.ub-lnote { padding: 2px 4px 4px; font-size: 11.5px; }
/* bottone lingua nella barra, sopra l'avatar */
.rl-lang { position: relative; border: 1px solid var(--line); background: #fff; color: #5d6676; font: inherit; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; width: 40px; height: 28px; border-radius: 999px; cursor: pointer; margin: 2px 0 4px; }
.rl-lang:hover { border-color: var(--accent); color: var(--accent); }
.rl-lang.tmp { border-color: #f5b65a; color: #9a5b00; background: #fff7ec; }
.rl-ltmp { position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border-radius: 50%; background: #f2711c; box-shadow: 0 0 0 2px #fff; }
.lang-pop { position: fixed; z-index: 80; left: 80px; bottom: 60px; width: 250px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 50px rgba(20,30,60,.18); padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.lang-pop .lp-code { width: 30px; height: 22px; border-radius: 7px; background: #f1f3f8; color: #5d6676; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.lang-pop .co-it.on .lp-code { background: var(--dark, #121417); color: #fff; }
.lang-pop .co-it svg { width: 16px; height: 16px; color: var(--accent); }
.lang-pop .ub-lnote { border-top: 1px solid var(--line-2, #eef0f5); margin-top: 4px; padding: 8px 10px 4px; }
.lang-pop .ub-lnote a { display: inline; padding: 0; }
.ub-lnote.tmp { display: flex; flex-wrap: wrap; gap: 4px 10px; color: #9a5b00; }
#userbox .ub-lnote a { display: inline; padding: 0; margin: 0; background: none; width: auto; }
.ub-lnote a, .p-lkeep { color: var(--accent); cursor: pointer; font-weight: 600; }
.p-lkeep { font-size: 12px; margin-right: 6px; }
.ub-lang { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 4px 2px; }

/* ------------------------------------------------------------------ commissioni vendor */
.rv-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
.rv-grid .card { margin-bottom: 0; }
.rv-chart { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; padding: 6px 4px 0; }
.rv-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.rv-bars { display: flex; align-items: flex-end; gap: 4px; }
.rv-bars i { display: block; border-radius: 6px 6px 3px 3px; }
.rv-col small { color: var(--muted); font-size: 11.5px; }
.rv-gap { font-style: normal; font-size: 11px; font-weight: 600; color: var(--bad); white-space: nowrap; }
.rv-gap.ok { color: var(--ok); }
.rv-legend { display: flex; gap: 16px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.rv-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.rv-todo { display: flex; flex-direction: column; gap: 6px; }
.rv-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #f8f9fd; cursor: pointer; color: inherit; }
.rv-item:hover { background: #eef2ff; }
.rv-item > b { white-space: nowrap; }
.rv-item small { display: block; color: var(--muted); font-size: 12px; }
.rv-neg { color: var(--bad); } .rv-pos { color: var(--ok); } .rv-ok { color: var(--ok); font-weight: 600; }
.rv-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; margin-bottom: 14px; }
.rv-bar .seg { min-width: 400px; } .rv-bar select { width: auto; min-width: 170px; font: inherit; font-size: 13.5px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); }
.rv-kpis .kpi { padding: 14px 16px; }
.rv-warn { background: #fff7ec; color: #9a5b00; border: 1px solid #ffe2bd; border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-size: 13px; }
.rv-flag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; background: #fdecec; color: var(--bad); white-space: nowrap; margin: 1px 0; }
.rv-flag.soft { background: #eef0f3; color: #5d6676; }
table.list tr.rv-bad td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.rv-legal { margin: 4px 2px 18px; line-height: 1.5; }
.rv-done { background: #e7f6ee; color: #1c6b40; border-radius: 12px; padding: 10px 14px; margin-top: 10px; font-size: 13px; }
.rv-fl small .badge { margin-left: 4px; }
@media (max-width: 760px) { .rv-ok-kpis { grid-template-columns: 1fr; } .rv-gap { font-size: 9.5px; } .rv-bars i { width: 11px !important; } .rv-chart { gap: 2px; } }
@media (max-width: 900px) { .rv-grid { grid-template-columns: 1fr; } .rv-bar .seg { min-width: 0; width: 100%; } }
table.list td.nowrap { white-space: nowrap; }
.rv-lang { max-width: 420px; }
/* simbolo davanti a un testo, convertito in icona a linea da icons.js */
.lu-pre { font-style: normal; display: inline-flex; vertical-align: -0.16em; margin-right: .38em; } .lu-pre svg.lu { width: 1.05em; height: 1.05em; }

/* Panoramica: riga di azioni rapide in alto */

/* menu compatto: barra di sole icone su una colonna bianca arrotondata, voce attiva in un cerchio scuro */
body.nav-v2 .nav { grid-template-columns: 84px 232px; background: transparent; }
body.nav-v2 .nav.collapsed, body.nav-v2 .nav.nopanel { grid-template-columns: 84px 0; }
body.nav-v2 .rail { margin: 12px 0 12px 12px; padding: 14px 0; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 26px; box-shadow: 0 6px 20px rgba(20,30,60,.06); overflow: visible; }
body.nav-v2 .rail .rl-logo { padding: 0 0 10px; }
body.nav-v2 .rl-b { width: 46px; height: 46px; padding: 0; border-radius: 50%; justify-content: center; color: #6b7180; }
body.nav-v2 .rl-b > span { position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%); background: var(--dark, #121417); color: #fff; font-size: 12px; font-weight: 600; padding: 5px 9px; border-radius: 8px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s; z-index: 80; }
body.nav-v2 .rl-b:hover > span, body.nav-v2 .rl-b:focus-visible > span { opacity: 1; }
body.nav-v2 .rl-b svg { width: 21px; height: 21px; }
body.nav-v2 .rl-b:hover { background: #f1f3f8; color: var(--text); }
body.nav-v2 .rl-b.on { background: var(--dark, #121417); color: #fff; box-shadow: 0 6px 14px rgba(17,19,24,.22); }
body.nav-v2 .rl-n { top: 4px; right: auto; left: calc(50% + 3px); box-shadow: 0 0 0 2px #fff; }
body.nav-v2 .rl-b.on .rl-n { box-shadow: 0 0 0 2px var(--dark, #121417); }
body.nav-v2 .npanel { padding-left: 14px; }
@media (max-width: 760px) { body.nav-v2 .nav, body.nav-v2 .nav.collapsed { grid-template-columns: 84px 232px; } body.nav-v2 .nav.nopanel { grid-template-columns: 84px 0; } }
.stat-card.sla-card { min-height: 0; }
@media (max-width: 1500px) { body.nav-v2 .dh-top .dh-nextup { max-width: 170px; } }
/* Mail al cliente: testo a sinistra, anteprima del modello grafico a destra */
.ag-mail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; }
.ag-mail-f { grid-template-columns: 1fr; align-content: start; }
.ag-mail-p { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: #f3f4f7; min-height: 520px; }
.ag-mail-ph { display: flex; align-items: center; gap: 6px; padding: 8px 14px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); background: #fff; }
.ag-mail-ph .ic { display: inline-flex; width: 14px; height: 14px; } .ag-mail-ph svg { width: 14px; height: 14px; }
.ag-mail-p iframe { flex: 1; width: 100%; border: 0; min-height: 500px; }
@media (max-width: 860px) { .ag-mail { grid-template-columns: 1fr; } .ag-mail-p { min-height: 420px; } }
.ag-mail-ph .seg { margin: -2px 0; } .ag-mail-ph .seg button { padding: 3px 10px; font-size: 12px; white-space: nowrap; }

/* Orario proposto e proposta di pianificazione */
.ag-hint { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--accent-2); color: var(--text); font-size: 13px; margin-bottom: 8px; }
.ag-hint .ic, .ag-sugg .ic, .ag-pp-sum .ic, #pPlan .ic { display: inline-flex; width: 15px; height: 15px; color: var(--accent); flex-shrink: 0; }
.ag-hint svg, .ag-sugg svg, .ag-pp-sum svg, #pPlan svg { width: 15px; height: 15px; }
#pPlan { display: inline-flex; align-items: center; gap: 6px; } #pPlan .ic { color: #fff; }
.ag-sugg { display: flex; align-items: center; gap: 10px; flex-direction: row; }
.ag-sugg .btn { display: inline-flex; align-items: center; gap: 6px; }
.ag-pp { display: flex; flex-direction: column; gap: 8px; }
.ag-pp-sum { display: flex; gap: 10px; padding: 12px 14px; border-radius: 14px; background: linear-gradient(135deg, var(--accent-2), #fff); border: 1px solid var(--line); }
.ag-pp-sum p { margin: 0; font-size: 13.5px; line-height: 1.5; }
.ag-pp-row { display: grid; grid-template-columns: auto 110px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.ag-pp-row.late { border-color: #f3b4b4; background: #fff7f7; }
.ag-pp-when { display: flex; flex-direction: column; font-size: 13px; } .ag-pp-when span { color: var(--muted); }
.ag-pp-what { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.ag-pp-what b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-pp-why { font-size: 12px; color: var(--accent); }
.ag-pp-who { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; } .ag-pp-who span { display: inline-flex; gap: 6px; align-items: center; }
.ag-pp-un { padding: 10px 12px; border-radius: 12px; background: #fff7ed; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 860px) { .ag-pp-row { grid-template-columns: auto minmax(0, 1fr); } .ag-pp-who { grid-column: 2; flex-direction: row; flex-wrap: wrap; } }

/* logo di Beevo (static/brand/beevo-logo.svg) e logo società tondo che apre a fianco il cambio società */
.bv-mark { display: block; height: 100%; width: auto; }
.rl-app { width: 40px; height: 40px; color: var(--accent); display: grid; place-items: center; margin-bottom: 10px; flex: none; }
.rl-app .bv-mark { height: 34px; }
.rail .rl-co, body.nav-v2 .rail .rl-co { border: 0; background: none; padding: 0 0 12px; cursor: pointer; display: grid; place-items: center; }
.rl-co .co-dot { width: 40px; height: 40px; font-size: 11px; box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--line); transition: box-shadow .15s, transform .15s; }
.rl-co:hover .co-dot, .rl-co[aria-expanded="true"] .co-dot { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--accent); transform: scale(1.04); }
.co-dot { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .02em; object-fit: cover; }
.co-dot.co-g { background: var(--dark, #121417); } .co-dot svg.lu { width: 16px; height: 16px; }
.co-pop { position: fixed; z-index: 80; left: 96px; top: 70px; width: 300px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 50px rgba(20,30,60,.18); padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.co-pop::before { content: ""; position: absolute; left: -7px; top: 22px; width: 12px; height: 12px; background: #fff; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: rotate(45deg); }
.co-h { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 6px 10px 4px; }
.co-it { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 8px 10px; border-radius: 12px; font: inherit; text-align: left; cursor: pointer; color: var(--text); position: relative; }
.co-it:hover { background: #f3f4f7; } .co-it.on { background: var(--accent-2, #eef2ff); }
.co-it > span:not(.co-dot) { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; } .co-it b { font-size: 13.5px; } .co-it small { font-size: 11.5px; color: var(--muted); }
.co-it > svg.lu { width: 17px; height: 17px; color: var(--accent); flex: none; }
.co-note { font-size: 11.5px; color: var(--muted); padding: 4px 10px; }
.co-man { display: flex; align-items: center; gap: 8px; margin-top: 4px; padding: 10px 10px 6px; border-top: 1px solid var(--line-2, #eef0f5); font-size: 12.5px; color: var(--accent); cursor: pointer; }
.co-man svg.lu { width: 15px; height: 15px; }
.lang-pop .co-it > span.lp-code { flex: none; width: 30px; flex-direction: row; line-height: 1; }

/* login: schermo diviso, a sinistra il pannello Beevo con il logo in filigrana, a destra il modulo */
.login-screen.lg2 { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); place-items: stretch; padding: 0; background: var(--bg); }
.lg-art { position: relative; overflow: hidden; margin: 14px 0 14px 14px; border-radius: 28px; padding: 40px 48px; display: flex; flex-direction: column; justify-content: space-between; color: #fff;
  background: linear-gradient(140deg, #1b43fe 0%, #4f46e5 45%, #8b5cf6 100%); }
.lg-blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; pointer-events: none; }
.lg-blob.b1 { width: 420px; height: 420px; right: -120px; top: -120px; background: #f472b6; }
.lg-blob.b2 { width: 360px; height: 360px; left: -140px; bottom: -120px; background: #22d3ee; opacity: .35; }
.lg-grid { position: absolute; inset: 0; pointer-events: none; opacity: .14;
  background-image: linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px); background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 45%, #000, transparent); mask-image: radial-gradient(70% 60% at 50% 45%, #000, transparent); }
.lg-app, .lg-claim, .lg-foot { position: relative; }
.lg-app { display: flex; align-items: center; gap: 12px; font-size: 18px; }
.lg-applogo { height: 40px; display: grid; place-items: center; color: #fff; }
.lg-applogo .bv-mark { height: 40px; }
.lg-watermark { position: absolute; right: -70px; bottom: -60px; height: 78%; width: auto; color: #fff; opacity: .09; pointer-events: none; }
.lg-claim h1 { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.08; letter-spacing: -.025em; margin: 0 0 14px; text-wrap: balance; }
.lg-claim p { margin: 0 0 26px; font-size: 16px; line-height: 1.5; opacity: .85; max-width: 420px; }
.lg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lg-chips span { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); font-size: 13px; font-weight: 600; backdrop-filter: blur(8px); }
.lg-chips svg.lu { width: 15px; height: 15px; }
.lg-foot { display: flex; align-items: center; gap: 8px; font-size: 12.5px; opacity: .8; } .lg-foot svg.lu { width: 15px; height: 15px; }
.lg-side { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; position: relative; min-width: 0; }
.lg-top { position: absolute; top: 22px; right: 26px; }
.lg2 .login-card { max-width: 400px; background: transparent; box-shadow: none; padding: 0; gap: 16px; }
.lg-brand { gap: 12px; } .lg-brand .logo { width: 44px; height: 44px; border-radius: 50%; font-size: 12px; font-weight: 800; }
.lg-brand > div { font-weight: 700; font-size: 16px; }
.lg-hello { margin-bottom: 6px; } .lg-hello h2 { font-size: 30px; letter-spacing: -.02em; margin: 6px 0 4px; } .lg-hello p { font-size: 14.5px; }
.lg-f label { font-size: 12.5px; color: var(--text); margin-bottom: 6px; }
.lg-in { position: relative; display: flex; align-items: center; }
.lg-in > svg.lu { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.lg2 .login-card .lg-in input { height: 50px; padding: 0 44px 0 42px; border-radius: 14px; font-size: 15px; background: #fff; border: 1px solid var(--line); transition: border-color .15s, box-shadow .15s; }
.lg2 .login-card .lg-in input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.lg-eye { position: absolute; right: 8px; width: 34px; height: 34px; border: 0; background: none; border-radius: 10px; display: grid; place-items: center; color: var(--muted); cursor: pointer; }
.lg-eye:hover { background: #f1f2f5; color: var(--text); } .lg-eye svg.lu { width: 18px; height: 18px; }
.lg2 .login-card .btn.lg-go { height: 50px; border-radius: 14px; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin-top: 4px; }
.lg-go svg.lu { width: 18px; height: 18px; transition: transform .15s; } .lg-go:hover svg.lu { transform: translateX(3px); }
.lg-legal { max-width: 400px; margin: 26px 0 0; font-size: 11.5px; color: var(--muted); text-align: center; }
@media (max-width: 900px) {
  .login-screen.lg2 { grid-template-columns: 1fr; }
  .lg-art { display: none; }
  .lg-side { padding: 72px 20px 24px; background: radial-gradient(60% 40% at 0% 0%, #c9d6fb 0%, transparent 70%), radial-gradient(50% 40% at 100% 100%, #f8c3d8 0%, transparent 70%), var(--bg); }
}

/* il cambio società è sul logo tondo del menu: il menu a tendina nel pannello non serve più */
#coSwitch { display: none !important; }

/* integrazioni come catalogo */
.ic-hero { display: flex; gap: 24px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; padding: 26px 28px; border-radius: 24px; margin-bottom: 14px;
  background: radial-gradient(70% 120% at 100% 0%, #e9e4ff 0%, transparent 60%), radial-gradient(60% 120% at 0% 100%, #dfe8ff 0%, transparent 60%), #fff; border: 1px solid var(--line); }
.ic-hero > div { min-width: 0; max-width: 640px; } .ic-hero h2 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.02em; text-wrap: balance; } .ic-hero p { margin: 0 0 14px; }
.ic-sum { display: flex; flex-wrap: wrap; gap: 6px; }
.ic-search { display: flex; align-items: center; gap: 8px; width: 320px; max-width: 100%; height: 44px; padding: 0 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); box-shadow: 0 2px 10px rgba(20,30,60,.05); }
.ic-search svg.lu { width: 17px; height: 17px; color: var(--muted); } .ic-search input { border: 0; outline: 0; flex: 1; font: inherit; font-size: 14px; background: none; min-width: 0; }
.ic-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 0 12px; }
@media (max-width: 700px) { .ic-chips { flex-wrap: nowrap; overflow-x: auto; } }
.ic-chips button { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 13px; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.ic-chips button small { font-weight: 600; opacity: .6; margin-left: 2px; } .ic-chips button.on { background: var(--dark, #121417); border-color: var(--dark, #121417); color: #fff; }
.ic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.ic-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; transition: box-shadow .15s, transform .15s; }
.ic-card:hover { box-shadow: 0 10px 30px rgba(20,30,60,.08); transform: translateY(-1px); }
.ic-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 6px; }
.ic-ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--ic); color: #fff; font-weight: 800; font-size: 13px; flex: none; }
.ic-ico svg.lu { width: 21px; height: 21px; }
.ic-name { font-size: 15px; } .ic-desc { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; flex: 1; }
.ic-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line-2, #eef0f5); }
.ic-cat { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ic-st { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #eef0f5; color: #5d6676; white-space: nowrap; }
.ic-st i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; } .ic-st.ok { background: #e7f6ee; color: #1f7a46; } .ic-st.warn { background: #fff4e5; color: #b45309; }
.ic-st.in { background: #eef2ff; color: #3d63dd; } .ic-st.soon { background: transparent; border: 1px dashed #c5cad6; color: #8a90a0; }
.ic-card.soon { background: transparent; border-style: dashed; } .ic-card.soon .ic-ico { background: #eceef3; color: #8a90a0; }
.ic-ev { display: flex; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 10px; background: #f6f7f9; } .ic-ev span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ic-ev small { color: var(--muted); flex: none; }
.ic-card.ic-ext { padding: 18px; margin: 0 !important; } .ic-card.ic-ext .int-h { flex-direction: column; align-items: flex-start; gap: 12px; }
.ic-card.ic-ext .int-ico { width: 44px; height: 44px; border-radius: 12px; font-size: 20px; } .ic-card.ic-ext .int-h b { font-size: 16px; }
.ic-empty { padding: 30px; text-align: center; }
.ic-more { display: flex; align-items: center; gap: 16px; margin-top: 16px; padding: 18px 20px; border-radius: 20px; border: 1px dashed #c5cad6; } .ic-more p { margin: 2px 0 0; font-size: 13px; }
@media (max-width: 700px) { .ic-hero { padding: 20px; } .ic-search { width: 100%; } .ic-more { flex-wrap: wrap; } }
/* indirizzo e domini personalizzati */
.dom-addr { font-size: 15px; font-weight: 600; margin-bottom: 6px; word-break: break-all; }
.dom-add { display: flex; gap: 8px; } .dom-add input { flex: 1; min-width: 0; }
.dom-list { display: grid; gap: 12px; margin-top: 14px; }
.dom-card { padding: 14px 16px; box-shadow: none; border: 1px solid var(--line); }
.dom-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dom-card details { margin-top: 8px; } .dom-card summary { cursor: pointer; color: var(--muted); }
.dom-rec td, .dom-rec th { vertical-align: middle; } .dom-rec .dom-val { word-break: break-all; max-width: 320px; }
.dom-rec tr.dom-help td { border-top: 0; padding-top: 0; }
.dom-dot { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #eef0f6; color: var(--muted); font-size: 12px; }
.dom-p { background: #eef2ff; color: #3d63dd; } .dom-p-portal { background: #f1eafd; color: var(--ai); }
.dom-p-offers { background: #e7f6ee; color: var(--ok); }
.dom-sel { height: 32px; border-radius: 10px; font-size: 12.5px; padding: 0 10px; border: 1px solid var(--field-line, var(--line)); background: #fff; }
.dom-add select { max-width: 200px; }
.dom-dot.ok { background: #e7f6ee; color: var(--ok); }
@media (max-width: 720px) {
  .dom-add { flex-direction: column; } .dom-add select { max-width: none; }
  .dom-rec, .dom-rec tbody, .dom-rec tr, .dom-rec td { display: block; width: auto; }
  .dom-rec tr.dom-head { display: none; }
  .dom-rec td { white-space: normal !important; overflow-wrap: anywhere; word-break: break-all; min-width: 0; max-width: 100%; }
  .dom-rec { table-layout: fixed; max-width: 100%; }
  .dom-rec tr:not(.dom-help) td:nth-child(3)::before { content: "Nome  "; font-family: var(--font, inherit); color: var(--muted); }
  .dom-rec tr:not(.dom-help) td:nth-child(4)::before { content: "Valore  "; font-family: var(--font, inherit); color: var(--muted); }
  .dom-rec tr:not(.dom-help):not(.dom-head) { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; padding-top: 10px; border-top: 1px solid var(--line); }
  .dom-rec tr:not(.dom-help) td { border: 0; padding: 0; }
  .dom-rec tr:not(.dom-help) td:nth-child(3), .dom-rec tr:not(.dom-help) td:nth-child(4) { grid-column: 2 / 4; word-break: break-all; font-size: 12px; }
  .dom-rec tr:not(.dom-help) td:nth-child(5) { grid-column: 3; grid-row: 1; }
  .dom-rec .dom-val { max-width: none; }
  .dom-rec tr.dom-help td:first-child { display: none; }
  .dom-rec tr.dom-help td { padding: 4px 0 10px 36px; border: 0; word-break: normal; overflow-wrap: break-word; }
}

/* ------------------------------------------------------------------ società del gruppo */
.co-switch { margin: 0 8px 6px; display: flex; flex-direction: column; gap: 4px; }
.co-switch select { width: 100%; padding: 7px 9px; border-radius: 9px; border: 1px solid var(--line, #e3e5ea); background: #fff; font: inherit; font-size: 13px; }
.co-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 600; background: color-mix(in srgb, var(--cc) 12%, #fff); color: var(--cc); }
.co-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--cc); }
.co-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.co-card { padding: 16px 18px; border-top: 4px solid var(--cc); display: flex; flex-direction: column; gap: 14px; }
.co-top { display: flex; gap: 12px; align-items: center; }
.co-logo { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 12px; color: #fff; background: linear-gradient(135deg, var(--cc), color-mix(in srgb, var(--cc) 60%, #000)); flex: none; }
.co-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; text-align: center; }
.co-stats b { display: block; font-size: 18px; } .co-stats span { font-size: 10.5px; color: var(--muted); }
.co-meta { display: grid; gap: 4px; }
.ic-kpi { margin-bottom: 14px; } .ic-kpi .stat { padding: 14px 16px; } .ic-kpi .stat b { display: block; font-size: 20px; margin-top: 4px; }
.icl { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; } .icl .it, .icl .ds { flex: 1; min-width: 180px; }
.field.chk { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; } .field.chk input { margin-top: 3px; }
@media (max-width: 640px) { .co-stats { grid-template-columns: repeat(3, 1fr); } }
.grid.g4 { grid-template-columns: repeat(4, 1fr); } @media (max-width: 900px) { .grid.g4 { grid-template-columns: repeat(2, 1fr); } }
.tscroll { overflow-x: auto; } .tscroll table { min-width: 720px; }

/* PDF da Bexio mostrato dentro Beevo */
.pdf-frame { width: 100%; height: min(78vh, 900px); border: 0; border-radius: 10px; background: #f4f5f8; }
.docx-pdf { display: flex; gap: 6px; margin-bottom: 10px; }

.nowrap { white-space: nowrap; }
/* Profili e permessi: elenco profili a sinistra, editor a destra */
.prof-grid { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 16px; align-items: start; }
.prof-side { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 12px; }
.prof-side .btn.wide { width: 100%; padding: 10px; }
.prof-list { padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.prof-item { display: flex; align-items: center; gap: 10px; border: 0; background: none; text-align: left; padding: 9px 10px; border-radius: 12px; cursor: pointer; font: inherit; color: var(--text); }
.prof-item:hover { background: var(--soft); } .prof-item.on { background: var(--accent-2); }
.prof-av { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: 11.5px; font-weight: 700; flex: none; }
.prof-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; } .prof-tx b { font-size: 13.5px; } .prof-tx small { color: var(--muted); font-size: 11.5px; }
.prof-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #f2711c; vertical-align: middle; }
.prof-main { padding: 18px 20px; }
.prof-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; } .prof-head h3 { margin: 0 0 2px; font-size: 18px; }
.prof-views { margin-bottom: 14px; max-width: 520px; }
.perm-tree td { padding-top: 7px; padding-bottom: 7px; }
.perm-tree .pt-name { display: inline-flex; align-items: center; gap: 6px; padding-left: calc(var(--depth) * 22px); }
.perm-tree tr.pt-area td { background: var(--soft); } .perm-tree tr.pt-section td { font-size: 13px; }
.perm-tree tr.pt-own .pt-name::after { content: "personalizzato"; font-size: 10.5px; color: var(--accent); background: var(--accent-2); border-radius: 8px; padding: 1px 6px; }
.pt-tg { cursor: pointer; width: 16px; color: var(--muted); } .pt-sp { width: 16px; display: inline-block; }
.perm-tree .pc { text-align: center; white-space: nowrap; }
.lvseg button.inh { font-weight: 600; } .lvseg button.inh.on { color: var(--accent); background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.lvseg button.ghost { background: rgba(255,255,255,.55); } .lvseg button.ghost.read { color: rgba(27,67,254,.55); } .lvseg button.ghost.write { color: rgba(31,122,69,.6); } .lvseg button.ghost.none { color: var(--text); opacity: .55; }
.plvl { display: inline-block; font-size: 11.5px; padding: 3px 9px; border-radius: 10px; background: #f1f3f8; color: var(--muted); }
.plvl.read, .plvl.d-read { background: #eaf0ff; color: #1b43fe; } .plvl.write, .plvl.d-write { background: #e6f5ec; color: #1f7a45; } .plvl.d-none { background: #fdeceb; color: #c4342c; }
.dg-list { display: flex; flex-direction: column; gap: 10px; }
.dg-row { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.dg-tx { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dg-f { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; } .dg-f code { font-size: 10.5px; background: var(--soft); border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 5px; color: var(--muted); }
.dg-seg button .ico { width: 16px; height: 16px; display: inline-grid; place-items: center; }
.dg-seg button.on.dv-none { color: #c4342c; } .dg-seg button.on.dv-read { color: #1b43fe; } .dg-seg button.on.dv-write { color: #1f7a45; }
.dg-note { margin-top: 12px; line-height: 1.5; }
.mx-data td { background: var(--soft); }
.masked { letter-spacing: 2px; color: var(--faint); }
.noaccess { max-width: 460px; margin: 60px auto; text-align: center; padding: 28px; }
@media (max-width: 900px) {
  .prof-grid { grid-template-columns: 1fr; } .prof-side { position: static; }
  .dg-row { grid-template-columns: 1fr; } .hide-sm { display: none; }
  .prof-main { padding: 14px; } .perm-tree .pt-name { padding-left: calc(var(--depth) * 12px); }
}
.tabs a[hidden] { display: none; }
.perm-tree tr.pt-click { cursor: pointer; }

.dg-row { grid-template-columns: minmax(0, 1fr) 400px; }
@media (max-width: 900px) { .prof-head > .grow { flex-basis: 100%; } .dg-row { grid-template-columns: 1fr; } }

/* Modifica utente: intestazione con avatar, sezioni con icona */
.modal.uf-modal { width: min(760px, 100%); }
.uf { display: flex; flex-direction: column; gap: 14px; }
.uf-head { display: flex; align-items: center; gap: 14px; padding: 4px 2px 6px; }
.uf-av.avatar { width: 56px; height: 56px; font-size: 20px; flex: none; }
.uf-av-new { background: #eef1f8; color: var(--muted); display: grid; place-items: center; } .uf-av-new .lu { width: 26px; height: 26px; }
.uf-id { flex: 1; min-width: 0; } .uf-id b { display: block; font-size: 18px; letter-spacing: -.01em; } .uf-id span { color: var(--muted); font-size: 12.5px; }
.uf-sw { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; font-weight: 600; }
.uf-sw input { position: absolute; opacity: 0; pointer-events: none; }
.uf-sw i { width: 38px; height: 22px; border-radius: 999px; background: #d5d9e3; position: relative; transition: background .15s; }
.uf-sw i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.uf-sw input:checked + i { background: #1f9d55; } .uf-sw input:checked + i::after { transform: translateX(16px); }
.uf-sw input:focus-visible + i { outline: 2px solid #1b43fe; outline-offset: 2px; }
.uf-sec { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.uf-sec h4 { margin: 0 0 10px; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.uf-sec h4 i { width: 26px; height: 26px; border-radius: 8px; background: #eef1f8; display: grid; place-items: center; } .uf-sec h4 .lu { width: 15px; height: 15px; }
.uf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; align-items: start; } .uf-grid[hidden] { display: none; }
.uf .field { margin: 0; }
.uf-hint, .uf-note { color: var(--muted); font-size: 12px; margin: -4px 0 10px; } .uf-note { margin: 22px 0 0; }
.uf .prod-pick { margin-bottom: 0; } .uf-roles { margin-bottom: 12px !important; }
.uf .pp { display: inline-flex; align-items: center; gap: 6px; } .uf .pp .lu { width: 14px; height: 14px; }
.uf-main { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: #1b43fe; color: #fff; border-radius: 6px; padding: 1px 6px; }
.uf #ufCust { margin-bottom: 12px; }
.uf .perm-mini .nt-l { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.uf-leg { margin-left: auto; display: inline-flex; gap: 6px; text-transform: none; letter-spacing: 0; font-weight: 500; }
.uf .pmi { display: inline-flex; align-items: center; gap: 5px; } .uf .pmi .lu { width: 12px; height: 12px; }
@media (max-width: 760px) { .uf-grid { grid-template-columns: 1fr; } .uf-note { margin-top: 0; } .uf-leg { margin-left: 0; } .uf-sec { padding: 12px; } }

.uf-pwm { display: inline-flex; background: #f1f3f8; border-radius: 12px; padding: 3px; margin-bottom: 12px; flex-wrap: wrap; }
.uf-pwm button { white-space: nowrap; border: 0; background: none; font: inherit; font-size: 12.5px; padding: 6px 12px; border-radius: 9px; cursor: pointer; color: var(--muted); }
.uf-pwm button.on { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(17,19,24,.1); font-weight: 600; }
.uf-pwbox { margin-bottom: 12px; } .uf-pwbox[hidden] { display: none; } .uf-pwbox .uf-note { margin: 6px 0 0; }
.uf .pp:disabled { opacity: .55; } .uf .pp small { font-weight: 400; }
.uf #ufMust[hidden] { display: none; }
/* modifica utente: intestazione e pulsanti sempre visibili, scorre solo il contenuto */
.modal.uf-modal { max-height: calc(100vh - 48px); display: flex; flex-direction: column; }
.modal.uf-modal > .body { overflow-y: auto; min-height: 0; flex: 1; overscroll-behavior: contain; }
/* modifica utente su due colonne: a sinistra dati e accesso, a destra profili e team */
.modal.uf-modal { width: min(1180px, calc(100vw - 32px)); }
.uf-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.uf-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
@media (max-width: 980px) { .uf-cols { grid-template-columns: 1fr; } }
/* Moduli (Utenti e permessi, Moduli) */
.mod-top { display: grid; grid-template-columns: 200px 1fr; gap: 14px; margin-bottom: 8px; }
.mod-sum { padding: 16px 18px; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.mod-sum b { font-family: "Doto", var(--font, inherit); font-size: 40px; line-height: 1; }
.mod-sum b small { font-size: 18px; color: var(--muted, #8a8f98); }
.mod-sum .badge { align-self: flex-start; font-style: normal; }
.mod-eds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mod-ed { text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 16px; border: 1.5px solid var(--line, #e6e8ee); background: var(--card, #fff); cursor: pointer; font: inherit; }
.mod-ed small { color: var(--muted, #8a8f98); line-height: 1.35; }
.mod-ed.on { border-color: var(--accent, #1b43fe); background: #f2f5ff; }
.mod-ed:disabled { cursor: default; }
.mod-gh { margin: 18px 2px 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted, #8a8f98); }
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.mod { padding: 14px 16px; border: 1.5px solid transparent; transition: border-color .15s, opacity .15s; }
.mod p { margin: 6px 0 0; line-height: 1.4; }
.mod:not(.on) { opacity: .62; }
.mod.on { border-color: color-mix(in srgb, var(--accent, #1b43fe) 25%, transparent); }
.mod.nolic { background: repeating-linear-gradient(135deg, transparent 0 8px, rgba(0,0,0,.025) 8px 16px), var(--card, #fff); }
.mod-h { display: flex; align-items: center; gap: 10px; }
.mod-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: #f2f5ff; color: var(--accent, #1b43fe); flex: none; }
.mod-ic svg { width: 18px; height: 18px; }
.mod-req { margin-top: 8px; color: var(--muted, #8a8f98); }
.mod-req.bad { color: #c2410c; }
.mod-sw { position: relative; width: 38px; height: 22px; flex: none; cursor: pointer; }
.mod-sw input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.mod-sw i { position: absolute; inset: 0; border-radius: 22px; background: #d4d7de; transition: background .15s; pointer-events: none; }
.mod-sw i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.mod-sw input:checked + i { background: var(--accent, #1b43fe); }
.mod-sw input:checked + i::after { transform: translateX(16px); }
.mod-sw input:disabled + i { opacity: .5; }
.mod-note { margin-top: 16px; }
@media (max-width: 760px) { .mod-top, .mod-eds { grid-template-columns: 1fr; } }
.mod-h b { min-width: 0; line-height: 1.25; }
.mod-h .badge { white-space: nowrap; flex: none; }

/* Panoramica con 1 o 2 numeri principali: restano nei 2/3 a sinistra (SLA 2/5, ticket 3/5) e la colonna destra sale */
.hero.hero-in { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) !important; margin-bottom: 0; }
.hero.hero-in > :only-child { grid-column: 1 / -1; }
.hero.hero-in .wide { grid-column: auto; }
.hero.hero-in .stat-card { min-height: 250px; }
@media (max-width: 760px) { .hero.hero-in { grid-template-columns: 1fr !important; } }

/* scheda ticket su telefono: un solo scorrimento (la pagina), niente riquadri che scorrono uno dentro l'altro */
@media (max-width: 860px) {
  .ws .pane, .ws .pane-body, .ws .conv, .ws .details, .ws .thread { max-height: none !important; overflow-y: visible !important; overflow-x: clip !important; min-height: 0; min-width: 0; }
  .ws.has-sel .conv { height: auto; }
  .ws.has-sel.show-details .conv > :not(.conv-head) { display: none !important; }
  .ws.has-sel.show-details .conv { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
  .ws.has-sel.show-details .details { display: flex; flex-direction: column; }
  .ws.has-sel .details .side-sec { padding: 14px 16px; }
}

/* Panoramica personalizzabile: griglia a 12 colonne, altezza a passi di 8px (incastro tipo masonry) */
.dgrid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 8px; grid-auto-flow: row; column-gap: 16px; align-items: start; }
.dwg { min-width: 0; position: relative; }
.dwg > :not(.dw-tools) { margin: 0 !important; }
.dwg > .card, .dwg > .dh-risk, .dwg > .dh-next { height: auto; }
.dwg[data-size="s"] { grid-column: span 3; } .dwg[data-size="m"] { grid-column: span 4; } .dwg[data-size="l"] { grid-column: span 6; }
.dwg[data-size="xl"] { grid-column: span 8; } .dwg[data-size="full"] { grid-column: span 12; }
.dwg .stat-card.wide { grid-column: auto; }
@media (max-width: 1100px) { .dwg[data-size="s"] { grid-column: span 6; } .dwg[data-size="m"] { grid-column: span 6; } .dwg[data-size="l"], .dwg[data-size="xl"], .dwg[data-size="full"] { grid-column: span 12; } }
@media (max-width: 760px) { .dgrid { grid-auto-rows: auto; row-gap: 14px; } .dwg { grid-column: span 12 !important; } }
.dw-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; } .dw-btn i { font-style: normal; display: inline-grid; } .dw-btn span:empty { display: none; } .dw-btn svg { width: 15px; height: 15px; } .dw-btn.on { background: var(--dark, #111318); color: #fff; border-color: transparent; }
.dgrid.editing .dwg { outline: 2px dashed #c9d2ea; outline-offset: 3px; border-radius: 18px; cursor: grab; }
.dgrid.editing .dwg > :not(.dw-tools) { pointer-events: none; user-select: none; }
.dgrid.editing .dwg.dragging { opacity: .45; }
.dw-tools { position: relative; z-index: 5; margin-bottom: 8px; display: flex; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px 6px; box-shadow: 0 6px 18px rgba(20,30,60,.12); font-size: 12px; }
.dw-tools b { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dw-tools button { border: 0; background: #f1f3f8; border-radius: 8px; min-width: 26px; height: 26px; padding: 0 7px; font: inherit; font-size: 12px; cursor: pointer; color: var(--text); flex: none; }
.dw-tools button[data-dw="del"] { color: #e5484d; font-size: 15px; }
.dw-tools .dw-size { color: var(--accent); font-weight: 600; }
.dw-grip { cursor: grab; color: var(--muted); font-size: 15px; padding: 0 2px; }
.dgrid.editing { row-gap: 0; }
.dw-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; align-items: center; padding: 14px 18px; margin-bottom: 18px; border: 1px solid #dfe5f7; }
.dw-off { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.dw-off .chip { border: 1px dashed #b9c4e6; background: #f7f9ff; color: var(--accent); cursor: pointer; padding: 6px 11px; border-radius: 999px; font: inherit; font-size: 12.5px; }
@media (max-width: 760px) { .dw-btn span { display: none; } .dw-bar { grid-template-columns: 1fr; } .dgrid.editing { row-gap: 14px; } }

/* ---------- noleggi e prestiti */
.rk { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 9px; margin-left: 4px; vertical-align: 1px; }
.rk.k-noleggio { background: #e7f6ee; color: #1f7a45; } .rk.k-prestito { background: var(--accent-2); color: var(--accent); } .rk.k-prova { background: #f1eafd; color: var(--ai); }
.rk-kpis .rk-kpi { font: inherit; text-align: left; cursor: pointer; transition: box-shadow .15s, border-color .15s; }
.rk-kpis .rk-kpi:hover { border-color: #d6dae4; } .rk-kpis .rk-kpi.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(27,67,254,.12); }
.rent-table tr.late td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.neg { color: var(--bad); } .warnc { color: var(--warn); }
.rent-law { margin-top: 10px; line-height: 1.5; }
.rk-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rk-pick button { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; border: 1.5px solid var(--line); background: #fff; border-radius: 16px; padding: 12px 14px; font: inherit; cursor: pointer; text-align: left; color: var(--text); }
.rk-pick button .ico { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--soft); color: var(--muted); margin-bottom: 4px; }
.rk-pick button small { color: var(--muted); font-size: 12px; } .rk-pick button i { font-style: normal; font-size: 11px; color: var(--faint); margin-top: 2px; }
.rk-pick button.on { border-color: var(--accent); background: #f7f9ff; } .rk-pick button.on .ico { background: var(--accent); color: #fff; }
.rf-line { display: grid; grid-template-columns: minmax(0, 1fr) 70px 160px 36px; gap: 8px; margin-bottom: 8px; }
.rent-note { background: var(--soft); border-radius: 12px; padding: 10px 12px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.rent-page { display: flex; flex-direction: column; gap: 16px; }
.rent-hero { padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; }
.rh-top { display: flex; align-items: flex-start; gap: 14px; } .rh-top h2 { margin: 6px 0 2px; font-size: 20px; letter-spacing: -.01em; }
.rh-top .btn { display: inline-flex; align-items: center; gap: 6px; }
.rh-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; color: #fff; }
.rh-ic.k-noleggio { background: var(--g-mint); } .rh-ic.k-prestito { background: var(--g-blue); } .rh-ic.k-prova { background: var(--g-violet); }
.rh-k { display: flex; gap: 6px; align-items: center; } .rh-k .rk { margin-left: 0; }
.rh-acts { display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line-2); padding-top: 14px; }
.rh-acts .btn { display: inline-flex; align-items: center; gap: 6px; }
.rh-acts .lu, .rh-top .lu { width: 16px; height: 16px; }
.rent-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.rent-grid > div { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.rent-info { padding: 6px 18px; } .rent-info > div { display: flex; flex-direction: column; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.rent-info > div:last-child { border-bottom: 0; } .rent-info small { color: var(--muted); font-size: 11.5px; } .rent-info b { font-weight: 600; }
.rent-info b small { display: block; font-weight: 400; margin-top: 1px; }
.rent-tl .ev { display: flex; gap: 10px; padding: 6px 0; } .rent-tl .ev i { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); margin-top: 5px; flex: none; }
.rent-tl .ev.k-uscita i { background: var(--accent); } .rent-tl .ev.k-rientro i { background: var(--ok); } .rent-tl .ev.k-chiusura i { background: var(--ai); }
.rent-tl .ev.k-proroga i, .rent-tl .ev.k-promemoria i { background: var(--warn); }
.rent-tl b { font-weight: 500; font-size: 13px; } .rent-tl small { display: block; color: var(--muted); font-size: 11.5px; }
.rc { display: flex; flex-direction: column; gap: 14px; }
.rc-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.rc-opts button { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; border: 1.5px solid var(--line); background: #fff; border-radius: 16px; padding: 14px; font: inherit; cursor: pointer; text-align: left; color: var(--text); position: relative; }
.rc-opts button small { color: var(--muted); font-size: 12px; line-height: 1.4; } .rc-opts button .ico { color: var(--muted); }
.rc-opts button i { position: absolute; top: 12px; right: 12px; font-style: normal; font-size: 10.5px; color: var(--ok); background: #e7f6ee; border-radius: 8px; padding: 1px 7px; }
.rc-opts button.on { border-color: var(--accent); background: #f7f9ff; } .rc-opts button.on .ico { color: var(--accent); }
.rc-warn { display: flex; gap: 8px; align-items: flex-start; background: #fff6ec; color: #9a4b00; border-radius: 12px; padding: 10px 12px; font-size: 12.5px; line-height: 1.45; margin-bottom: 8px; }
.rc-warn .lu { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.rc-lost { display: flex; gap: 8px; align-items: center; font-size: 13px; }
@media (max-width: 900px) {
  .rent-grid { grid-template-columns: 1fr; } .rk-pick { grid-template-columns: 1fr; }
  .rf-line { grid-template-columns: minmax(0, 1fr) 64px; } .rf-line [data-k="serial"] { grid-column: 1; }
  .rh-top { flex-wrap: wrap; } .rh-top .grow { display: none; }
  /* telefono: ogni pratica diventa una scheda compatta */
  .rent-table, .rent-table tbody { display: block; }
  .rent-table tr:first-child { display: none; }
  .rent-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
  .rent-table td { display: block; padding: 0 !important; border: 0 !important; min-width: 0; }
  .rent-table td:nth-child(1) { grid-column: 1 / -1; } .rent-table td:nth-child(4) { display: none; }
  .rent-table td:nth-child(2), .rent-table td:nth-child(3) { grid-column: 1 / -1; font-size: 13px; }
  .rent-table td:nth-child(5) { grid-column: 1; margin-top: 6px; } .rent-table td:nth-child(6) { grid-column: 2; margin-top: 6px; text-align: right; }
  .rent-table td:nth-child(7) { grid-column: 1 / -1; text-align: left; }
  .rent-table td:nth-child(2) b { font-weight: 600; } .rent-table td:nth-child(2) .small { display: inline; margin-left: 6px; }
  .rent-table tr.late td:first-child { box-shadow: none; } .rent-table tr.late { box-shadow: inset 3px 0 0 var(--bad); }
  .rh-ic { display: none; }
  .rent-grid .list th:nth-child(2), .rent-grid .list td:nth-child(2), .rent-grid .list th:nth-child(3), .rent-grid .list td:nth-child(3),
  .rent-grid .list th:nth-child(7), .rent-grid .list td:nth-child(7) { display: none; }
}
@media (max-width: 760px) {
  .rk-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .rk-kpis .kpi { padding: 12px; } .rk-kpis .kpi .ic { display: none; }
  .rk-kpis + .inv-st { flex-wrap: nowrap; overflow-x: auto; } .rk-kpis + .inv-st button { flex: none; }
  .rent-table + .rent-law, .rent-law { font-size: 11.5px; }
  #invTab .toolbar:has(#rentQ), .tablewrap + .rent-law { flex-wrap: wrap; }
  #invTab .toolbar:has(#rentQ) > :first-child { flex: 1 1 100%; }
}

/* ---------- formula commerciale delle offerte */
.otf { margin-top: 16px; border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; background: var(--soft); }
.otf-h { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.otf-pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.otf-pick button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; border: 1.5px solid var(--line); background: #fff; border-radius: 14px; padding: 10px 12px; font: inherit; cursor: pointer; text-align: left; color: var(--text); }
.otf-pick button small { color: var(--muted); font-size: 11.5px; line-height: 1.35; } .otf-pick button .ico { color: var(--muted); margin-bottom: 2px; }
.otf-pick button.on { border-color: var(--accent); background: #f7f9ff; } .otf-pick button.on .ico { color: var(--accent); }
.otf-par { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 12px; }
.otf-par:empty { display: none; }
.otf-par label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.otf-par input, .otf-par select { width: 130px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 13.5px; background: #fff; }
.otf-par .otf-chk { flex-direction: row; align-items: center; align-self: flex-end; padding-bottom: 8px; color: var(--text); } .otf-par .otf-chk input { width: auto; }
.otf-sum { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.otf-sum > div { background: #fff; border-radius: 12px; padding: 8px 12px; display: flex; flex-direction: column; min-width: 120px; }
.otf-sum small { color: var(--muted); font-size: 11.5px; } .otf-sum b { font-size: 16px; } .otf-sum b span { font-size: 12px; color: var(--muted); font-weight: 500; }
.otf-line { display: flex; gap: 12px; justify-content: space-between; font-size: 12.5px; padding: 5px 0; border-top: 1px dashed var(--line); } .otf-line b { white-space: nowrap; }
#otfQ .rc-warn { margin: 8px 0 0; }
.ot-set { gap: 16px; margin-bottom: 14px; }
.ot-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: 13.5px; border-top: 1px solid var(--line-2); }
.ot-row span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; }
.ot-row input { width: 90px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 9px; font: inherit; text-align: right; }
.ot-row.ot-note { flex-direction: column; align-items: stretch; } .ot-row textarea { flex: none; height: auto; min-height: 0; resize: vertical; border: 1px solid var(--line); border-radius: 10px; padding: 8px; font: inherit; font-size: 13px; }
.ot-law p { margin: 0 0 8px; line-height: 1.5; }
@media (max-width: 900px) { .otf-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* costruttore documenti Bexio: righe a griglia, percentuale applicata, stima leasing */
.dbr { margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.dbr-h, .dbr-r { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 2fr) 70px 110px 100px 30px; gap: 8px; align-items: center; padding: 8px 12px; }
.dbr-h { font-size: 11.5px; color: var(--muted); font-weight: 600; background: var(--soft); border-bottom: 1px solid var(--line-2); }
.dbr-r { border-bottom: 1px solid var(--line-2); }
.dbr-r select, .dbr-r input { width: 100%; min-width: 0; padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 13px; }
.dbr-r select:focus, .dbr-r input:focus { outline: 3px solid var(--accent-2); border-color: var(--accent); }
.dbr .num { text-align: right; }
.dbr-r b.num { font-size: 13px; }
.dbr-r .x { border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; }
.dbr-f { display: flex; align-items: center; gap: 10px; padding: 9px 12px; }
.otf-ap { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin: 2px 0 8px; }
.otf-ap b { color: var(--text); } .otf-ap .lu { width: 14px; height: 14px; }
.otf-rate input { border-style: dashed !important; }
.otf-ls { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.otf-ls-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; cursor: pointer; }
.otf-ls-h .ico .lu { width: 16px; height: 16px; color: var(--accent); }
.otf-ls-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-top: 8px; }
.otf-ls-g div { background: #fff; border: 1px solid var(--line-2); border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.otf-ls-g b { font-size: 15px; } .otf-ls-g b span { font-size: 11px; color: var(--muted); font-weight: 500; }
@media (max-width: 720px) {
  .dbr-h { display: none; }
  .dbr-r { grid-template-columns: 1fr 1fr 30px; }
  .dbr-r select, .dbr-r input[data-k="text"] { grid-column: 1 / -1; }
  .dbr-r b.num { grid-column: 1 / 3; }
}
.ot-hint { display: flex; align-items: center; gap: 8px; padding: 10px 14px; margin-bottom: 14px; border-radius: 12px; background: var(--soft); font-size: 13px; color: var(--muted); }
.ot-hint b { color: var(--text); } .ot-hint .lu { width: 16px; height: 16px; flex: none; }
.ot-row input[type="checkbox"] { width: 18px; height: 18px; }

/* noleggi: accettazione del cliente e foto dello stato */
.ra-ok, .ra-wait { display: flex; gap: 10px; align-items: flex-start; }
.ra-ok > .lu, .ra-wait > .lu { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.ra-ok > .lu { color: #0f7b4a; } .ra-wait > .lu { color: var(--muted); }
.ra-ok > div, .ra-wait > div { flex: 1; min-width: 0; } .ra-ok small, .ra-wait small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.ra-cl { margin-top: 12px; font-size: 13px; } .ra-cl summary { cursor: pointer; color: var(--muted); } .ra-cl ol { margin: 8px 0 0; padding-left: 18px; } .ra-cl li { margin-bottom: 5px; }
.rp-g + .rp-g { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.rp-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; } .rp-h small { font-size: 12px; }
.rp-h label.btn { cursor: pointer; }
.rp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.rp-grid figure { margin: 0; position: relative; } .rp-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); cursor: zoom-in; display: block; }
.rp-grid figcaption { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.3; }
.rp-grid .x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; line-height: 1; }
.rp-h label.btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
/* ---------- Posta */
.mail-ws { grid-template-columns: 360px minmax(0, 1fr) 300px; }
.mail-ws.has-sel { grid-template-columns: 360px minmax(0, 1fr) 300px; gap: 14px; }
.mail-ws.has-sel .list { display: flex; }
.mail-ws.has-sel .details { display: flex; grid-column: auto; }
.mail-acc { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; min-width: 0; }
.mail-acc b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.mail-acc select { flex: 1; min-width: 0; }
.mail-custom { margin-left: 4px; font-size: 12.5px; max-width: 150px; }
.mail-item.unread .name, .mail-item.unread .subj { font-weight: 700; }
.mail-item.unread { border-left-color: var(--accent); }
.mail-pager { display: flex; justify-content: space-between; padding: 8px 12px; border-top: 1px solid var(--line-2); }
.mail-pager:empty { display: none; }
.mail-meta { padding: 12px 18px; border-bottom: 1px solid var(--line-2); display: grid; gap: 10px; }
.mail-meta > div:first-child { display: flex; gap: 10px; align-items: flex-start; }
.mail-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.mail-img { background: #fff8db; border-radius: 10px; padding: 6px 10px; }
.mail-img a { cursor: pointer; text-decoration: underline; }
.mail-atts { display: flex; gap: 6px; flex-wrap: wrap; }
.mail-atts .chip small { color: var(--muted); margin-left: 4px; }
.mail-body { flex: 1; min-height: 0; display: flex; padding: 6px 14px 14px; }
.mail-body iframe { flex: 1; width: 100%; min-height: 360px; border: 0; background: #fff; }
.mail-link-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.mail-warn { background: #fff1f0; border: 1px solid #f5c2c0; border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; display: flex; gap: 10px; align-items: center; }
.mail-empty { max-width: 640px; margin: 40px auto; padding: 28px 30px; }
.mail-empty h2 { margin-top: 0; }
.mail-prov { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0; }
.mail-prov .btn { display: inline-flex; align-items: center; gap: 8px; }
.int-ico.sm { width: 22px; height: 22px; border-radius: 6px; font-size: 12px; }
.mail-rules { padding-left: 18px; line-height: 1.6; }
.mail-compose .full { grid-column: 1 / -1; }
@media (max-width: 1280px) {
  .mail-ws, .mail-ws.has-sel { grid-template-columns: 320px minmax(0, 1fr); }
  .mail-ws .details, .mail-ws.has-sel .details { display: none; }
  .mail-ws.show-details .details { display: flex; grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .mail-ws, .mail-ws.has-sel { grid-template-columns: 1fr; }
  .mail-ws.has-sel .list { display: none; }
  .mail-ws:not(.has-sel) .conv { display: none; }
  .mail-body iframe { min-height: 60vh; }
}
.mail-ws .rel .t { display: block; }
.mail-ws .rel .badge { flex: none; }
.mail-shared { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; margin: 8px 0; border-radius: 12px; background: var(--bg); }
.mail-shared select.sm { padding: 4px 8px; font-size: 12px; border-radius: 8px; max-width: 160px; }
.mail-sig { padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; font-size: 13px; background: var(--panel); }
.mail-sig p { margin: 0; }
.mail-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; max-height: 140px; overflow: auto; padding: 4px 0; }
.field input[type="checkbox"], .field input[type="radio"] { width: auto; padding: 0; margin: 0 6px 0 0; vertical-align: -2px; }
.mail-checks label { display: inline-flex; align-items: center; margin: 0; }
.sig-modal .modal, .sig-modal { }
.sig-ed { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.sig-prev { position: sticky; top: 0; }
.sig-mailmock { margin-top: 6px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow-x: auto; }
.sig-mailtxt { font: 14px/1.5 Arial, sans-serif; color: #1d2433; margin-bottom: 18px; }
.sig-layouts { display: flex; gap: 8px; flex-wrap: wrap; }
.sig-layouts .chip { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.sig-up { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sig-up input[type="file"] { width: auto; }
.field input[type="color"] { height: 38px; padding: 3px; }
.sig-ban img { max-width: 100%; border-radius: 10px; margin-top: 8px; }
.sig-thumb { height: 32px; border-radius: 6px; vertical-align: middle; margin-right: 8px; }
@media (max-width: 900px) { .sig-ed { grid-template-columns: 1fr; } .sig-prev { position: static; } }
.sig-modal .modal.wide { max-width: 1120px; width: 96vw; }

.mail-split { position: relative; display: flex; gap: 6px; }
.mail-split #mCreate { flex: 1; }
.mail-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 170px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(17,19,24,.12); padding: 6px; display: flex; flex-direction: column; }
.mail-menu[hidden] { display: none; }
.mail-menu button { text-align: left; padding: 8px 10px; border: 0; background: none; border-radius: 8px; cursor: pointer; font: inherit; }
.mail-menu button:hover { background: var(--bg); }
.mail-why { margin-top: 6px; }
.mail-add-row { display: flex; gap: 6px; margin-top: 8px; }
.mail-add-row input { flex: 1; min-width: 0; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; }
#mSideBody select { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.ic-feat { display: grid; gap: 14px; margin-bottom: 16px; } .ic-feat > .card { margin: 0 !important; }
/* firme */
.sg-panel { display: grid; gap: 12px; }
.sg-panel .card { padding: 14px; }
.sg-panel ul { margin: 6px 0 0; padding-left: 18px; }
.sg-warn { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: #fff1f0; color: #a8071a; }
.sg-mode { display: grid; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line, #e5e8ef); }
.sg-mode .row { gap: 6px; }
.sig-otp .row { display: flex; gap: 8px; }
.sig-otp .row input { flex: 1; }
.sg-mode #qReason { padding: 9px 12px; border: 1px solid var(--line, #dfe3ea); border-radius: 10px; font: inherit; }
.sg-wf { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.sg-wf label { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.ag-mail-p { display: flex; flex-direction: column; border: 1px solid var(--line, #e6e8ee); border-radius: 14px; overflow: hidden; background: #f3f4f7; }
.ag-mail-ph { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #fff; border-bottom: 1px solid var(--line, #e6e8ee); font-size: 13px; }
.ag-mail-p iframe { flex: 1; width: 100%; border: 0; min-height: 500px; }
.ag-mail-ph .seg { margin: -2px 0; } .ag-mail-ph .seg button { padding: 3px 10px; font-size: 12px; white-space: nowrap; }
.sg-mail { display: grid; gap: 6px; margin: 4px 0 8px; }
.sg-mail .row { display: flex; align-items: center; gap: 8px; }
.sg-mail .seg button { padding: 4px 12px; font-size: 12px; white-space: nowrap; }
.sg-mail .seg { flex: 0 0 auto; }
.sg-prev iframe { min-height: 560px; }

/* offerte online ai lead (editor nella scheda lead) */
.note { background: var(--soft); border-radius: 12px; padding: 10px 12px; font-size: 13px; line-height: 1.5; }
.note.ok { background: #e7f6ee; color: #14532d; }
.ofl-items input { width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.ofl-items input.small { margin-top: 4px; font-size: 12px; color: var(--muted); }
.ofl-items td { vertical-align: top; }
#oflProd { margin: 4px 0; } #oflProd .chip { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; padding: 5px 12px; }
#oflBlocks .doc { display: flex; gap: 10px; align-items: center; }
/* documenti in arrivo */
.inb-drop { margin-bottom: 16px; border-style: dashed; transition: background .15s, border-color .15s; }
.inb-drop.over { background: var(--accent-2); border-color: var(--accent); }
.inb-drop-in { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-top: 12px; }
.inb-drop-in > .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-2); color: var(--accent); }
.inb-doc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; align-items: start; }
.inb-prev { position: sticky; top: 12px; max-height: calc(100vh - 120px); overflow: auto; }
.inb-prev img { width: 100%; display: block; border: 1px solid var(--line); border-radius: 6px; margin: 10px 0; background: #fff; }
.inb-text { white-space: pre-wrap; font-size: 12.5px; max-height: 70vh; overflow: auto; }
.inb-hash { word-break: break-all; }
.inb-side { display: grid; gap: 14px; min-width: 0; }
.inb-checks .chk { padding: 8px 12px; border-radius: 10px; margin: 6px 0; font-size: 13px; background: var(--accent-2); }
.inb-checks .chk.warn { background: #fff1e6; color: #8a4b00; } .inb-checks .chk.bad { background: #fdecec; color: var(--bad); }
.inb-res { margin: 0 0 8px; padding-left: 18px; } .inb-res li { margin: 3px 0; }
.cdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--line); vertical-align: 1px; }
.cdot.ok { background: var(--ok); } .cdot.warn { background: var(--warn); } .cdot.bad { background: var(--bad); }
.inb-new { margin-top: 6px; }
.inb-lines input, .inb-lines select { width: 100%; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; margin: 2px 0; font: inherit; }
.inb-lines td { vertical-align: top; } .inb-lines td.num input { width: 80px; text-align: right; }
.inb-actions { display: flex; gap: 8px; align-items: center; }
.inb-log summary { padding: 12px 20px; cursor: pointer; font-weight: 600; }
.bad-t { color: var(--bad); }
@media (max-width: 980px) { .inb-doc { grid-template-columns: 1fr; } .inb-prev { position: static; max-height: none; } }
.sel-sm { padding: 5px 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); font: inherit; max-width: 260px; }

/* divisione di un PDF con più documenti */
.inb-split { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; max-height: 62vh; overflow: auto; padding: 4px; }
.inb-pg { border: 2px solid var(--line, #e5e7eb); border-radius: 10px; padding: 8px; display: grid; gap: 6px; background: var(--card, #fff); }
.inb-pg img { width: 100%; border-radius: 6px; border: 1px solid var(--line, #e5e7eb); }
.inb-pg.nuovo { border-color: var(--accent, #6366f1); box-shadow: inset 4px 0 0 var(--accent, #6366f1); }
.inb-pg.escludi { opacity: .45; }
#inbSplitSum { margin-top: 10px; }
.inb-priv { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; margin-right: 8px; cursor: pointer; }
.inb-pg { min-width: 0; }
.inb-pg select { width: 100%; min-width: 0; }
.badge.dark { background: #1f2937; color: #fff; }
/* ---------- report */
.rpt-head .tabs { margin-bottom: 12px; }
.rpt-filters { margin-bottom: 10px; }
.rpt-filters input[type=date] { padding: 6px 10px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }
.rpt-kpis { margin-top: 6px; }
.rpt-kpis .kpi.click { cursor: pointer; }
.rpt-kpis .kpi .d { display: block; margin: 2px 0 0; }
.rpt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-bottom: 18px; }
.rpt-chart.wide { grid-column: 1 / -1; }
.rb-row { display: grid; grid-template-columns: minmax(80px, 30%) 1fr 96px; font-variant-numeric: tabular-nums; gap: 10px; align-items: center; padding: 4px 0; font-size: 13px; }
.rb-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.rb-t { height: 8px; border-radius: 6px; background: var(--line-2); overflow: hidden; }
.rb-t i { display: block; height: 100%; border-radius: 6px; }
.rpt-svg { width: 100%; height: auto; }
.rpt-svg text { font-size: 10px; fill: var(--muted); }
.rpt-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.rpt-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.rpt-line { padding: 6px 0 10px; }
.rpt-table { margin-bottom: 16px; }
.rpt-table td.num, .rpt-table th.num { text-align: right; }
.rpt-note { padding: 0 20px 14px; margin: 6px 0 0; }
@media (max-width: 700px) { .rpt-filters .period { overflow-x: auto; max-width: 100%; } .rb-row { grid-template-columns: 34% 1fr 84px; } }
.rpt-svg { max-height: 260px; }
.rb-row b { text-align: right; }
.rpt-svg text.tot { font-size: 10.5px; font-weight: 600; fill: var(--text); }
.rpt-svg text.on { fill: var(--accent); font-weight: 600; }
/* pannello telefono 3CX: chiamate in corso */
#phoneDock { position: fixed; right: 18px; bottom: 90px; z-index: 60; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); }
#phoneDock[hidden] { display: none; }
.ph-call { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(17, 19, 24, .16); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.ph-call.ring { border-color: var(--accent); }
.ph-who { display: flex; gap: 10px; align-items: flex-start; }
.ph-who > div { display: flex; flex-direction: column; min-width: 0; }
.ph-who small { color: var(--muted); font-size: 12px; }
.ph-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); margin-top: 5px; flex: none; }
.ph-call.ring .ph-dot { background: var(--accent); animation: phbeevo 1s infinite; }
@keyframes phbeevo { 50% { opacity: .3; transform: scale(1.4); } }
.ph-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.call-tx { margin: 2px 0 8px; font-size: 13px; }
.call-tx summary { cursor: pointer; color: var(--muted); }
.call-tx p { white-space: pre-wrap; margin: 6px 0 0; }
@media (max-width: 720px) { #phoneDock { right: 16px; bottom: 150px; } }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }

/* rivedi e approva i task trovati nelle chiamate */
.rv-head { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.rv-head h2 { margin: 4px 0 0; font-size: 26px; letter-spacing: -.01em; }
.rv-banner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--dark); color: #fff; border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px; }
.rv-banner > div > div { color: #b7bcc6; font-size: 13px; margin-top: 4px; }
.rv-spark { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 20px; color: #fff; background: var(--g-violet); flex: none; }
.rv-spark.sm { width: 32px; height: 32px; border-radius: 10px; font-size: 15px; }
.rv-stats { display: flex; gap: 8px; }
.rv-stats span { background: rgba(255,255,255,.08); border-radius: 12px; padding: 8px 12px; font-size: 11.5px; color: #b7bcc6; display: flex; flex-direction: column; }
.rv-stats b { color: #fff; font-size: 16px; }
.rv-sum ul { margin: 0; padding-left: 18px; } .rv-sum li { margin: 3px 0; }
.rv-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; margin-top: 14px; }
.rv-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.rv-f { margin: 0; flex: none; } .rv-f i { font-style: normal; font-size: 11px; background: rgba(127,127,127,.18); border-radius: 10px; padding: 1px 7px; margin-left: 4px; }
.rv-list { display: flex; flex-direction: column; gap: 8px; }
.rv-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 150px 120px 92px auto; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; cursor: pointer; }
.rv-row.on { border-color: var(--dark); box-shadow: 0 0 0 1px var(--dark); }
.rv-row.done { opacity: .6; }
.rv-ck { width: 26px; height: 26px; border-radius: 8px; border: 1.5px solid var(--line); background: #fff; color: transparent; cursor: pointer; font-weight: 700; }
.rv-ck.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.rv-st { width: 26px; text-align: center; color: var(--muted); }
.rv-t { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rv-t b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-t small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-own { display: flex; align-items: center; gap: 8px; font-size: 13px; min-width: 0; } .rv-own span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-q { background: #c9ccd3 !important; }
.rv-date { font-size: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 4px 8px; white-space: nowrap; text-align: center; }
.rv-date.warn { background: #fff4e6; border-color: #fde2bf; color: #b45309; }
.rv-conf { font-size: 11.5px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; } .rv-conf b { color: var(--text); }
.rv-conf i { height: 3px; border-radius: 3px; background: var(--line); position: relative; overflow: hidden; }
.rv-conf i::after { content: ""; position: absolute; inset: 0; width: var(--w); background: var(--ok); border-radius: 3px; }
.rv-conf.mid i::after { background: var(--p3); } .rv-conf.lo i::after { background: var(--warn); }
.rv-add { border: 1.5px dashed var(--line); border-radius: 16px; padding: 14px; color: var(--muted); cursor: pointer; }
.rv-add:hover { color: var(--text); border-color: var(--faint); }
.rv-det { position: sticky; top: 12px; } .rv-det .field { margin-bottom: 10px; } .rv-det input, .rv-det select { width: 100%; }
.rv-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rv-det label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 5px; }
.rv-heard { background: var(--accent-2); border-radius: 14px; padding: 12px 14px; margin: 6px 0 12px; }
.rv-heard p { font-size: 16px; font-style: italic; margin: 2px 0 10px; line-height: 1.35; }
.rv-after .rv-tg { display: flex; gap: 10px; align-items: flex-start; text-transform: none; letter-spacing: 0; color: var(--text); font-size: 13px; cursor: pointer; }
.rv-tg small { display: block; color: var(--muted); }
.rv-fu { white-space: pre-wrap; font-size: 13px; background: var(--soft); border-radius: 12px; padding: 10px 12px; }
.rv-foot { position: sticky; bottom: 76px; margin-top: 16px; display: flex; align-items: center; gap: 12px; background: var(--dark); color: #fff; border-radius: 18px; padding: 12px 14px 12px 18px; box-shadow: 0 10px 30px rgba(17,19,24,.2); }
.rv-foot small { display: block; color: #b7bcc6; }
.rv-foot .btn:not(.accent):not(.primary) { color: var(--text); }
.btn.accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.rv-strip { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.rv-pend { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; cursor: pointer; }
.rv-pend small { display: block; color: var(--muted); }
.rv-link { margin-left: 6px; }
@media (max-width: 1100px) { .rv-grid { grid-template-columns: 1fr; } .rv-det { position: static; } }
@media (max-width: 720px) { .rv-row { grid-template-columns: 28px minmax(0, 1fr); } .rv-row > :nth-child(n+3) { grid-column: 2; } .rv-stats { width: 100%; } }
.rv-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.rv-steps div { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; color: var(--muted); }
.rv-steps span { font-family: ui-monospace, monospace; font-size: 12px; } .rv-steps b { color: var(--text); font-size: 14px; } .rv-steps small { font-size: 11.5px; }
.rv-steps .ok { background: var(--accent-2); border-color: transparent; } .rv-steps .now { background: var(--dark); border-color: var(--dark); color: #b7bcc6; } .rv-steps .now b { color: #fff; }
.rv-tone { margin: 8px 0; } .rv-tone button.on { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
@media (max-width: 720px) { .rv-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rv-det .rv-tg input { width: auto; margin-top: 3px; flex: none; }

/* telefono: bacheca code, presenza, minuti, picchetto */
.ph-board { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; }
.ph-qs { display: flex; flex-wrap: wrap; gap: 8px; }
.ph-q { display: flex; flex-direction: column; min-width: 92px; padding: 8px 12px; border-radius: 12px; background: var(--soft); }
.ph-q b { font-size: 20px; line-height: 1.1; } .ph-q small { color: var(--muted); font-size: 11.5px; }
.ph-q.busy { background: var(--accent-2); } .ph-q.bad { background: #fde8e8; } .ph-q.bad b { color: var(--bad); }
.ph-ppl { display: flex; flex-wrap: wrap; gap: 6px; }
.ph-p { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 5px 10px; border-radius: 20px; background: var(--soft); }
.ph-p i, .ph-dot2 { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); display: inline-block; margin-right: 4px; }
.ph-p.free i, .ph-dot2.free { background: var(--ok); } .ph-p.on i, .ph-dot2.on { background: var(--bad); }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; margin-bottom: 14px; }
.ph-grid:empty { display: none; }
.ph-tp { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.ph-tp small { display: block; color: var(--muted); } .ph-tp .ph-min { width: 64px; }
.ph-oc-now { padding: 8px 12px; background: var(--accent-2); border-radius: 12px; margin-bottom: 8px; }

/* telefonia: pagina Chiamate a schede (spunto 17.11, grafica Beevo) */
.ph-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.ph-tabs { max-width: 620px; flex: 1 1 420px; }
.ph-month { font: inherit; padding: 7px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.ph-over { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: 14px; margin-bottom: 14px; }
.ph-feat { padding: 18px; display: flex; flex-direction: column; gap: 12px; background: linear-gradient(160deg, #eef1ff 0%, #ffffff 55%); }
.ph-feat-h { display: flex; align-items: center; gap: 8px; }
.ph-num { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 3px 8px; }
.ph-who { display: flex; align-items: center; gap: 12px; } .ph-who b { display: block; font-size: 17px; } .ph-who small { color: var(--muted); }
.ph-sent { display: flex; gap: 8px; }
.ph-sent span { flex: 1; text-align: center; font-size: 12px; padding: 7px 0; border-radius: 12px; background: var(--soft); color: var(--muted); text-transform: capitalize; }
.ph-sent span.on.positivo { background: #e3f6ea; color: var(--ok); font-weight: 600; }
.ph-sent span.on.neutro { background: #eef1f6; color: var(--text); font-weight: 600; }
.ph-sent span.on.negativo { background: #fde8e8; color: var(--bad); font-weight: 600; }
.ph-tl-bar { position: relative; height: 34px; border-radius: 12px; background: linear-gradient(90deg, var(--accent-2), #f4f6fb); }
.ph-tl-bar i { position: absolute; top: 6px; width: 4px; height: 22px; border-radius: 3px; background: var(--accent); }
.ph-tl-l { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }
.ph-audio { width: 100%; height: 36px; }
.ph-pts { margin: 0; padding-left: 18px; font-size: 13px; display: grid; gap: 4px; }
.ph-hist { display: flex; flex-direction: column; gap: 4px; font-size: 12px; } .ph-h { color: var(--muted); }
.ph-feat-a { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.ph-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; align-content: start; }
.ph-k { padding: 16px; display: flex; flex-direction: column; gap: 4px; position: relative; }
.ph-k.wide { grid-column: span 2; }
.ph-k > span { font-size: 13px; color: var(--muted); }
.ph-k > b { font-size: 30px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; } .ph-k > b em { font-style: normal; font-size: 14px; color: var(--muted); margin-left: 3px; font-weight: 500; }
.ph-k small { color: var(--muted); font-size: 11.5px; } .ph-k .lchart { margin-top: 4px; }
.ph-d { position: absolute; top: 16px; right: 16px; font-size: 11.5px; padding: 2px 7px; border-radius: 8px; background: var(--soft); color: var(--muted); }
.ph-d.up { background: #e3f6ea; color: var(--ok); } .ph-d.down { background: #fde8e8; color: var(--bad); }
.ph-ratio { height: 8px; border-radius: 6px; background: var(--accent-2); overflow: hidden; margin: 6px 0 2px; } .ph-ratio i { display: block; height: 100%; background: var(--accent); }
.ph-bar { display: grid; grid-template-columns: 110px 1fr 64px; align-items: center; gap: 8px; font-size: 12.5px; margin-top: 4px; }
.ph-bar i { height: 8px; border-radius: 6px; background: var(--soft); overflow: hidden; } .ph-bar b { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.ph-bar em { font-style: normal; color: var(--muted); text-align: right; }
.ph-sbar { display: flex; height: 12px; border-radius: 8px; overflow: hidden; background: var(--soft); margin: 8px 0 4px; }
.ph-sbar .pos { background: var(--ok); } .ph-sbar .neu { background: #c9cfdc; } .ph-sbar .neg { background: var(--bad); }
.ph-dial-w { display: flex; justify-content: center; }
.ph-dial { width: 100%; max-width: 380px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.ph-dnum { font-size: 24px; text-align: center; padding: 12px; border-radius: 14px; }
.ph-who-res { min-height: 20px; text-align: center; }
.ph-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ph-keys button { font: inherit; font-size: 20px; padding: 14px 0; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; }
.ph-keys button:hover { background: var(--accent-2); }
.ph-dial-a { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 900px) { .ph-over { grid-template-columns: 1fr; } .ph-k.wide { grid-column: auto; } }
.ph-grid > .card { min-width: 0; }
@media (max-width: 700px) { .ph-tabs { overflow-x: auto; flex-basis: 100%; } .ph-tabs button { flex: none; } }

/* ---------------------------------------------------------------- campi (18.11)
   Stile Beevo per tutti i campi: bordo chiaro, angoli 12px, anello azzurro al focus, menu a tendina con chevron a linea.
   :where() ha specificità zero: vale per ogni campo, e i componenti con uno stile loro (ricerca, chat, editor) lo sovrascrivono.
   I campi senza bordo (titolo del ticket, ricerche, chat) non prendono l'anello al focus né gli angoli. */
:root { --field-line: #dfe2e8; --field-hover: #c7ccd6; --field-ring: color-mix(in srgb, var(--accent) 16%, transparent); --field-off: #f6f7f9; }
:where(input:not([type=checkbox], [type=radio], [type=range], [type=color], [type=file], [type=submit], [type=button], [type=reset], [type=hidden], [type=image]), select, textarea) {
  font: inherit; font-size: 14px; line-height: 1.4; color: var(--text); background-color: #fff;
  border: 1px solid var(--field-line); border-radius: 12px; padding: 9px 12px; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
:where(input:not([type=checkbox], [type=radio], [type=range], [type=color], [type=file]), select, textarea):hover { border-color: var(--field-hover); }
:where(input:not([type=checkbox], [type=radio], [type=range], [type=color], [type=file]), select, textarea):focus-visible,
:where(input:not([type=checkbox], [type=radio], [type=range], [type=color], [type=file]), select, textarea):focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--field-ring); outline: none; }
:where(input, select, textarea):disabled { background-color: var(--field-off); color: var(--muted); cursor: not-allowed; }
:where(input, select, textarea)[aria-invalid="true"], :where(input, textarea):user-invalid { border-color: var(--bad); }
:where(textarea) { resize: vertical; }
/* campi senza bordo dentro un componente: niente anello né angoli, il componente decide */
:is(.agent-card input, .box textarea, .nt-subject, .fe-ai input, .kb-ask input, .dh-ask input, .ck-in input, .scanf input, .ci-step input, .ag-left .ag-paper textarea, .ic-search input, .search input):is(:focus, :focus-visible, :hover) { box-shadow: none; }
.nt-subject { border-radius: 0; }
/* menu a tendina: niente freccia del sistema, chevron Lucide al suo posto (resta anche se il componente cambia lo sfondo) */
select:not([multiple]):not([size]) {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c818c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: right 10px center !important; background-size: 15px 15px !important;
  padding-right: 32px !important; text-overflow: ellipsis;
}
select:not([multiple]):not([size]):focus { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233d63dd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important; }
/* campi dei moduli (.field): stessi valori del resto, con etichetta sopra */
.field input:not([type=checkbox], [type=radio], [type=color]), .field select, .field textarea { padding: 9px 12px; border: 1px solid var(--field-line); border-radius: 12px; }
.field input:not([type=checkbox], [type=radio], [type=color]):hover, .field select:hover, .field textarea:hover { border-color: var(--field-hover); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--field-ring); }
/* barre di filtro: restano a pillola ma con lo stesso bordo e lo stesso focus */
.toolbar select, .toolbar input, .pane-tools select, .pane-tools input { border-color: var(--field-line); }
/* Domini: aggiunta con etichette, una riga su schermi larghi */
.dom-add { display: grid; grid-template-columns: minmax(0, 1fr) 210px 190px auto; gap: 10px; align-items: end; }
.dom-add .field { margin: 0; } .dom-add .field > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; font-weight: 500; }
.dom-add select { max-width: none; } .dom-add .btn { height: 37px; padding-block: 0; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.dom-add .btn .lu, .dom-card .badge .lu, .dom-card .btn .lu { width: 14px; height: 14px; }
.dom-card .badge { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; }
.dom-l { background: #fff4e5; color: #b4580a; }
.dom-h .dom-sel { width: auto; max-width: 190px; padding-top: 6px; padding-bottom: 6px; font-size: 13px; }
@media (max-width: 900px) { .dom-add { grid-template-columns: 1fr 1fr; } .dom-add .dom-f-host, .dom-add .btn { grid-column: 1 / -1; } }

/* chiamanti al centralino (pannello interno) */
.ca-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; }
.ca-side { display: grid; gap: 14px; align-content: start; }
@media (max-width: 900px) { .ca-grid { grid-template-columns: 1fr; } }
.ca-call { padding: 10px 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.ca-call:last-child { border-bottom: 0; } .ca-call.ended { opacity: .6; }
.ca-call .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ca-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.ca-sec { margin-top: 12px; display: grid; gap: 4px; }
.ca-big { font-size: 32px; letter-spacing: .2em; font-weight: 700; text-align: center; }
.ca-dock { display: block; margin-top: 2px; }

/* chiamanti nella scheda cliente e Lightspeed dei clienti */
.ph-head .btn { display: inline-flex; align-items: center; gap: 6px; }
.ph-head .btn svg, .ca-acts .btn svg, .toolbar .btn svg, .ls-sub .btn svg, header .btn svg { width: 15px; height: 15px; flex: none; }
.ca-acts .btn, .toolbar .btn, header .btn.sm, .ls-sub .btn { display: inline-flex; align-items: center; gap: 6px; }
.ca-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.ca-mini div { background: var(--bg-soft, #f4f5f7); border-radius: 12px; padding: 8px 10px; display: grid; }
.ca-mini b { font-size: 20px; } .ca-mini span { font-size: 12px; color: var(--muted); }
.ca-num { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
#caCust { width: 100%; }
.ca-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 14px; }
.ca-k { padding: 16px 18px; display: grid; gap: 2px; }
.ca-k svg { width: 20px; height: 20px; color: var(--accent, #3b5bfd); margin-bottom: 6px; }
.ca-k small { color: var(--muted); } .ca-k b { font-size: 26px; line-height: 1.1; } .ca-k span { font-size: 12px; color: var(--muted); }
.ca-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 14px; align-items: start; }
.ca-main { display: grid; gap: 14px; }
@media (max-width: 1000px) { .ca-cols { grid-template-columns: 1fr; } }
.card > header svg { width: 17px; height: 17px; vertical-align: -3px; margin-right: 4px; }
.ca-line { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ca-line:last-child { border-bottom: 0; } .ca-t { min-width: 110px; }
.ca-attn { border: 2px solid var(--accent, #3b5bfd); }
.ca-code { font-size: 26px; letter-spacing: .25em; font-weight: 700; padding: 6px 0; }
.ca-log { max-height: 340px; overflow: auto; display: grid; gap: 4px; }
.tablewrap.flat { box-shadow: none; border: 0; margin: 0; }
.ls-bo { overflow: hidden; } .ls-bo.off, .ls-loc.off { opacity: .6; }
.ls-bo > header { gap: 10px; flex-wrap: wrap; }
.ls-plat { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 4px 10px; border-radius: 999px; background: linear-gradient(135deg, #3b5bfd, #9b5cf6); color: #fff; }
.ls-locs { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; padding: 0 16px 16px; }
.ls-loc { border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: grid; gap: 6px; align-content: start; background: var(--card, #fff); }
.ls-loc-h { display: flex; align-items: flex-start; gap: 8px; }
.ls-sub { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.ls-sub span { display: inline-flex; gap: 6px; align-items: center; } .ls-sub svg { width: 14px; height: 14px; }
.ls-pos, .ls-lic, .ls-um { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ls-pos:last-child, .ls-lic:last-child, .ls-um:last-child { border-bottom: 0; }
.ls-pk { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--bg-soft, #f1f3f9); flex: none; }
.ls-pk svg { width: 18px; height: 18px; }
.ls-reg { color: var(--warn, #c77700); display: flex; gap: 6px; align-items: center; } .ls-reg svg { width: 14px; height: 14px; }
.ls-trk-h { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 14px; }
.ls-trk-h div { background: var(--bg-soft, #f4f5f7); border-radius: 12px; padding: 10px 12px; display: grid; } .ls-trk-h small { color: var(--muted); }
.ls-tl { border-left: 2px solid var(--line); margin-left: 6px; padding-left: 16px; display: grid; gap: 12px; }
.ls-tl > div { position: relative; } .ls-tl i { position: absolute; left: -23px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent, #3b5bfd); border: 2px solid #fff; }
.btn:has(> svg.lu) { display: inline-flex; align-items: center; gap: 6px; } .btn > svg.lu { width: 15px; height: 15px; flex: none; }
/* Impostazioni > Profilo e preferenze */
.me-set .card .body > p:last-child { margin-bottom: 0; }
.me-id { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.me-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.me-acts .btn { display: inline-flex; align-items: center; gap: 6px; } .me-acts .btn .lu { width: 15px; height: 15px; }
.me-set .field > .me-l { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; font-weight: 500; }

/* ------------------------------------------------------------------ loghi dei fornitori terzi (static/vendor-logos.js)
   Il logo ufficiale si scala solo in proporzione (object-fit: contain), su fondo bianco e con spazio libero attorno,
   come chiedono le linee guida dei fornitori: mai ricolorato, tagliato o deformato. */
.vendor-logo { display: inline-block; width: 24px; height: 24px; object-fit: contain; flex: none; vertical-align: middle; user-select: none; }
.vendor-logo.wide { width: auto; max-width: 72px; height: 16px; }
.vendor-logo.vendor-name { width: auto; height: auto; font-size: 11px; font-weight: 700; color: #3a404c; letter-spacing: -.01em; white-space: nowrap; line-height: 1; }
.vendor-set { display: inline-flex; align-items: center; gap: 7px; }
.vendor-set.n2 .vendor-logo:not(.wide):not(.vendor-name) { width: 20px; height: 20px; }
.ic-ico.vendor { background: #fff; border: 1px solid var(--line); width: auto; min-width: 44px; padding: 0 10px; }
.ic-card.soon .ic-ico.vendor { background: #fff; }
.ic-card.soon .ic-ico.vendor .vendor-logo:not(.vendor-name) { filter: grayscale(1); opacity: .55; }
.ic-card.soon:hover .ic-ico.vendor .vendor-logo { filter: none; opacity: 1; }
.int-ico.m365-ico .vendor-logo { width: 22px; height: 22px; }
img.sso-ico.vendor-logo { width: 34px; height: 34px; border-radius: 10px; box-sizing: border-box; padding: 7px; background: #fff; border: 1px solid var(--line); object-fit: contain; }
.sso-btn img.sso-ico.vendor-logo { width: 20px; height: 20px; padding: 0; border: 0; border-radius: 0; background: none; }
td img.sso-ico.vendor-logo { width: 22px; height: 22px; padding: 3px; }
.nav a .ico.has-vendor { display: inline-grid; place-items: center; }
.nav a .ico .vendor-logo { width: 16px; height: 16px; }
.mod-vendors { display: inline-flex; align-items: center; padding: 4px 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.mod-vendors .vendor-logo { width: 18px; height: 18px; } .mod-vendors .vendor-logo.wide { width: auto; height: 13px; max-width: 54px; }
.vendor-title { display: inline-flex; align-items: center; gap: 10px; } .vendor-title .vendor-logo { width: 22px; height: 22px; }
.vendor-row { display: flex; align-items: center; gap: 10px; } .vendor-row .vendor-logo.wide { height: 18px; max-width: 96px; }
.vendor-note { margin-top: 16px; } .vendor-note > summary { display: flex; align-items: center; gap: 8px; padding: 14px 18px; cursor: pointer; list-style: none; font-weight: 600; }
.vendor-note > summary::-webkit-details-marker { display: none; } .vendor-note > summary small { font-weight: 400; margin-left: auto; }
.vendor-note > summary svg.lu { width: 16px; height: 16px; color: var(--muted); }
.vendor-list td:first-child { width: 90px; text-align: center; } .vendor-list .vendor-logo.wide { height: 14px; }
.int-ico.vendor-chip { background: #fff; } .int-ico.vendor-chip .vendor-logo { width: 14px; height: 14px; }
.ic-card.ic-ext .int-ico.ic-ico.vendor { width: auto; }
/* riquadro quadrato anche per i marchi denominativi (3CX, NinjaOne): il logo si rimpicciolisce, non si taglia */
.ic-ico.vendor:has(> .vendor-set.n1) { width: 44px; min-width: 44px; padding: 0 5px; }
.ic-ico.vendor .vendor-set.n1 .vendor-logo.wide { width: 100%; max-width: 34px; height: auto; max-height: 20px; }
.ic-ico.vendor > .vendor-logo.wide { width: 34px; height: auto; max-height: 20px; }
.int-card .int-ico.ic-ico.vendor { width: 44px; height: 44px; padding: 0; background: #fff; border: 1px solid var(--line); }
.int-card .int-ico.ic-ico.vendor .vendor-logo { width: 24px; height: 24px; }
.badge.lsc { background: #fff1ec; color: #b4500f; cursor: pointer; }
/* ---------- dispositivi: seriali, sede e password in 1Password */
.as-key { display: inline-flex; vertical-align: -2px; color: #1a8cff; } .as-key .lu { width: 14px; height: 14px; }
.as-site { display: flex; align-items: center; gap: 3px; margin-top: 2px; } .as-site .lu { width: 12px; height: 12px; }
.kv dd .lu { width: 14px; height: 14px; vertical-align: -2px; }
.as-copy { border: 0; background: transparent; padding: 2px 4px; border-radius: 6px; color: var(--muted); cursor: pointer; vertical-align: middle; }
.as-copy:hover { background: var(--soft); color: var(--text); } .as-copy .lu { width: 14px; height: 14px; }
.as-dup { border: 1px solid #f5c48f; background: #fff7ed; border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px; display: grid; gap: 4px; }
.as-dup b { display: flex; gap: 6px; align-items: center; color: var(--warn); } .as-dup .lu { width: 15px; height: 15px; }
.as-op, .as-acc { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; background: linear-gradient(180deg, #f5f9ff 0%, #fff 70%); display: grid; gap: 10px; }
.as-op.off { display: flex; gap: 10px; align-items: flex-start; background: var(--soft); }
.as-op-h { display: flex; align-items: center; gap: 8px; } .as-op-h .lu { width: 16px; height: 16px; color: #1a8cff; }
.as-op-h .btn .lu { color: inherit; }
.as-op-f { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.as-acc { margin-bottom: 16px; }
.as-cred { grid-template-columns: 90px 1fr; } .as-cred dd { display: flex; align-items: center; gap: 4px; }
.as-pw { background: var(--soft); border-radius: 6px; padding: 1px 6px; letter-spacing: .02em; }
.as-acc-f { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .as-acc-f .small .lu { width: 13px; height: 13px; vertical-align: -2px; color: var(--ok); }
.as-log:empty { display: none; }
.op-logo { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: #1a8cff; color: #fff; vertical-align: middle; margin-right: 4px; }
.op-logo .lu { width: 15px; height: 15px; }
.op-set { display: grid; gap: 12px; } .op-help { background: var(--soft); border-radius: var(--radius-sm); padding: 10px 12px; line-height: 1.55; }
.op-st .bad-t, .bad-t { color: var(--bad); } .warn-t { color: var(--warn); } .op-h4 { margin: 6px 0 8px; }
.op-vt select, .op-it select { width: 100%; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.op-hero { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 20px; }
.op-hero-l { display: flex; gap: 14px; align-items: flex-start; flex: 1 1 320px; } .op-hero-l h2 { margin: 0 0 4px; font-size: 18px; }
.op-hero .op-logo { width: 42px; height: 42px; border-radius: 12px; } .op-hero .op-logo .lu { width: 22px; height: 22px; }
.op-kpis { display: flex; gap: 22px; } .op-kpis div { display: grid; gap: 2px; } .op-kpis b { font-size: 22px; } .op-kpis span { font-size: 12px; color: var(--muted); }
@media (max-width: 700px) {
  .as-op-f { grid-template-columns: 1fr; }
  .op-kpis { gap: 14px; }
}
.as-acc .btn, .as-op .btn, .op-set .btn { display: inline-flex; align-items: center; gap: 6px; }
.as-acc svg.lu, .kv dd svg.lu, .as-site svg.lu, .as-key svg.lu, .op-logo svg.lu, .ag-body svg.lu, .toolbar .btn svg.lu { display: inline-block; vertical-align: -2px; }
.toolbar .btn:has(svg.lu) { display: inline-flex; align-items: center; gap: 6px; }
.kv dd:has(> svg.lu) { display: flex; align-items: center; gap: 4px; }

/* Scansione etichette (telefono) e vault Clienti */
.ls { display: grid; gap: 14px; }
.ls-top { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ls-shot { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 22px 16px; border: 2px dashed #b9d6ff; border-radius: var(--radius); background: linear-gradient(180deg, #f2f8ff 0%, #fff 100%); cursor: pointer; }
.ls-shot:hover { border-color: #1a8cff; }
.ls-cam { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: #1a8cff; color: #fff; margin-bottom: 4px; }
.ls-cam svg.lu, .ls-cam .lu { width: 26px; height: 26px; display: inline-block; }
.ls-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; display: grid; gap: 12px; background: #fff; }
.ls-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ls-h .grow, .ls-a .grow, .as-op-h .grow { flex: 1; }
.ls-codes input, .ls-codes select { width: 100%; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; }
.ls-codes td { vertical-align: top; }
.ls-a { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ls-done h4 { margin: 4px 0 6px; font-size: 13px; }
.ls-di { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line-2); }
.ls-di svg.lu { width: 15px; height: 15px; color: var(--ok); display: inline-block; }
.ls-tpl summary { cursor: pointer; color: var(--muted); }
.ls-tr { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 6px 0; border-top: 1px solid var(--line-2); }
.ls-tr .btn { margin-left: auto; }
.ok-t { color: var(--ok); } .note.ok-t { display: flex; gap: 8px; align-items: center; } .note.ok-t svg.lu { width: 16px; height: 16px; display: inline-block; }
.op-vrow { display: flex; gap: 8px; align-items: center; } .op-vrow select { flex: 1; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.op-tag { width: 100%; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; font-family: var(--mono, ui-monospace, monospace); font-size: 12.5px; }
.op-rev { margin-top: 6px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.op-rev svg.lu { width: 14px; height: 14px; display: inline-block; }
@media (max-width: 640px) {
  .ls-top, .as-op-f { grid-template-columns: 1fr; }
  .ls-codes, .ls-codes tbody { display: block; }
  .ls-codes tr:first-child { display: none; }
  .ls-codes tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; padding: 10px 0; border-top: 1px solid var(--line-2); }
  .ls-codes td { display: block; padding: 0; border: 0 !important; }
  .ls-codes td:first-child { grid-column: 1 / -1; word-break: break-all; }
  .ls-a .btn { width: 100%; justify-content: center; }
}

/* ---------- Plugin e API (static/app-developers.js) */
.dv-top { display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin-bottom: 6px; flex-wrap: wrap; }
.dv-top p { margin: 4px 0 0; }
.dv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.dv-pl { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.dv-pl p { margin: 0; }
.dv-pl-h { display: flex; align-items: center; gap: 10px; }
.dv-pl-h .badge { flex: none; }
.dv-pl-f { gap: 6px; flex-wrap: wrap; margin-top: auto; }
.dv-logo { width: 36px; height: 36px; border-radius: 10px; object-fit: contain; background: var(--soft); flex: none; }
.dv-logo.sm { width: 18px; height: 18px; border-radius: 5px; }
.dv-ph { display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--muted); text-transform: uppercase; }
.dv-scopes { display: flex; flex-wrap: wrap; gap: 4px; }
.dv-scopes code, .dv-rev code, .dv-sc code { font-size: 11.5px; background: var(--soft); border-radius: 6px; padding: 1px 6px; }
.dv-warn { background: #fff4e5; color: #8a4b00; border-radius: 10px; padding: 8px 10px; }
.dv-warn ul { margin: 6px 0 0; padding-left: 18px; }
.dv-rev h4 { margin: 16px 0 8px; font-size: 13.5px; }
.dv-sc { display: grid; gap: 8px; }
.dv-sc .chk { align-items: flex-start; }
.dv-sc .chk.off { opacity: .55; }
.dv-sc .chk > span, .dv-rev .chk > span { display: flex; flex-direction: column; gap: 2px; }
.dv-sc .chk small, .dv-rev .chk small { color: var(--muted); font-size: 12px; }
.dv-mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.dv-mods h6 { margin: 0 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.dv-mod { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; margin: 0 10px 6px 0; color: var(--muted); }
.dv-mod i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.dv-mod.on { color: var(--text); } .dv-mod.on i { background: var(--ok); }
.dv-docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.dv-docs .card { padding: 16px 18px; }
.dv-docs h3 { margin: 0 0 10px; font-size: 15px; }
.dv-pre { background: var(--soft); border-radius: 10px; padding: 10px 12px; white-space: pre-wrap; word-break: break-all; margin: 8px 0; }
.dv-slot { padding: 14px 16px; margin-top: 12px; }
.dv-slot h4, .pl-slot .side-sec h4 { display: flex; align-items: center; gap: 8px; }
.dv-frame { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #fff; display: block; }
@media (max-width: 640px) { .dv-grid, .dv-docs { grid-template-columns: 1fr; } .dv-top { flex-direction: column; align-items: flex-start; } }
/* Chiamate > Da approvare */
.ph-tn { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; }
.rv-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.rv-item { display: flex; flex-direction: column; gap: 10px; padding: 16px; cursor: pointer; color: inherit; text-decoration: none; transition: box-shadow .15s, transform .15s; }
.rv-item:hover { box-shadow: 0 8px 24px rgba(15, 23, 42, .08); transform: translateY(-1px); }
.rv-item-h { display: flex; align-items: center; gap: 10px; } .rv-item-h small { display: block; color: var(--muted); }
.rv-tl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.rv-tl li { display: flex; gap: 7px; align-items: flex-start; } .rv-tl .lu { width: 15px; height: 15px; flex: 0 0 15px; margin-top: 2px; color: var(--muted); }
.rv-go { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; font-size: 13px; margin-top: auto; } .rv-go .lu { width: 15px; height: 15px; }
.rv-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 36px 20px; text-align: center; } .rv-empty .lu { width: 28px; height: 28px; color: var(--accent); }
.rv-empty span { max-width: 460px; color: var(--muted); }
@media (max-width: 700px) { .rv-cards { grid-template-columns: 1fr; } }
.rv-cli { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 16px; }
.rv-cli small { display: block; color: var(--muted); margin-top: 2px; }
.rv-cli-i { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-2); color: var(--accent); flex: none; } .rv-cli-i .lu { width: 18px; height: 18px; }
.rv-cli.confermato .rv-cli-i { background: #e7f6ee; color: var(--ok); } .rv-cli.correzione .rv-cli-i { background: #fdecec; color: var(--bad); }
.rv-cli-n { margin: 8px 0 0; padding: 8px 12px; border-radius: 10px; background: #fff7e6; font-size: 13px; }
.rv-sec { margin: 22px 0 10px; font-size: 15px; }
.rv-ans { padding: 4px 0; } .rv-an { display: flex; align-items: center; gap: 12px; padding: 11px 16px; cursor: pointer; color: inherit; border-top: 1px solid var(--line); }
.rv-an:first-child { border-top: 0; } .rv-an:hover { background: var(--soft); } .rv-an small { display: block; color: var(--muted); margin-top: 2px; } .rv-an > .lu { width: 16px; height: 16px; color: var(--muted); }

/* anagrafica servizi */
.sv-list tr.sv-g td { background: var(--panel); font-weight: 600; font-size: 12.5px; padding-top: 10px; padding-bottom: 8px; }
.sv-list tr.sv-g .si { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: #eef1ff; color: var(--accent, #1b43fe); margin-right: 8px; vertical-align: -6px; }
.sv-list tr.sv-g .si svg { width: 14px; height: 14px; }
.sv-list .nowrap { white-space: nowrap; }
.sv-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }

/* icona a linea dei fornitori nel menu (es. bexio): prende il colore del tema come le icone Lucide */
.vendor-line { display: block; width: 17px; height: 17px; background: currentColor; -webkit-mask: var(--vl) center / contain no-repeat; mask: var(--vl) center / contain no-repeat; }
