/* ==========================================================================
   Spindle — Chat (pannello), selettore persone/gruppi, banner privacy, aggiunte alla Gestione.
   Usa i token di style.css.
   ========================================================================== */

/* ---------- Elenco chat ---------- */
.chat__head .cx-newbtn { margin-left: auto; }
.chat__head .cx-newbtn + .icon-btn { margin-left: 2px; }
.cx-filter { padding: 8px 10px 2px; }
.cx-filter .picker__search { margin: 0; height: 34px; }
.cx-pad { padding: 16px; }
.cthread {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px;
  background: transparent; text-align: left; color: var(--ink);
}
.cthread + .cthread { margin-top: 1px; }
.cthread:hover { background: var(--sunken); }
.cthread:focus-visible { box-shadow: var(--focus); outline: none; }
.cthread__type { position: relative; display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; }
.cthread__type .i { width: 18px; height: 18px; }
.cthread__type--chat { background: #DDF7FC; color: #00708A; }
.cthread__type--mail { background: var(--accent-soft); color: var(--accent-ink); }
.cthread__type--project { background: #EDE7FE; color: #5B21B6; }
[data-theme="dark"] .cthread__type--chat { background: #0E2B33; color: #67E3F5; }
[data-theme="dark"] .cthread__type--project { background: #251B45; color: #C4B5FD; }
.cthread__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cthread__top, .cthread__sub { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cthread__title { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cthread__date { flex: none; font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.cthread__preview { flex: 1; min-width: 0; font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cthread__preview.is-system { font-style: italic; }
.cthread__count {
  flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent-solid); color: #fff;
  font-size: 11.5px; font-weight: 700; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums;
}
.cthread.is-unread .cthread__title { font-weight: 720; }
.cthread.is-unread .cthread__preview { color: var(--ink-2); font-weight: 560; }
.cthread.is-unread .cthread__date { color: var(--accent-ink); font-weight: 650; }

.xbadge {
  display: inline-flex; align-items: center; flex: none; height: 17px; padding: 0 6px; border-radius: 5px;
  background: var(--warn-soft); color: var(--warn); font-size: 10px; font-weight: 750; letter-spacing: .04em; vertical-align: 1px;
}

/* ---------- Intestazione conversazione ---------- */
.cx-headbtn { display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 4px 6px; margin: 0; border: 0; border-radius: 8px; background: transparent; text-align: left; color: var(--ink); min-width: 0; }
.cx-headbtn:not(:disabled):hover { background: var(--sunken); }
.cx-headbtn:disabled { cursor: default; opacity: 1; }
.cx-headbtn .chat__title { display: block; max-width: 100%; }
.cx-headbtn .chat__sub { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Messaggi ---------- */
.chat__messages { gap: 2px; }
.cx-older { display: flex; justify-content: center; padding-bottom: 6px; }
.cday { display: flex; justify-content: center; margin: 12px 0 8px; }
.cday span { padding: 3px 10px; border-radius: 999px; background: var(--sunken); color: var(--ink-3); font-size: 11.5px; font-weight: 600; text-transform: capitalize; }
.csys { display: flex; justify-content: center; align-items: baseline; gap: 6px; margin: 8px 12px; text-align: center; color: var(--ink-3); font-size: 12px; line-height: 1.45; }
.csys span { max-width: 88%; }
.csys time { flex: none; font-size: 11px; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.disc__messages .csys { margin: 2px 12px; }

.cbub { display: flex; flex-direction: column; align-items: flex-start; max-width: 88%; margin-top: 8px; }
.cbub--grouped { margin-top: 2px; }
.cbub--own { align-self: flex-end; align-items: flex-end; }
.cbub__who { display: flex; align-items: center; gap: 6px; margin: 0 0 3px 2px; font-size: 12px; color: var(--ink-2); }
.cbub__who strong { font-weight: 650; }
.cbub__face { width: 20px; height: 20px; font-size: 9px; }
.cbub__card {
  position: relative; min-width: 64px; max-width: 100%; padding: 7px 11px 6px; border: 1px solid var(--line);
  border-radius: 14px 14px 14px 4px; background: var(--surface); box-shadow: var(--shadow-xs);
}
.cbub--grouped .cbub__card { border-top-left-radius: 8px; }
.cbub--own .cbub__card { border-radius: 14px 14px 4px 14px; background: var(--accent-soft); border-color: transparent; box-shadow: none; }
.cbub--own.cbub--grouped .cbub__card { border-top-right-radius: 8px; }
.cbub.is-editing .cbub__card { box-shadow: 0 0 0 2px var(--accent); }
.cbub__text { font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.cbub__text--deleted { display: flex; align-items: center; gap: 6px; color: var(--ink-3); font-style: italic; }
.cbub__text--deleted .i { width: 14px; height: 14px; }
.cbub.is-deleted .cbub__card { background: transparent; border: 1px dashed var(--line-strong); box-shadow: none; }
.cbub__meta { display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin-top: 2px; font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.cbub--own .cbub__meta { color: var(--accent-ink); }
.cbub__edited { font-style: italic; }
.cbub__more {
  position: absolute; top: 50%; right: -32px; margin-top: -13px; display: grid; place-items: center; width: 26px; height: 26px; padding: 0;
  border: 0; border-radius: 7px; background: var(--surface); color: var(--ink-3); box-shadow: var(--shadow-sm); opacity: 0;
  transition: opacity var(--t-fast) var(--ease);
}
.cbub__more .i { width: 15px; height: 15px; }
.cbub--own .cbub__more { right: auto; left: -32px; }
.cbub__card:hover .cbub__more, .cbub__more:focus-visible, .cbub__more[aria-expanded="true"] { opacity: 1; }
@media (hover: none) { .cbub__more { opacity: .9; box-shadow: none; background: transparent; } }
.cbub__confirm, .cpp__confirm { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: var(--danger-soft); color: var(--danger-ink); font-size: 12.5px; font-weight: 560; }
.cpp__confirm { margin: 0; padding: 4px; background: transparent; }

.cbub__atts { display: flex; flex-direction: column; gap: 5px; margin-top: 4px; }
.cbub__img { display: block; max-width: 240px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--sunken); }
.cbub__img img { display: block; max-width: 100%; max-height: 220px; object-fit: cover; }
.cbub__file { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 6px 6px 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.cbub--own .cbub__file { border-color: rgba(64, 64, 208, .18); }
.cbub__file.is-warn { border-color: var(--warn); background: var(--warn-soft); }
.cbub__ficon { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 7px; background: var(--sunken); color: var(--ink-3); }
.cbub__file.is-warn .cbub__ficon { color: var(--warn); background: transparent; }
.cbub__ficon .i { width: 16px; height: 16px; }
.cbub__fname { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.cbub__fname strong { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cbub__fname small { font-size: 11px; color: var(--ink-3); }
.bubble .cbub__atts { margin-top: 6px; }
.bubble--deleted .bubble__text { display: flex; align-items: center; gap: 6px; color: var(--ink-3); font-style: italic; }
.bubble--deleted .bubble__text .i { width: 14px; height: 14px; }

/* Conferme di lettura: un cerchio vuoto per chi non ha ancora letto. */
.rcpt { display: inline-flex; align-items: center; gap: 2px; margin-top: 3px; margin-right: 2px; }
.rcpt__face {
  display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line-strong);
  background: transparent; color: var(--ink-3); font-size: 6.5px; font-weight: 700; letter-spacing: -.02em;
}
.rcpt__more { margin-left: 2px; font-size: 10.5px; font-weight: 650; color: var(--ink-3); }
.rcpt--all { color: var(--accent-ink); opacity: .7; }
.rcpt--all .i { width: 15px; height: 15px; }

/* ---------- Composer ---------- */
.cc { position: relative; flex: none; display: flex; flex-direction: column; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: var(--surface); }
.cc__row { display: flex; align-items: flex-end; gap: 6px; }
.cc__row .mention-field { flex: 1; min-width: 0; }
.cc__input { display: block; width: 100%; min-height: 38px; max-height: 160px; height: 38px; padding: 8px 12px; resize: none; line-height: 1.45; overflow-y: auto; }
.cc__attach, .cc__send { width: 38px; height: 38px; flex: none; }
.cc__files { display: flex; flex-wrap: wrap; gap: 6px; }
.cc__file { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 30px; padding: 0 2px 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); font-size: 12.5px; }
.cc__file .i { width: 14px; height: 14px; color: var(--ink-3); }
.cc__fname { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 560; }
.cc__file small { color: var(--ink-3); font-size: 11px; }
.cc__edit { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 10px; border-left: 3px solid var(--accent); border-radius: 6px; background: var(--accent-soft); }
.cc__edit > .i { width: 16px; height: 16px; color: var(--accent-ink); }
.cc__edit span { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; font-size: 12.5px; }
.cc__edit small { color: var(--ink-3); font-size: 11.5px; }
.cx-drop {
  position: absolute; inset: var(--topbar-h) 8px 8px; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  border: 2px dashed var(--accent); border-radius: 14px; background: color-mix(in srgb, var(--accent-soft) 92%, transparent); color: var(--accent-ink); font-weight: 650; pointer-events: none;
}
.cx-drop[hidden] { display: none; }
.cx-drop .i { width: 28px; height: 28px; }

/* Menzione di chi non partecipa: richiesta in linea sopra il campo. */
.mprompt { padding: 10px 12px; border: 1px solid var(--accent); border-radius: 12px; background: var(--accent-soft); }
.mprompt__text { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: var(--ink); }
.mprompt__text .i { flex: none; width: 17px; height: 17px; margin-top: 1px; color: var(--accent-ink); }
.mprompt__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.mprompt__hint { margin-top: 7px; font-size: 11.5px; color: var(--ink-3); }

/* ---------- Partecipanti ---------- */
.cpeople { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 14px; }
.cpeople__note { display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; }
.cpeople__note .i { flex: none; width: 15px; height: 15px; margin-top: 1px; }
.cpeople__add { align-self: flex-start; }
.cpp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.cpp { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 7px 6px; border-radius: 9px; }
.cpp:hover { background: var(--surface-2); }
.cpp__face { width: 32px; height: 32px; font-size: 11.5px; }
.cpp__text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.cpp__text strong { font-size: 13.5px; font-weight: 600; }
.cpp__text em { font-style: normal; color: var(--ink-3); font-weight: 500; }
.cpp__text small { font-size: 11.5px; color: var(--ink-3); }
.cpeople__leave { padding-top: 8px; border-top: 1px solid var(--line); }
.cadd { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.cadd__title { font-size: 13.5px; font-weight: 680; }
.cadd__hist { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; border: 0; }
.cadd__hist legend { margin-bottom: 6px; font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.cadd__foot { display: flex; justify-content: flex-end; gap: 6px; }

.radio-card { position: relative; display: flex; align-items: flex-start; gap: 9px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; }
.radio-card input { margin: 2px 0 0; width: 16px; height: 16px; flex: none; accent-color: var(--accent-solid); }
.radio-card span { display: flex; flex-direction: column; line-height: 1.35; font-size: 13px; }
.radio-card small { font-size: 12px; color: var(--ink-3); }
.radio-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.radio-card:has(input:focus-visible) { box-shadow: var(--focus); }

/* ---------- Selettore persone e gruppi ---------- */
.pp { display: flex; flex-direction: column; gap: 8px; }
.pp__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pp__chips[hidden] { display: none; }
.pp__search { margin: 0; }
.pp__list { display: flex; flex-direction: column; gap: 1px; max-height: 260px; overflow-y: auto; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.pp__sec { padding: 8px 8px 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-3); }
.pp__opt { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 4px 8px; border: 0; border-radius: 8px; background: transparent; text-align: left; color: var(--ink); }
.pp__opt:hover, .pp__opt:focus-visible { background: var(--sunken); }
.pp__opt.is-on { background: var(--accent-soft); }
.pp__tick { margin-left: auto; display: grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-strong); color: #fff; }
.pp__opt.is-on .pp__tick { background: var(--accent-solid); border-color: var(--accent-solid); }
.pp__tick .i { width: 13px; height: 13px; }
.pp__gicon { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 8px; background: color-mix(in srgb, var(--gc) 16%, transparent); color: var(--gc); }
[data-theme="dark"] .pp__gicon { background: color-mix(in srgb, var(--gc) 28%, transparent); color: color-mix(in srgb, var(--gc) 50%, #fff); }
.pp__gicon .i { width: 15px; height: 15px; }
.pp__sum { min-height: 18px; font-size: 12.5px; color: var(--ink-3); }
.pchip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 30px; padding: 0 3px 0 4px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; font-weight: 600; }
.pchip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pchip small { font-size: 11.5px; font-weight: 500; opacity: .8; }
.pchip__face { width: 22px; height: 22px; font-size: 9px; }
.pchip--group { padding-left: 9px; background: color-mix(in srgb, var(--gc) 14%, var(--surface)); color: var(--ink); }
.pchip--group > .i { width: 14px; height: 14px; color: var(--gc); }
.pchip button { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; }
.pchip button:hover { background: rgba(0, 0, 0, .08); }
.pchip button .i { width: 13px; height: 13px; }
.field__opt { font-weight: 400; color: var(--ink-3); }
.modal__card--chat { max-width: 520px; }

/* ---------- Banner privacy (stile cookie banner, in basso) ---------- */
.pbanner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; display: flex; justify-content: center; padding: 0 16px 16px; pointer-events: none; animation: pb-in 260ms var(--ease) both; }
.pbanner.is-leaving { opacity: 0; transform: translateY(10px); transition: opacity 200ms var(--ease), transform 200ms var(--ease); }
@keyframes pb-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.pbanner__card {
  position: relative; pointer-events: auto; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px 18px;
  width: min(980px, 100%); padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden;
}
.pbanner__card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--hairline-gradient); }
.pbanner__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); align-self: start; }
.pbanner__icon .i { width: 22px; height: 22px; }
.pbanner__title { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.pbanner__text { margin-top: 4px; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.pbanner__text ul { margin: 4px 0 0; padding-left: 18px; }
.pbanner__text p + p { margin-top: 6px; }
.pbanner__more { margin-top: 6px; }
.pbanner__actions { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.pnotice p + p { margin-top: 8px; }
.pnotice { font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.sec-data { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; }
@media (max-width: 699px) {
  .pbanner { padding: 0 8px calc(var(--tabbar-h) + 8px); }
  .pbanner__card { grid-template-columns: minmax(0, 1fr); padding: 16px; max-height: 70vh; overflow-y: auto; }
  .pbanner__icon { display: none; }
  .pbanner__actions { flex-direction: row-reverse; justify-content: flex-start; }
  .pbanner__actions .btn--primary { flex: 1; }
}

/* ---------- Gestione: sola lettura, gruppi, antivirus, elenchi, privacy ---------- */
.ro-banner { display: flex; align-items: center; gap: 10px; margin: 0 28px 4px; padding: 10px 14px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-size: 13px; }
.ro-banner .i { width: 18px; height: 18px; flex: none; }
.ro-banner strong { font-weight: 700; }
@media (max-width: 699px) { .ro-banner { margin: 0 16px 4px; } }

.grp-name { display: inline-flex; align-items: center; gap: 10px; }
.grp-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--gc); flex: none; }
.grp-members { display: inline-flex; align-items: center; gap: 10px; }
.faces__face { width: 26px; height: 26px; font-size: 10px; }
.adm-row__go { color: var(--ink-4); }
.adm-row__go .i { width: 16px; height: 16px; }
.grp-empty { display: flex; gap: 14px; align-items: flex-start; }
.grp-empty > .i { width: 28px; height: 28px; color: var(--accent-ink); flex: none; }
.grp-badge { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: color-mix(in srgb, var(--gc) 16%, var(--surface)); color: var(--gc); flex: none; }
.grp-badge .i { width: 24px; height: 24px; }
.grp-search { margin: 0 0 8px; }
.grp-face { width: 26px; height: 26px; font-size: 10px; flex: none; }
.chk-list__item[hidden] { display: none; }
.mbx-count { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.mbx-count .i { width: 14px; height: 14px; color: var(--ink-3); }

.av-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.av-card__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; }
.av-card__icon .i { width: 20px; height: 20px; }
.av-card--ok .av-card__icon { background: var(--ok-soft); color: var(--ok); }
.av-card--ok { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.av-card--warn .av-card__icon { background: var(--warn-soft); color: var(--warn); }
.av-card--warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.av-card--off .av-card__icon { background: var(--sunken); color: var(--ink-3); }
.av-card__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.av-card__body strong { font-size: 14px; font-weight: 680; }
.av-card__body span { font-size: 12.5px; color: var(--ink-3); line-height: 1.45; }
.av-card__counts { display: flex; gap: 6px; margin: 0; }
.av-card__counts > div { min-width: 74px; padding: 6px 10px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); text-align: center; }
.av-card__counts dt { font-size: 11px; color: var(--ink-3); }
.av-card__counts dd { margin: 0; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.av-card__counts .is-bad dd { color: var(--danger-ink); }
.av-card__counts .is-warn dd { color: var(--warn); }
@media (max-width: 899px) { .av-card { grid-template-columns: auto minmax(0, 1fr); } .av-card__counts { grid-column: 1 / -1; } }

.feed-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.feed { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--surface); }
.feed + .feed { border-top: 1px solid var(--line); }
.feed__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.feed__name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; font-weight: 650; }
.feed__note { font-size: 12.5px; color: var(--ink-3); line-height: 1.4; }
.feed__status { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.feed__status .i { width: 13px; height: 13px; vertical-align: -2px; }
.feed:not(.is-on) .feed__status { color: var(--ink-3); }
.feed-foot { margin-top: 8px; }
.pv-text { min-height: 160px; font-size: 13.5px; line-height: 1.5; }
.pv-users { max-height: 280px; overflow-y: auto; }
.pv-users .adm-list__meta .i { width: 13px; height: 13px; color: var(--ok); vertical-align: -2px; }

/* ---------- Gestione → Caselle: fornitori e collegamenti ---------- */
.mb-card-wrap { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mb-card-wrap .mb-card { flex: 1; }
.mb-card__actions { display: flex; gap: 6px; flex-wrap: wrap; }
.mb-card__state--ok { color: var(--ok); }
.mb-card__state--todo { color: var(--warn); }
.adm-flash { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; font-size: 13px; }
.adm-flash > span { flex: 1; min-width: 200px; }
.adm-flash > .i { width: 18px; height: 18px; flex: none; }
.adm-flash--ok { background: var(--ok-soft); color: var(--ok); }
.adm-flash--ok > span { color: var(--ink); }
.adm-flash--error { background: var(--danger-soft); color: var(--danger-ink); }
.prov-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; }
.prov-card { align-items: center; }
.prov-card > input { margin: 0; }
.prov-card__icon { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 9px; background: var(--sunken); color: var(--ink-2); }
.prov-card__icon .i { width: 17px; height: 17px; }
.prov-card:has(input:checked) .prov-card__icon { background: var(--surface); color: var(--accent-ink); }
.prov-card.is-locked { cursor: default; }
.prov-card.is-locked:not(:has(input:checked)) { opacity: .5; }
#prov-servers code, .oapp__uri code { font-family: var(--font-mono); font-size: 12px; }
#prov-servers .i { width: 14px; height: 14px; vertical-align: -2px; }
.oauth-box { display: flex; flex-direction: column; gap: 10px; }
.oauth-box[hidden] { display: none; }
.oauth-box__state { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.oauth-box__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.oapp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.oapp { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); min-width: 0; }
.oapp__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.oapp__head strong { font-size: 14px; }
.oapp__uri { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 4px 4px 4px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.oapp__uri code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oapp__help summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--accent-ink); }
.oapp__help ol { margin: 8px 0 0; padding-left: 18px; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }
.oapp__help li + li { margin-top: 4px; }
.oapp .adm-form__foot { margin-top: 0; }

/* @menzioni: riquadro flottante vicino al cursore */
.mention-pop--float { position: fixed; bottom: auto; z-index: 95; max-height: min(320px, 50vh); overflow-y: auto; overscroll-behavior: contain; }
.mention-pop__sec { padding: 6px 8px 3px; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.mention-pop__opt { height: auto; min-height: 38px; }
.mention-pop__name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; overflow: hidden; }
.mention-pop__name small { font-size: 11px; color: var(--ink-3); }
.mention-pop__out { flex: none; font-size: 10.5px; font-weight: 650; color: var(--warn); }
.mention-pop__opt.is-out .mention-pop__face { opacity: .7; }
.mention-pop__face { flex: none; width: 24px; height: 24px; font-size: 9.5px; }
@media (hover: none) { .mention-pop__opt { min-height: 44px; } }

/* Filtri rapidi dell'elenco messaggi: icone con suggerimento; l'etichetta compare solo sul filtro attivo. */
.qfs { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; min-width: 0; }
.qf { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink-2); font-size: 12.5px; font-weight: 600; white-space: nowrap; transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.qf .i { width: 16px; height: 16px; flex: none; }
.qf:hover { border-color: var(--line-strong); color: var(--ink); background: var(--surface-2); }
.qf:focus-visible { box-shadow: var(--focus); outline: none; }
.qf__label { display: none; }
.qf.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.qf.is-on .qf__label { display: inline; }
.qf__n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--sunken); color: var(--ink-2); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.qf.is-on .qf__n { background: var(--accent-solid); color: #fff; }
.qf--clear { border-style: dashed; color: var(--ink-3); padding: 0 6px; }
.qf--clear .i { width: 14px; height: 14px; }

/* «Prendo io» / «Fatto» sulle email */
.oquick { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.owner--done { background: var(--ok-soft); color: var(--ok); }
.owner--done .i { width: 15px; height: 15px; }
.row__qa { display: flex; flex-direction: column; gap: 2px; opacity: 0; transition: opacity var(--t-fast) var(--ease); }
.row:hover .row__qa, .row:focus-within .row__qa { opacity: 1; }
@media (hover: none) { .row__qa { display: none; } }
.row__qbtn { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink-3); }
.row__qbtn .i { width: 15px; height: 15px; }
.row__qbtn:hover { border-color: var(--accent); color: var(--accent-ink); }
.row__qbtn--done:hover { border-color: var(--ok); color: var(--ok); background: var(--ok-soft); }
.oslot--done { color: var(--ok); }
.oslot--done .i { width: 18px; height: 18px; }
.row.own-done::before { background: var(--ok); opacity: .55; }

/* Gestione chat: fissate, silenziate, archiviate, menu della chat */
.cthread-wrap { position: relative; }
.cthread-wrap .cthread { padding-right: 34px; }
.cthread__more { position: absolute; z-index: 2; right: 4px; top: 50%; margin-top: -14px; opacity: 0; }
.cthread-wrap:hover .cthread__more, .cthread__more:focus-visible, .cthread__more[aria-expanded="true"] { opacity: 1; }
@media (hover: none) { .cthread__more { display: none; } .cthread-wrap .cthread { padding-right: 10px; } }
.cthread__flag { display: inline-flex; color: var(--ink-4); }
.cthread__flag .i { width: 13px; height: 13px; }
.cthread.is-muted .cthread__title { color: var(--ink-2); }
.cthread__count.is-muted { background: var(--ink-4); }
.cthread__count--dot { min-width: 10px; width: 10px; height: 10px; padding: 0; }
.cx-archived { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 6px; padding: 10px; border: 1px dashed var(--line-strong); border-radius: 10px; background: transparent; color: var(--ink-2); font-size: 13px; font-weight: 600; }
.cx-archived .i { width: 16px; height: 16px; }
.cx-archived span { flex: 1; text-align: left; }
.cx-archived small { color: var(--ink-3); }
.cx-archived:hover { background: var(--sunken); }
.cx-archhead { display: flex; align-items: center; gap: 8px; margin: 8px 10px 0; padding: 6px 8px; border: 0; border-radius: 8px; background: var(--sunken); color: var(--ink); font-size: 13px; font-weight: 650; }
.cx-archhead .i { width: 15px; height: 15px; }

/* Stati vuoti: il testo resta dentro il riquadro a qualsiasi larghezza (prima veniva tagliato a sinistra). */
.empty { width: 100%; min-width: 0; box-sizing: border-box; }
.empty > * { max-width: 100%; }
.empty__title, .empty__text { overflow-wrap: anywhere; }
.empty__text { max-width: min(34ch, 100%); }
.empty__art { overflow: visible; }

/* Scorciatoie da tastiera visibili solo al passaggio o al focus (desktop); mai sul telefono. */
.compose-btn kbd, .gsearch__kbd { opacity: 0; transition: opacity var(--t-fast) var(--ease); }
.compose-btn:hover kbd, .compose-btn:focus-visible kbd, .gsearch:hover .gsearch__kbd { opacity: 1; }
@media (hover: none), (max-width: 699px) { .compose-btn kbd, .gsearch__kbd { display: none; } }
.mylogins { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow-y: auto; }
.mylogin { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; }
.mylogin > .i { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--ok); }
.mylogin.is-fail > .i { color: var(--danger); }
.mylogin.is-odd > .i { color: var(--warn); }
.mylogin span { display: flex; flex-direction: column; line-height: 1.35; }
.mylogin small { color: var(--ink-3); }
/* I pulsanti «⋯» riusano .sb-more (che in barra laterale è cliccabile solo al passaggio): qui devono esserlo sempre. */
.cthread__more, .calrow__more, .ptree__fmore, .ms__more, .ftable__act .sb-more, .grow__act .sb-more { pointer-events: auto; }
.alrules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.alrule { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); flex-wrap: wrap; }
.alrule.is-off { opacity: .6; }
.alrule__body { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.alrule__body small { color: var(--ink-3); font-size: 12px; }
.lbl-chip { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; background: color-mix(in srgb, var(--lbl) 16%, var(--surface)); color: var(--ink); font-size: 11.5px; font-weight: 650; box-shadow: inset 3px 0 0 var(--lbl); }
.alconds { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.alcond { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.alcond .select, .alcond .input { width: auto; flex: 1 1 140px; }
.allabels { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.lbl-pick { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 12.5px; font-weight: 600; box-shadow: inset 4px 0 0 var(--lbl); }
.lbl-pick .i { width: 13px; height: 13px; color: var(--lbl); }
.lbl-pick.is-on { border-color: var(--lbl); background: color-mix(in srgb, var(--lbl) 14%, var(--surface)); }
.alnewlab { display: flex; gap: 6px; }
.alnewlab .input { max-width: 240px; }
.al-days { display: inline-block; width: 72px; height: 28px; margin: 0 4px; }
.rail__badge--alert { background: var(--danger); color: #fff; }
.lg-filters { align-items: flex-end; flex-wrap: wrap; }
.lg-checks, .lp-checks { display: flex; flex-wrap: wrap; gap: 8px 16px; padding-bottom: 8px; }
.lg-odd td { background: color-mix(in srgb, var(--warn-soft) 60%, transparent); }
.lg-why { display: flex; gap: 4px; align-items: flex-start; margin-top: 4px; font-size: 12px; color: var(--warn); }
.lg-why .i { width: 13px; height: 13px; flex: none; margin-top: 1px; }
.lg-attr { text-align: right; }
.au-admin { align-self: flex-end; padding-bottom: 10px; }

/* Ricerca: avanzata, suggerimenti, estratti con i termini trovati */
.gsearch { position: relative; }
.gsearch__adv { display: grid; place-items: center; flex: none; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--ink-3); }
.gsearch__adv:hover { background: var(--sunken); color: var(--ink); }
.gsearch__adv .i { width: 16px; height: 16px; }
.ssug { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-md); }
.ssug[hidden] { display: none; }
.ssug__opt { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 4px 10px; border: 0; border-radius: 8px; background: transparent; text-align: left; color: var(--ink); }
.ssug__opt:hover, .ssug__opt:focus-visible { background: var(--sunken); }
.ssug__opt .i { width: 16px; height: 16px; color: var(--ink-3); flex: none; }
.ssug__opt span { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.ssug__opt strong { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ssug__opt small { font-size: 12px; color: var(--ink-3); }
.row__snippet--hit mark, .row__subject mark { background: color-mix(in srgb, var(--star) 35%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.row__hitatt { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.row__hitatt .pill { height: 20px; font-size: 11px; gap: 4px; }
.row__hitatt .i { width: 12px; height: 12px; }
/* Integrazioni */
.intg-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.intg { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); flex-wrap: wrap; }
.intg.is-off { opacity: .6; }
.intg__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); flex: none; }
.intg__icon .i { width: 17px; height: 17px; }
.intg__body { flex: 1; min-width: 180px; display: flex; flex-direction: column; font-size: 13px; }
.intg__body small { color: var(--ink-3); font-size: 12px; }
.intg-add { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.intg-add__btn { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--surface); text-align: left; color: var(--ink); }
.intg-add__btn:hover { border-color: var(--accent); border-style: solid; }
.intg-add__btn .i { width: 18px; height: 18px; color: var(--accent-ink); flex: none; }
.intg-add__btn span { display: flex; flex-direction: column; font-size: 13px; }
.intg-add__btn small { font-size: 11.5px; color: var(--ink-3); }
.tone-ok { color: var(--ok); }
