/* ==========================================================================
   Spindle — Progetti. Usa i token di style.css.
   ========================================================================== */
.prj { position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: 280px minmax(0, 1fr); background: var(--canvas); }
.prj > .adm-loading { grid-column: 1 / -1; margin: auto; }
.prj__side { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 14px 12px 16px; border-right: 1px solid var(--line); background: var(--surface); }
.prj__sidehead { display: flex; align-items: center; gap: 8px; }
.prj__title { flex: 1; font-size: 18px; font-weight: 720; letter-spacing: -.015em; padding-left: 4px; }
.prj__sideclose, .prj__sidebtn, .prj__scrim { display: none; }
.prj__search { margin: 0; }
.prj__filter { align-self: stretch; }
.prj__filter .seg__opt { flex: 1; }
.prj__newfolder { align-self: flex-start; }
.ptree { display: flex; flex-direction: column; gap: 1px; }
.ptree__all, .ptree__prj, .ptree__ftoggle { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 34px; padding: 4px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); text-align: left; font-size: 13px; }
.ptree__all:hover, .ptree__prj:hover, .ptree__ftoggle:hover { background: var(--sunken); }
.ptree__all.is-active, .ptree__prj.is-active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 650; }
.ptree__all .i, .ptree__ftoggle .i { width: 16px; height: 16px; flex: none; color: var(--ink-3); }
.ptree__all span, .ptree__ftoggle span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptree__all small, .ptree__ftoggle small { font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ptree__folder { padding-left: calc(var(--depth, 0) * 12px); }
.ptree__frow { position: relative; display: flex; align-items: center; }
.ptree__ftoggle { font-weight: 600; }
.ptree__ftoggle > .i:first-child { width: 14px; height: 14px; transition: transform var(--t-fast) var(--ease); }
.ptree__ftoggle[aria-expanded="true"] > .i:first-child { transform: rotate(90deg); }
.ptree__fmore { opacity: 0; }
.ptree__frow:hover .ptree__fmore, .ptree__fmore:focus-visible, .ptree__fmore[aria-expanded="true"] { opacity: 1; }
@media (hover: none) { .ptree__fmore { opacity: 1; } }
.ptree__kids { padding-left: 14px; display: flex; flex-direction: column; gap: 1px; }
.ptree__dot { flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--pc); }
.ptree__name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; overflow: hidden; }
.ptree__name, .ptree__name small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptree__name small { font-size: 11px; color: var(--ink-3); font-weight: 400; }
.ptree__pct { flex: none; font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ptree__h { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.ptree__h--at_risk { background: var(--warn); }
.ptree__h--off_track { background: var(--danger); }
.ptree__sec { padding: 8px 8px 2px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.ptree__empty { padding: 4px 10px; font-size: 12.5px; color: var(--ink-3); }

.prj__main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.prj__scroll { flex: 1; min-height: 0; overflow-y: auto; }
.prj__empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 16px 32px; list-style: none; }

/* Intestazione */
.prjh { position: relative; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.prjh::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--pc, var(--accent)); }
.prjh--list::before { display: none; }
.prjh--list > div:nth-child(2) { flex: 1; }
.prjh__main { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 4px; }
.prjh__line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.prjh__dot { width: 12px; height: 12px; border-radius: 4px; background: var(--pc); flex: none; }
.prjh__name { font-size: 20px; font-weight: 720; letter-spacing: -.015em; line-height: 1.25; }
.prjh__sub { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--ink-3); }
.prjh__sub span { display: inline-flex; align-items: center; gap: 5px; }
.prjh__sub .i { width: 14px; height: 14px; }
.prjh__prog { display: flex; flex-direction: column; gap: 6px; width: 220px; }
.prjh__pct { display: flex; align-items: baseline; gap: 8px; }
.prjh__pct strong { font-size: 22px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.prjh__pct small { font-size: 12px; color: var(--ink-3); }
.prjh__actions { display: flex; align-items: center; gap: 8px; }
.pbar { position: relative; display: block; width: 100%; height: 6px; border-radius: 3px; background: var(--sunken); overflow: hidden; }
.pbar--big { height: 8px; border-radius: 4px; }
.pbar__fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: var(--hairline-gradient); }

.spill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 650; background: var(--sunken); color: var(--ink-2); }
.spill--active { background: var(--accent-soft); color: var(--accent-ink); }
.spill--completed { background: var(--ok-soft); color: var(--ok); }
.spill--on_hold { background: var(--warn-soft); color: var(--warn); }
.spill--archived { background: var(--sunken); color: var(--ink-3); }
.hbadge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px 0 7px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.hbadge .i { width: 13px; height: 13px; }
.hbadge--on_track { background: var(--ok-soft); color: var(--ok); }
.hbadge--at_risk { background: var(--warn-soft); color: var(--warn); }
.hbadge--off_track { background: var(--danger-soft); color: var(--danger-ink); }

/* Schede */
.ptabs { display: flex; gap: 2px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; background: var(--surface); border-bottom: 1px solid var(--line); }
.ptabs::-webkit-scrollbar { display: none; }
.ptab { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 12px; border: 0; background: transparent; color: var(--ink-3); font-size: 13px; font-weight: 600; white-space: nowrap; }
.ptab .i { width: 16px; height: 16px; }
.ptab:hover { color: var(--ink); }
.ptab.is-active { color: var(--accent-ink); }
.ptab.is-active::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--hairline-gradient); }
.ptab:focus-visible { box-shadow: inset var(--focus); outline: none; }
.prj__tab { padding: 0; }
.prj__tab > .adm-loading { margin: 24px; }

/* Elenco schede progetto */
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; padding: 20px 24px; }
.pcard { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 14px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-align: left; color: var(--ink); overflow: hidden; }
.pcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--pc); }
.pcard:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.pcard__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.pcard__name { font-size: 15px; font-weight: 700; line-height: 1.3; }
.pcard__client { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--ink-3); }
.pcard__client .i { width: 13px; height: 13px; }
.pcard__prog { display: flex; align-items: center; gap: 10px; }
.pcard__prog strong { font-size: 13px; font-variant-numeric: tabular-nums; }
.pcard__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 12px; color: var(--ink-3); }
.pcard__meta > span:not(.hbadge) { display: inline-flex; align-items: center; gap: 4px; }
.pcard__meta .i { width: 13px; height: 13px; }

/* Panoramica */
.pov { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; padding: 20px 24px 28px; }
.pov__col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pov__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pov__title { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; }
.pov__title .i { width: 18px; height: 18px; color: var(--accent-ink); }
.pov__sub { margin-top: 10px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.pov__desc { font-size: 13.5px; line-height: 1.55; color: var(--ink-2); white-space: pre-wrap; }
.mslist, .uplist, .pmembers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ms { display: flex; align-items: flex-start; gap: 10px; padding: 10px 10px 10px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.ms.is-overdue { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.ms__check { display: grid; place-items: center; flex: none; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--ink-3); }
.ms__check .i { width: 20px; height: 20px; }
.ms__check:not(:disabled):hover { background: var(--sunken); color: var(--accent-ink); }
.ms--done .ms__check { color: var(--ok); }
.ms--in_progress .ms__check { color: var(--accent-ink); }
.ms--done .ms__name { text-decoration: line-through; color: var(--ink-3); }
.ms__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding-top: 4px; }
.ms__name { font-size: 13.5px; font-weight: 620; }
.ms__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12px; color: var(--ink-3); }
.ms__meta > span { display: inline-flex; align-items: center; gap: 4px; }
.ms__meta .i { width: 13px; height: 13px; }
.ms__vis.is-on { color: var(--accent-ink); }
.ms__more { position: static; opacity: 1; }
.mslist__empty { padding: 10px; }
.msform { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--accent); border-radius: 12px; background: var(--accent-soft); }
.msform__row { display: grid; grid-template-columns: 1.4fr .7fr 1fr; gap: 8px; }
.msform__foot { display: flex; justify-content: flex-end; gap: 6px; }
.upform { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.upform__health { display: flex; gap: 6px; flex-wrap: wrap; }
.hchoice { position: relative; cursor: pointer; }
.hchoice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.hchoice span { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.hchoice input:focus-visible + span { box-shadow: var(--focus); }
.hchoice--on_track input:checked + span { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.hchoice--at_risk input:checked + span { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
.hchoice--off_track input:checked + span { background: var(--danger-soft); border-color: var(--danger); color: var(--danger-ink); }
.upform__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.upd { padding: 10px 12px; border: 1px solid var(--line); border-left: 3px solid var(--ok); border-radius: 10px; background: var(--surface); }
.upd--at_risk { border-left-color: var(--warn); }
.upd--off_track { border-left-color: var(--danger); }
.upd__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.upd__head time { color: var(--ink-3); }
.upd__vis { display: inline-flex; color: var(--ink-3); }
.upd__vis .i { width: 14px; height: 14px; }
.upd__del { margin-left: auto; }
.upd__body { margin-top: 6px; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.upd__confirm, .grow__confirm { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--danger-soft); color: var(--danger-ink); font-size: 12.5px; }
.upd__confirm[hidden], .grow__confirm[hidden] { display: none; }
.pmembers li { display: flex; align-items: center; gap: 10px; }
.pmembers li > span { display: flex; flex-direction: column; line-height: 1.3; font-size: 13px; }
.pmembers small { font-size: 11.5px; color: var(--ink-3); }
.pmembers__face { width: 28px; height: 28px; font-size: 10.5px; flex: none; }

/* Email */
.pem { display: flex; flex-direction: column; gap: 12px; padding: 20px 24px 28px; }
.pem__rule { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.pem__ruletxt { margin-top: 6px; font-size: 13px; line-height: 1.55; color: var(--ink-2); }
.pem__ruletxt .i { width: 14px; height: 14px; vertical-align: -2px; }
.pem__filters { align-self: flex-start; }
.emlist { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.emrow { display: flex; align-items: center; gap: 10px; padding-right: 10px; }
.emrow + .emrow { border-top: 1px solid var(--line); }
.emrow.is-danger { box-shadow: inset 3px 0 0 var(--danger); }
.emrow.is-warn { box-shadow: inset 3px 0 0 var(--warn); }
.emrow__main { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 0; background: transparent; text-align: left; color: var(--ink); }
.emrow__main:hover { background: var(--surface-2); }
.emrow__dir { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--sunken); color: var(--ink-3); }
.emrow__dir--out { background: var(--accent-soft); color: var(--accent-ink); }
.emrow__dir .i { width: 15px; height: 15px; }
.emrow__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.emrow__top { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.emrow__top strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emrow__top time { flex: none; font-size: 12px; color: var(--ink-3); }
.emrow__subj { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.emrow__subj .i { width: 13px; height: 13px; flex: none; color: var(--ink-3); }
.emrow.is-danger .emrow__subj .i:first-child { color: var(--danger); }
.emrow__snip { font-size: 12.5px; color: var(--ink-3); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.emrow__side { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.emrow__side .pill .i { width: 12px; height: 12px; }
.emview__head { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 10px 0; font-size: 13px; }
.emview__head dt { color: var(--ink-3); }
.emview__head dd { margin: 0; overflow-wrap: anywhere; }
.emview__body { max-height: 50vh; overflow: auto; padding: 12px; border-radius: 10px; background: var(--surface-2); font: 13.5px/1.55 var(--font-ui); white-space: pre-wrap; overflow-wrap: anywhere; }
.emview__att { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.er-switch { width: 20px; height: 20px; accent-color: var(--accent-solid); }

/* File */
.pfiles { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 16px 24px 28px; min-height: 100%; }
.pfiles__bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pfiles__spacer { flex: 1; }
.crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); }
.crumbs__btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px; border: 0; border-radius: 7px; background: transparent; color: var(--ink); font-weight: 600; }
.crumbs__btn:hover { background: var(--sunken); }
.crumbs__btn .i { width: 16px; height: 16px; color: var(--ink-3); }
.sharedtag { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; padding: 0 7px; height: 20px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: 11px; font-weight: 650; }
.sharedtag .i { width: 12px; height: 12px; }
.pfiles__note { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--accent-ink); }
.pfiles__note .i { width: 15px; height: 15px; }
.pfiles__drop { position: absolute; inset: 8px; z-index: 5; 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; }
.pfiles__drop[hidden] { display: none; }
.pfiles__drop .i { width: 30px; height: 30px; }
.ftable { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; font-size: 13px; }
.ftable th { padding: 8px 12px; text-align: left; font-size: 11.5px; font-weight: 650; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.ftable td { padding: 4px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--ink-2); }
.ftable tbody tr:last-child td { border-bottom: 0; }
.ftable__num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ftable__act { width: 1%; white-space: nowrap; text-align: right; }
.ftable__act .sb-more { position: static; opacity: 1; display: inline-grid; }
.frow:hover td { background: var(--surface-2); }
.frow__name { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0; border: 0; background: transparent; color: var(--ink); font-weight: 580; text-align: left; max-width: 100%; }
.frow__name > span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frow__name .i { width: 17px; height: 17px; flex: none; color: var(--ink-3); }
.frow--folder .frow__name .i:first-child { color: var(--accent-ink); }
.frow.is-danger .frow__name .i:first-child { color: var(--danger); }
.frow.is-warn .frow__name .i:first-child { color: var(--warn); }
.vtag { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 5px; background: var(--sunken); color: var(--ink-3); font-size: 10.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.vtag--cur { background: var(--accent-soft); color: var(--accent-ink); }
.pfiles__empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 12px; color: var(--ink-3); text-align: center; }
.pfiles__empty .i { width: 28px; height: 28px; }
.pfiles__limits { margin-top: 2px; }
.vlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.vrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 6px; border-radius: 9px; }
.vrow:hover { background: var(--surface-2); }
.vrow__text { flex: 1; min-width: 180px; display: flex; flex-direction: column; line-height: 1.3; font-size: 13px; }
.vrow__text small { font-size: 12px; color: var(--ink-3); }
.vrow__act { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.modal__card--preview { max-width: 980px; }
.fprev { display: grid; place-items: center; background: var(--sunken); border-radius: 10px; padding: 8px; }
.fprev img { max-width: 100%; max-height: 70vh; object-fit: contain; border-radius: 6px; }
.fprev__frame { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: 10px; background: #fff; }

/* Chat del progetto */
.pchats { display: flex; flex-direction: column; gap: 10px; max-width: 720px; padding: 20px 24px; }
.pchat { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-align: left; color: var(--ink); }
.pchat:hover:not(:disabled) { border-color: var(--accent); }
.pchat > .i:last-child { width: 18px; height: 18px; color: var(--ink-4); }
.pchat__icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 11px; background: var(--accent-soft); color: var(--accent-ink); }
.pchat__icon--ext { background: var(--warn-soft); color: var(--warn); }
.pchat__icon .i { width: 20px; height: 20px; }
.pchat__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pchat__body strong { font-size: 14px; }
.pchat__body small { font-size: 12.5px; color: var(--ink-3); }
.pchat__last { font-size: 12.5px; color: var(--ink-2); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pchat.is-unread .pchat__last { font-weight: 650; color: var(--ink); }

/* Calendario del progetto */
.pcal { display: flex; flex-direction: column; gap: 10px; padding: 20px 24px 28px; }
.agenda { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.agenda__day { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.agenda__day.is-today { border-color: var(--accent); }
.agenda__date { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.agenda__date strong { font-size: 22px; font-weight: 750; font-variant-numeric: tabular-nums; }
.agenda__date span { font-size: 12px; font-weight: 650; text-transform: uppercase; color: var(--ink-2); }
.agenda__date small { font-size: 11px; color: var(--ink-3); }
.agenda__day ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.agenda__item { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; }
.agenda__item > .i { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--accent-ink); }
.agenda__item--task > .i { color: #D97706; }
.agenda__item--milestone > .i { color: #7C3AED; }
.agenda__item > span { display: flex; flex-direction: column; line-height: 1.35; }
.agenda__item small { font-size: 12px; color: var(--ink-3); }
.agenda__item.is-done strong { text-decoration: line-through; color: var(--ink-3); }

/* Ospiti */
.pguests { display: flex; flex-direction: column; gap: 10px; padding: 20px 24px 28px; }
.glist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.grow { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.grow.is-revoked { opacity: .65; }
.grow__face { width: 36px; height: 36px; font-size: 12px; flex: none; }
.grow__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.grow__body strong { font-size: 14px; }
.grow__body small { font-size: 12px; color: var(--ink-3); }
.grow__perms { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.grow__perms .pill { height: 20px; font-size: 11px; }
.grow__act { display: flex; align-items: center; gap: 6px; }
.grow__act .sb-more { position: static; opacity: 1; display: inline-grid; }
.gperms { display: flex; flex-direction: column; gap: 6px; }
.gperm { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; position: relative; }
.gperm input { position: absolute; opacity: 0; }
.gperm > span:last-child { display: flex; flex-direction: column; line-height: 1.35; font-size: 13px; }
.gperm small { font-size: 12px; color: var(--ink-3); }
.gperm .chk__box { margin-top: 1px; }
.gperm:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.gperm input:checked + .chk__box { background: var(--accent-solid); border-color: var(--accent-solid); color: #fff; }
.gperm input:focus-visible + .chk__box { box-shadow: var(--focus); }
.seg__opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
label.seg__opt { position: relative; cursor: pointer; }
label.seg__opt:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-xs); }
label.seg__opt:has(input:focus-visible) { box-shadow: var(--focus); }

/* Registro */
.plog { padding: 16px 24px 28px; }
.plog__list { list-style: none; margin: 0; padding: 0; }
.plog .alog__text em { font-style: normal; font-weight: 600; color: var(--ink); }

/* Dialoghi */
.pclient { min-height: 40px; display: flex; align-items: center; }
.pclient__search { position: relative; width: 100%; }
.pclient__search .suggest { left: 0; width: 100%; }
.pclient .pchip .i { width: 14px; height: 14px; }
.pf-member { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.pf-member .select { width: auto; }
.pf-vis { margin-bottom: 8px; }
.pp__list--prj { max-height: 50vh; }

@media (max-width: 1279px) {
  .pov { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1099px) {
  .prj { grid-template-columns: minmax(0, 1fr); }
  .prj__side { position: fixed; top: 0; bottom: 0; left: var(--rail-w); z-index: 60; width: min(310px, calc(100vw - var(--rail-w) - 24px)); transform: translateX(calc(-100% - var(--rail-w))); visibility: hidden; transition: transform var(--t-med) var(--ease), visibility 0s linear var(--t-med); }
  .prj--side-open .prj__side { transform: none; visibility: visible; box-shadow: var(--shadow-lg); transition: transform var(--t-med) var(--ease), visibility 0s; }
  .prj__scrim { display: block; position: fixed; inset: 0; z-index: 55; background: var(--backdrop); opacity: 0; pointer-events: none; transition: opacity var(--t-med) var(--ease); }
  .prj--side-open .prj__scrim { opacity: 1; pointer-events: auto; }
  .prj__sideclose, .prj__sidebtn { display: inline-grid; }
  .prj__sidebtn { margin-left: -6px; }
}
@media (max-width: 699px) {
  .prj__side { left: 0; bottom: var(--tabbar-h); width: min(310px, 86vw); }
  .prjh { padding: max(10px, env(safe-area-inset-top)) 16px 12px; gap: 10px; }
  .prjh__main { min-width: 0; flex-basis: calc(100% - 50px); }
  .prjh__name { font-size: 17px; }
  .prjh__prog { width: 100%; order: 5; }
  .prjh__actions { position: absolute; right: 12px; top: max(10px, env(safe-area-inset-top)); }
  .prjh__actions .faces { display: none; }
  .ptabs { padding: 0 6px; }
  .ptab { padding: 0 10px; }
  .ptab span { display: none; }
  .ptab.is-active span { display: inline; }
  .pcards, .pov, .pem, .pfiles, .pchats, .pcal, .pguests, .plog { padding-left: 16px; padding-right: 16px; }
  .msform__row { grid-template-columns: 1fr 1fr; }
  .msform__row .field:first-child { grid-column: 1 / -1; }
  .ftable__hide { display: none; }
  .emrow { flex-wrap: wrap; padding-bottom: 8px; }
  .emrow__side { padding-left: 52px; justify-content: flex-start; }
  .grow { flex-wrap: wrap; }
  .grow__act { width: 100%; justify-content: flex-end; }
}
