/*
 * Componenti riutilizzabili per le viste CRM dei progetti (variante 2).
 * Prefisso .crm-projects-v2 per non alterare le maschere esistenti.
 */
.crm-projects-v2 {
  --crm-primary: #4263d5;
  --crm-primary-soft: #edf1ff;
  --crm-ink: #172554;
  --crm-muted: #64748b;
  --crm-line: #e3eaf4;
  --crm-canvas: #f4f7fc;
  --crm-card: #ffffff;
  box-sizing: border-box;
  height: calc(100vh - 64px);
  height: calc(100dvh - 64px);
  min-height: 0;
  padding: 24px 28px 36px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--crm-canvas);
}
.crm-projects-v2 *, .crm-projects-v2 *::before, .crm-projects-v2 *::after { box-sizing: border-box; }
.crm-projects-v2__breadcrumb {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--crm-muted);
  font-size: .88rem;
}
.crm-projects-v2__breadcrumb i { color: var(--crm-primary); }
.crm-projects-v2__breadcrumb strong { color: #334155; }
.crm-projects-v2__intro { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 22px; }
.crm-projects-v2__intro h1 { margin: 0 0 5px; color: var(--crm-ink); font-size: clamp(1.55rem, 2vw, 2rem); font-weight: 700; }
.crm-projects-v2__intro p { margin: 0; color: var(--crm-muted); }
.crm-projects-v2__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.crm-projects-v2__button { display: inline-flex; gap: 8px; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid #cbd7ef; border-radius: 8px; color: #3154c8; background: #fff; font-weight: 600; line-height: 1; }.crm-projects-v2__button[hidden] { display: none; }.crm-projects-v2__button i { display: grid; width: 16px; height: 16px; place-items: center; line-height: 1; transform: translateY(-.5px); }
.crm-projects-v2__button:hover { background: #f6f8ff; border-color: #9baee6; }
.crm-projects-v2__button--primary { color: #fff; background: var(--crm-primary); border-color: var(--crm-primary); box-shadow: 0 4px 10px rgba(66, 99, 213, .18); }
.crm-projects-v2__button--primary:hover { color: #fff; background: #3656c5; }
.crm-projects-v2__health { display: grid; flex: 1 1 auto; min-height: 0; grid-template-columns: minmax(220px, 260px) minmax(0, 1fr); overflow: hidden; margin-bottom: 0; background: var(--crm-card); border: 1px solid var(--crm-line); border-radius: 14px; box-shadow: 0 8px 22px rgba(30, 41, 59, .05); }
.crm-projects-v2__status { padding: 22px; border-right: 1px solid var(--crm-line); }
.crm-projects-v2__status h2, .crm-projects-v2__list-title { margin: 0; color: var(--crm-ink); font-size: 1.12rem; font-weight: 700; }
.crm-projects-v2__donut-wrap { display: grid; place-items: center; margin: 18px 0; }
.crm-projects-v2__donut { display: grid; width: 132px; height: 132px; place-items: center; border-radius: 50%; background: conic-gradient(var(--crm-primary) var(--project-progress, 0%), #e8edf5 0); }
.crm-projects-v2__donut::before { width: 102px; height: 102px; content: ''; border-radius: 50%; background: #fff; grid-area: 1 / 1; }
.crm-projects-v2__donut-value { z-index: 1; color: var(--crm-ink); font-size: 1.45rem; font-weight: 700; grid-area: 1 / 1; text-align: center; }
.crm-projects-v2__donut-value small { display: block; color: var(--crm-muted); font-size: .7rem; font-weight: 500; }
.crm-projects-v2__legend { display: grid; gap: 11px; }
.crm-projects-v2__legend-row { display: flex; align-items: center; justify-content: space-between; color: #475569; font-size: .88rem; }
.crm-projects-v2__legend-label { display: flex; gap: 8px; align-items: center; }
.crm-projects-v2__dot { width: 9px; height: 9px; border-radius: 50%; background: #94a3b8; }
.crm-projects-v2__dot--running { background: #2f73e9; }.crm-projects-v2__dot--done { background: #1aa56e; }.crm-projects-v2__dot--late { background: #e24b4b; }
.crm-projects-v2__trend { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--crm-line); }
.crm-projects-v2__trend strong { display: block; color: #159866; font-size: 1.05rem; }.crm-projects-v2__trend span { color: var(--crm-muted); font-size: .76rem; }
.crm-projects-v2__workspace { display: flex; min-width: 0; min-height: 0; padding: 22px; flex-direction: column; }
.crm-projects-v2__list-header { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin: 16px 0; }
.crm-projects-v2__tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: #f1f5fb; border-radius: 9px; }
.crm-projects-v2__tab { padding: 7px 11px; border: 0; border-radius: 6px; color: #526174; background: transparent; font-size: .84rem; font-weight: 600; }.crm-projects-v2__tab--active { color: #fff; background: var(--crm-primary); }
.crm-projects-v2__quick-search { display: flex; gap: 8px; align-items: center; min-width: min(100%, 280px); padding: 0 11px; background: #fff; border: 1px solid #dbe3ef; border-radius: 8px; }.crm-projects-v2__quick-search i { display: grid; flex: 0 0 16px; height: 36px; place-items: center; color: #718096; line-height: 1; }.crm-projects-v2__quick-search input { width: 100%; height: 36px; color: #334155; border: 0; outline: 0; background: transparent; }
.crm-projects-v2__table { display: flex; flex: 1 1 auto; min-height: 0; flex-direction: column; overflow-x: auto; overflow-y: hidden; border: 1px solid var(--crm-line); border-radius: 10px; }
.crm-projects-v2__table-head, .crm-projects-v2__filters { flex: 0 0 auto; }
.crm-projects-v2__table #elenco { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.crm-projects-v2__grid { display: grid; grid-template-columns: 94px minmax(220px, 2fr) minmax(120px, 1fr) 125px 105px 150px 105px; gap: 12px; align-items: center; padding: 12px 16px; }
.crm-projects-v2__table-head { color: #526174; background: #f7f9fd; border-bottom: 1px solid var(--crm-line); font-size: .78rem; font-weight: 700; }.crm-projects-v2__table-head button { padding: 0; color: inherit; background: none; border: 0; font: inherit; }.crm-projects-v2__table-head i { margin-right: 4px; color: #94a3b8; }
.crm-projects-v2__filters { padding: 10px 16px; background: #fbfcfe; border-bottom: 1px solid var(--crm-line); }.crm-projects-v2__filters input { width: 100%; min-width: 0; height: 32px; padding: 5px 8px; color: #334155; background: #fff; border: 1px solid #dce4ef; border-radius: 6px; outline: 0; }.crm-projects-v2__filters input:focus { border-color: #9eb1ea; box-shadow: 0 0 0 3px rgba(66,99,213,.1); }
.crm-projects-v2__table-head, .crm-projects-v2__filters { padding-right: calc(16px + var(--crm-scrollbar-width, 0px)); }
.crm-projects-v2__row { min-height: 58px; color: #334155; border-bottom: 1px solid #edf1f6; font-size: .88rem; }.crm-projects-v2__row:last-child { border-bottom: 0; }.crm-projects-v2__row:hover { background: #fbfcff; }.crm-projects-v2__code { padding: 0; color: #3154c8; background: transparent; border: 0; font: inherit; font-weight: 700; text-align: left; text-decoration: underline; cursor: pointer; }.crm-projects-v2__code:hover { color: #1e3a9a; }.crm-projects-v2__code:focus-visible { outline: 2px solid #4263d5; outline-offset: 2px; border-radius: 2px; }.crm-projects-v2__name { overflow: hidden; color: #1e293b; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.crm-projects-v2__progress { display: flex; gap: 8px; align-items: center; }.crm-projects-v2__progress-track { width: 100%; height: 8px; overflow: hidden; border-radius: 99px; background: #e8edf4; }.crm-projects-v2__progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--progress-color, #4263d5); }.crm-projects-v2__progress small { min-width: 36px; color: #526174; font-weight: 600; }
.crm-projects-v2__badge { display: inline-flex; gap: 5px; align-items: center; max-width: max-content; padding: 5px 9px; border-radius: 99px; color: #526174; background: #edf1f7; font-size: .76rem; font-weight: 700; }.crm-projects-v2__badge::before { width: 7px; height: 7px; content: ''; border-radius: 50%; background: currentColor; }.crm-projects-v2__badge--running { color: #1876d2; background: #e6f1ff; }.crm-projects-v2__badge--done { color: #13865a; background: #e3f7ed; }.crm-projects-v2__badge--late { color: #c23b3b; background: #ffebeb; }
.crm-projects-v2__row-actions { display: flex; gap: 5px; justify-content: flex-end; }.crm-projects-v2__row-actions button { display: grid; width: 30px; height: 30px; padding: 0; place-items: center; color: #526174; background: #fff; border: 1px solid #dce4ef; border-radius: 6px; line-height: 1; }.crm-projects-v2__row-actions button i { display: block; margin: 0; line-height: 1; }.crm-projects-v2__row-actions button:hover { color: #3154c8; background: #f4f7ff; }.crm-projects-v2__row-actions .crm-projects-v2__delete:hover { color: #cf3b3b; background: #fff2f2; }
/* Dark mode: segue l'attributo data-bs-theme impostato dallo switch globale. */
html[data-bs-theme="dark"] .crm-projects-v2 { --crm-primary: #7184ef; --crm-primary-soft: #282c4c; --crm-ink: #f0f3fa; --crm-muted: #a9b2c5; --crm-line: #36364e; --crm-canvas: #171722; --crm-card: #202031; background: var(--crm-canvas); }
html[data-bs-theme="dark"] .crm-projects-v2__breadcrumb strong, html[data-bs-theme="dark"] .crm-projects-v2__code { color: #a9b7ff; }
html[data-bs-theme="dark"] .crm-projects-v2__health, html[data-bs-theme="dark"] .crm-projects-v2__table { box-shadow: 0 8px 22px rgba(0,0,0,.18); }
html[data-bs-theme="dark"] .crm-projects-v2__donut { background: conic-gradient(var(--crm-primary) var(--project-progress, 0%), #36364e 0); }
html[data-bs-theme="dark"] .crm-projects-v2__donut::before { background: #202031; }
html[data-bs-theme="dark"] .crm-projects-v2__button { color: #b9c5ff; background: #28283d; border-color: #484866; }html[data-bs-theme="dark"] .crm-projects-v2__button:hover { background: #30304a; border-color: #6976ba; }html[data-bs-theme="dark"] .crm-projects-v2__button--primary { color: #fff; background: #5269db; border-color: #5269db; }html[data-bs-theme="dark"] .crm-projects-v2__button--primary:hover { background: #6178e9; }
html[data-bs-theme="dark"] .crm-projects-v2__tabs, html[data-bs-theme="dark"] .crm-projects-v2__table-head, html[data-bs-theme="dark"] .crm-projects-v2__filters { background: #242438; }
html[data-bs-theme="dark"] .crm-projects-v2__tab { color: #b3bdd1; }html[data-bs-theme="dark"] .crm-projects-v2__tab--active { color: #fff; background: #5269db; }
html[data-bs-theme="dark"] .crm-projects-v2__quick-search, html[data-bs-theme="dark"] .crm-projects-v2__filters input, html[data-bs-theme="dark"] .crm-projects-v2__row-actions button { color: #dbe3f3; background: #28283d; border-color: #454561; }
html[data-bs-theme="dark"] .crm-projects-v2__quick-search input, html[data-bs-theme="dark"] .crm-projects-v2__filters input { color: #e4e8f2; }html[data-bs-theme="dark"] .crm-projects-v2__quick-search input::placeholder { color: #969ab2; }
html[data-bs-theme="dark"] .crm-projects-v2__row { color: #cbd3e3; border-bottom-color: #33334b; }html[data-bs-theme="dark"] .crm-projects-v2__row:hover { background: #26263a; }html[data-bs-theme="dark"] .crm-projects-v2__name { color: #f0f3fa; }
html[data-bs-theme="dark"] .crm-projects-v2__progress-track { background: #3a3a52; }html[data-bs-theme="dark"] .crm-projects-v2__progress small, html[data-bs-theme="dark"] .text-muted { color: #a9b2c5 !important; }
html[data-bs-theme="dark"] .crm-projects-v2__row-actions button:hover { color: #b9c5ff; background: #33334d; }html[data-bs-theme="dark"] .crm-projects-v2__row-actions .crm-projects-v2__delete:hover { color: #ff9696; background: #452b36; }
/* Il tema globale dark azzera il border-radius di tutti i button: la variante mantiene la propria gerarchia visiva. */
html[data-bs-theme="dark"] .crm-projects-v2__button { border-radius: 8px !important; font-size: 1rem !important; }
html[data-bs-theme="dark"] .crm-projects-v2__button i { font-size: 1rem !important; }
html[data-bs-theme="dark"] .crm-projects-v2__tab { border-radius: 6px !important; font-size: .84rem !important; }
html[data-bs-theme="dark"] .crm-projects-v2__row-actions button { border-radius: 6px !important; font-size: 1rem !important; }
/* Rende le dimensioni in dark identiche alla variante light, indipendentemente dalle regole globali del tema. */
html[data-bs-theme="dark"] .crm-projects-v2__breadcrumb { font-size: .88rem !important; }
html[data-bs-theme="dark"] .crm-projects-v2__intro h1 { font-size: clamp(1.55rem, 2vw, 2rem) !important; }
html[data-bs-theme="dark"] .crm-projects-v2__intro p, html[data-bs-theme="dark"] .crm-projects-v2__legend-row, html[data-bs-theme="dark"] .crm-projects-v2__row { font-size: .88rem !important; }
html[data-bs-theme="dark"] .crm-projects-v2__status h2, html[data-bs-theme="dark"] .crm-projects-v2__list-title { font-size: 1.12rem !important; }
html[data-bs-theme="dark"] .crm-projects-v2__donut-value { font-size: 1.45rem !important; }
html[data-bs-theme="dark"] .crm-projects-v2__donut-value small { font-size: .7rem !important; }
html[data-bs-theme="dark"] .crm-projects-v2__table-head { font-size: .78rem !important; }
html[data-bs-theme="dark"] .crm-projects-v2__badge { border-radius: 99px !important; font-size: .76rem !important; }
html[data-bs-theme="dark"] .crm-projects-v2__quick-search { border-radius: 8px !important; }
html[data-bs-theme="dark"] .crm-projects-v2__filters input { border-radius: 6px !important; }
@media (min-width: 1200px) { #MENUHEAD.menu-topbar-v2.menu-topbar-v2--sidebar-open ~ .crm-projects-v2 { width: calc(100% - 300px); margin-left: 300px; } }
@media (max-width: 1200px) { .crm-projects-v2__grid { grid-template-columns: 84px minmax(180px, 2fr) 115px 105px 105px 130px 90px; gap: 8px; padding-right: 11px; padding-left: 11px; }.crm-projects-v2__actions { justify-content: flex-start; } }
@media (max-width: 960px) { .crm-projects-v2 { padding: 20px 16px; }.crm-projects-v2__health { grid-template-columns: 1fr; }.crm-projects-v2__status { border-right: 0; border-bottom: 1px solid var(--crm-line); }.crm-projects-v2__status-inner { display: grid; grid-template-columns: 160px 1fr; gap: 22px; align-items: center; }.crm-projects-v2__donut-wrap { margin: 0; }.crm-projects-v2__trend { display: none; }.crm-projects-v2__table { overflow-x: auto; }.crm-projects-v2__grid { min-width: 900px; } }
@media (max-width: 640px) { .crm-projects-v2 { padding: 16px 10px; }.crm-projects-v2__intro { display: block; }.crm-projects-v2__actions { margin-top: 14px; }.crm-projects-v2__workspace, .crm-projects-v2__status { padding: 16px; }.crm-projects-v2__status-inner { grid-template-columns: 1fr; }.crm-projects-v2__list-header { align-items: stretch; }.crm-projects-v2__tabs { width: 100%; } }

/* Modale progetto: override circoscritto alla vista variante 2. */
#inserimentoProgetto .modal-dialog { max-width: 940px; }
#inserimentoProgetto .modal-content { overflow: hidden; border: 1px solid #dce5f3; border-radius: 16px; box-shadow: 0 24px 60px rgba(27, 43, 87, .22); }
#inserimentoProgetto .modal-header { min-height: 82px; padding: 24px 30px; color: #fff; background: linear-gradient(122deg, #263f9f 0%, #4263d5 58%, #5d78df 100%); border: 0; }
#inserimentoProgetto .modal-title { display: flex; align-items: center; gap: 11px; margin: 0; color: #fff !important; font-size: 1.18rem !important; font-weight: 700; letter-spacing: -.01em; text-shadow: 0 1px 1px rgba(20, 35, 95, .18); }
#inserimentoProgetto .modal-title::before { display: grid; width: 34px; height: 34px; content: '\f0ae'; place-items: center; border: 1px solid rgba(255,255,255,.22); border-radius: 10px; background: rgba(255,255,255,.14); font-family: 'FontAwesome'; font-size: .95rem; font-weight: normal; }
#inserimentoProgetto .btn-close { width: 34px; height: 34px; margin: 0; padding: 0; border-radius: 9px; background-color: rgba(255,255,255,.13); background-position: center; filter: brightness(0) invert(1); opacity: .9; }
#inserimentoProgetto .btn-close:hover { background-color: rgba(255,255,255,.24); opacity: 1; }
#inserimentoProgetto .modal-body { padding: 30px; background: #f8faff; }
#inserimentoProgetto .modal-body .container-fluid { max-width: 100%; padding: 0; }
#inserimentoProgetto .modal-body .row { margin-right: 0; margin-bottom: 18px; margin-left: 0; padding: 18px 20px 2px; border: 1px solid #e1e8f4; border-radius: 11px; background: #fff; }
#inserimentoProgetto .modal-body .row:last-child { margin-bottom: 0; }
#inserimentoProgetto .form-floating { min-width: 0; }
#inserimentoProgetto .form-floating > .form-control { min-height: 50px; padding: 1.45rem .85rem .45rem; color: #24344f; border: 1px solid #cdd9eb; border-radius: 8px; background-color: #fff; box-shadow: none; font-size: .95rem; font-weight: 500; }
#inserimentoProgetto .form-floating > .form-control:focus { border-color: #617ce2; box-shadow: 0 0 0 3px rgba(66, 99, 213, .14); }
#inserimentoProgetto .form-floating > .form-control:disabled { color: #53647e; border-color: #dbe3ef; background-color: #f2f5fa; opacity: 1; }
#inserimentoProgetto .form-floating > label { height: auto; padding: .55rem .85rem; color: #61708a; font-size: .78rem; font-weight: 700; letter-spacing: .015em; }
#inserimentoProgetto .form-floating > label::after { background-color: #fff !important; }
#inserimentoProgetto #Ccodprog ~ label::after, #inserimentoProgetto #Cclirag1 ~ label::after, #inserimentoProgetto #Cdtfinp ~ label::after { background-color: #f2f5fa !important; }
#inserimentoProgetto .form-floating > .form-control:focus ~ label, #inserimentoProgetto .form-floating > .form-control:not(:placeholder-shown) ~ label { color: #4263d5; }
#inserimentoProgetto .form-control.is-invalid { border-color: #df6a6a; background-image: none; }
#inserimentoProgetto .form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(226, 75, 75, .13); }
#inserimentoProgetto .invalid-feedback { margin-top: 6px; font-size: .76rem; font-weight: 600; }
#inserimentoProgetto .modal-footer { gap: 10px; padding: 18px 30px; background: #fff; border-top: 1px solid #e5ebf4; }
#inserimentoProgetto .modal-footer .btn { min-width: 116px; min-height: 40px; margin: 0; border-radius: 8px; font-size: .9rem; font-weight: 700; }
#inserimentoProgetto #salvaProgetto { border-color: #4263d5; background: #4263d5; box-shadow: 0 4px 10px rgba(66, 99, 213, .2); }
#inserimentoProgetto #salvaProgetto:hover { border-color: #3656c5; background: #3656c5; }
#inserimentoProgetto #abbandonaProgetto { color: #8a5a00; border-color: #f1d69b; background: #fff8e7; }
#inserimentoProgetto #abbandonaProgetto:hover { color: #754900; border-color: #e9c36c; background: #fff1ca; }
html[data-bs-theme="dark"] #inserimentoProgetto .modal-content { border-color: #454561; background: #202031; }
html[data-bs-theme="dark"] #inserimentoProgetto .modal-body { background: #1a1a28; }
html[data-bs-theme="dark"] #inserimentoProgetto .modal-body .row, html[data-bs-theme="dark"] #inserimentoProgetto .modal-footer { border-color: #3b3b56; background: #252538; }
html[data-bs-theme="dark"] #inserimentoProgetto .form-floating > .form-control { color: #edf1fa; border-color: #4b4b6d; background-color: #2d2d43; }
html[data-bs-theme="dark"] #inserimentoProgetto .form-floating > .form-control:disabled { color: #b9c3d6; border-color: #464663; background-color: #29293c; }
html[data-bs-theme="dark"] #inserimentoProgetto .form-floating > label { color: #aeb9cf; }
html[data-bs-theme="dark"] #inserimentoProgetto .form-floating > label::after { background-color: #2d2d43 !important; }
html[data-bs-theme="dark"] #inserimentoProgetto #Ccodprog ~ label::after, html[data-bs-theme="dark"] #inserimentoProgetto #Cclirag1 ~ label::after, html[data-bs-theme="dark"] #inserimentoProgetto #Cdtfinp ~ label::after { background-color: #29293c !important; }
html[data-bs-theme="dark"] #inserimentoProgetto #abbandonaProgetto { color: #ffd47b; border-color: #7c6330; background: #3d3420; }
@media (max-width: 575.98px) { #inserimentoProgetto .modal-dialog { margin: .75rem; } #inserimentoProgetto .modal-header, #inserimentoProgetto .modal-body { padding: 20px; } #inserimentoProgetto .modal-body .row { padding: 16px 14px 0; } #inserimentoProgetto .modal-body .row .form-floating { margin-bottom: 16px; } #inserimentoProgetto .modal-footer { padding: 16px 20px; } #inserimentoProgetto .modal-footer .btn { flex: 1 1 100%; } }

/* Modale di conferma eliminazione: coerente con la gestione progetto. */
#confermaCancella .modal-dialog { max-width: 470px; }
#confermaCancella .modal-content { overflow: hidden; border: 1px solid #f0d7d7; border-radius: 16px; box-shadow: 0 24px 60px rgba(83, 33, 42, .24); }
#confermaCancella .modal-header { min-height: 78px; padding: 22px 26px; color: #fff; background: linear-gradient(122deg, #a83245, #d84a5d); border: 0; }
#confermaCancella .modal-title { display: flex; align-items: center; gap: 10px; margin: 0; color: #fff !important; font-size: 1.1rem !important; font-weight: 700; }
#confermaCancella .modal-title::before { display: grid; width: 33px; height: 33px; content: '\f071'; place-items: center; border: 1px solid rgba(255,255,255,.24); border-radius: 50%; background: rgba(255,255,255,.14); font-family: 'FontAwesome'; font-size: .9rem; font-weight: normal; }
#confermaCancella .btn-close { width: 34px; height: 34px; margin: 0; padding: 0; border-radius: 9px; background-color: rgba(255,255,255,.13); background-position: center; filter: brightness(0) invert(1); opacity: .9; }
#confermaCancella .btn-close:hover { background-color: rgba(255,255,255,.24); opacity: 1; }
#confermaCancella .modal-body { padding: 26px; background: #fffafa; }
#confermaCancella .modal-body .container-fluid, #confermaCancella .modal-body .row { margin: 0; padding: 0; }
#confermaCancella .modal-body .form-control { min-height: 84px; padding: 18px 18px 18px 58px; color: #5f2630; border: 1px solid #f1d7d9; border-radius: 11px; background: #fff; box-shadow: none; font-size: .96rem; font-weight: 600; line-height: 1.45; position: relative; }
#confermaCancella .modal-body .form-control::before { position: absolute; top: 50%; left: 18px; display: grid; width: 27px; height: 27px; content: '\f1f8'; place-items: center; color: #d84a5d; border-radius: 8px; background: #fff0f1; font-family: 'FontAwesome'; font-size: .82rem; font-weight: normal; transform: translateY(-50%); }
#confermaCancella .modal-footer { gap: 10px; padding: 17px 26px; background: #fff; border-top: 1px solid #f2e3e4; }
#confermaCancella .modal-footer .btn { min-width: 104px; min-height: 40px; margin: 0; border-radius: 8px; font-size: .9rem; font-weight: 700; }
#confermaCancella #chiudiCancella { color: #53647e; border-color: #d6e0ec; background: #fff; }
#confermaCancella #chiudiCancella:hover { color: #334155; border-color: #bfcddd; background: #f6f8fb; }
#confermaCancella .btn-danger { border-color: #cf3f52; background: #cf3f52; box-shadow: 0 4px 10px rgba(207, 63, 82, .2); }
#confermaCancella .btn-danger:hover { border-color: #b63245; background: #b63245; }
html[data-bs-theme="dark"] #confermaCancella .modal-content { border-color: #663946; background: #28202a; }
html[data-bs-theme="dark"] #confermaCancella .modal-body { background: #211b24; }
html[data-bs-theme="dark"] #confermaCancella .modal-body .form-control { color: #f3d9dd; border-color: #593944; background: #30252f; }
html[data-bs-theme="dark"] #confermaCancella .modal-body .form-control::before { color: #ff9caa; background: #4a2934; }
html[data-bs-theme="dark"] #confermaCancella .modal-footer { border-color: #4a3540; background: #28202a; }
html[data-bs-theme="dark"] #confermaCancella #chiudiCancella { color: #c6d0df; border-color: #4b4b62; background: #303042; }
@media (max-width: 575.98px) { #confermaCancella .modal-dialog { margin: .75rem; } #confermaCancella .modal-header, #confermaCancella .modal-body { padding: 20px; } #confermaCancella .modal-footer { padding: 16px 20px; } #confermaCancella .modal-footer .btn { flex: 1 1 100%; } }

/* Modale di inserimento/modifica (classe .form-modal-v2): stessa impostazione della conferma eliminazione, in blu. */
.form-modal-v2 .modal-dialog { max-width: 470px; }
.form-modal-v2 .modal-dialog.modal-lg { max-width: 800px; }
.form-modal-v2--calendar .modal-title::before { content: '\f073'; }
.form-modal-v2--view .modal-title::before { content: '\f05a'; }
.form-modal-v2 .modal-content { overflow: hidden; border: 1px solid #dce5f3; border-radius: 16px; box-shadow: 0 24px 60px rgba(27, 43, 87, .22); }
.form-modal-v2 .modal-header { min-height: 78px; padding: 22px 26px; color: #fff; background: linear-gradient(122deg, #263f9f 0%, #4263d5 58%, #5d78df 100%); border: 0; }
.form-modal-v2 .modal-title { display: flex; align-items: center; gap: 10px; margin: 0; color: #fff !important; font-size: 1.1rem !important; font-weight: 700; }
.form-modal-v2 .modal-title::before { display: grid; width: 33px; height: 33px; content: '\f044'; place-items: center; border: 1px solid rgba(255,255,255,.24); border-radius: 50%; background: rgba(255,255,255,.14); font-family: 'FontAwesome'; font-size: .9rem; font-weight: normal; }
.form-modal-v2 .btn-close { width: 34px; height: 34px; margin: 0; padding: 0; border-radius: 9px; background-color: rgba(255,255,255,.13); background-position: center; filter: brightness(0) invert(1); opacity: .9; }
.form-modal-v2 .btn-close:hover { background-color: rgba(255,255,255,.24); opacity: 1; }
.form-modal-v2 .modal-body { padding: 26px; background: #f8faff; }
.form-modal-v2 .modal-body form { display: grid; gap: 14px; padding: 18px; border: 1px solid #d9e3f6; border-radius: 11px; background: #fff; }
.form-modal-v2 .modal-body .row { row-gap: 8px; margin: 0 -6px; }
.form-modal-v2 .modal-body form > .mb-3 { margin-bottom: 0 !important; }
.form-modal-v2__section { margin: 0 0 8px; color: #526174; font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.form-modal-v2__table { max-height: 260px; overflow-y: auto; border: 1px solid #e3eaf4; border-radius: 10px; background: #fff; }
.form-modal-v2__table-row { display: grid; grid-template-columns: 100px 70px minmax(0, 1fr); gap: 12px; align-items: start; padding: 9px 14px; color: #334155; border-bottom: 1px solid #edf1f6; font-size: .86rem; }
.form-modal-v2__table-row:last-child { border-bottom: 0; }
.form-modal-v2__table-head { position: sticky; top: 0; z-index: 1; padding-top: 7px; padding-bottom: 7px; color: #526174; border-bottom-color: #e3eaf4; background: #f7f9fd; font-size: .74rem; font-weight: 700; }
.form-modal-v2__table-row > span:nth-child(-n+2) { font-variant-numeric: tabular-nums; white-space: nowrap; }
.form-modal-v2__table-text { line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.form-modal-v2__table-empty { padding: 18px; color: #64748b; text-align: center; font-size: .86rem; }
.form-modal-v2 .modal-body .row > [class*="col"] { padding: 0 6px; }
.form-modal-v2 .modal-body .row > .ms-auto:empty { display: none; }
.form-modal-v2 .form-label, .form-modal-v2 .col-form-label { margin: 0 0 5px; padding: 0; color: #475569; font-size: .8rem; font-weight: 600; }
.form-modal-v2 .form-control, .form-modal-v2 .form-select { min-height: 40px; color: #1e293b; border-color: #dce4ef; border-radius: 9px; font-size: .92rem; }
.form-modal-v2 .form-control:focus, .form-modal-v2 .form-select:focus { border-color: #9eb1ea; box-shadow: 0 0 0 3px rgba(66, 99, 213, .12); }
.form-modal-v2 .form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(220, 53, 69, .12); }
.form-modal-v2 .form-control:disabled { color: #64748b; background: #f7f9fd; }
.form-modal-v2 .modal-body form hr { margin: 2px 0; border-color: #e1e8f4; opacity: 1; }
.form-modal-v2 .form-switch { display: flex; align-items: center; gap: 9px; min-height: 38px; margin: 0; padding: 7px 10px; border: 1px solid #e1e8f4; border-radius: 9px; background: #f8faff; }
.form-modal-v2 .form-switch .form-check-input { position: static; float: none; flex: 0 0 auto; margin: 0; }
.form-modal-v2 .form-switch .form-check-label { margin: 0; color: #334155; font-size: .84rem; cursor: pointer; }
.form-modal-v2 .modal-footer { gap: 10px; padding: 17px 26px; background: #fff; border-top: 1px solid #e3eaf6; }
.form-modal-v2 .modal-footer .btn { min-width: 104px; min-height: 40px; margin: 0; border-radius: 8px; font-size: .9rem; font-weight: 700; }
.form-modal-v2 .modal-footer .btn-warning { color: #53647e; border-color: #d6e0ec; background: #fff; }
.form-modal-v2 .modal-footer .btn-warning:hover { color: #334155; border-color: #bfcddd; background: #f6f8fb; }
.form-modal-v2 .modal-footer .btn-primary { border-color: #4263d5; background: #4263d5; box-shadow: 0 4px 10px rgba(66, 99, 213, .2); }
.form-modal-v2 .modal-footer .btn-primary:hover { border-color: #3553bf; background: #3553bf; }
html[data-bs-theme="dark"] .form-modal-v2 .modal-content { border-color: #454561; background: #202031; }
html[data-bs-theme="dark"] .form-modal-v2 .modal-body { background: #1a1a28; }
html[data-bs-theme="dark"] .form-modal-v2 .modal-body form { border-color: #3b3b56; background: #252538; }
html[data-bs-theme="dark"] .form-modal-v2__section { color: #cbd3e3; }
html[data-bs-theme="dark"] .form-modal-v2__table { border-color: #3b3b56; background: #202031; }
html[data-bs-theme="dark"] .form-modal-v2__table-row { color: #cbd3e3; border-bottom-color: #33334b; }
html[data-bs-theme="dark"] .form-modal-v2__table-head { color: #cbd3e3; background: #242438; }
html[data-bs-theme="dark"] .form-modal-v2 .form-label, html[data-bs-theme="dark"] .form-modal-v2 .col-form-label { color: #cbd3e3; }
html[data-bs-theme="dark"] .form-modal-v2 .form-control, html[data-bs-theme="dark"] .form-modal-v2 .form-select { color: #dbe3f3; border-color: #454561; background-color: #28283d; }
html[data-bs-theme="dark"] .form-modal-v2 .form-control:disabled { color: #a9b2c5; background: #242438; }
html[data-bs-theme="dark"] .form-modal-v2 .modal-body form hr { border-color: #3b3b56; }
html[data-bs-theme="dark"] .form-modal-v2 .form-switch { border-color: #3b3b56; background: #202031; }
html[data-bs-theme="dark"] .form-modal-v2 .form-switch .form-check-label { color: #dbe3f3; }
html[data-bs-theme="dark"] .form-modal-v2 .modal-footer { border-color: #3b3b56; background: #202031; }
html[data-bs-theme="dark"] .form-modal-v2 .modal-footer .btn-warning { color: #c6d0df; border-color: #4b4b62; background: #303042; }
@media (max-width: 575.98px) { .form-modal-v2 .modal-dialog { margin: .75rem; } .form-modal-v2 .modal-header, .form-modal-v2 .modal-body { padding: 20px; } .form-modal-v2 .modal-body form { padding: 16px; } .form-modal-v2 .modal-footer { padding: 16px 20px; } .form-modal-v2 .modal-footer .btn { flex: 1 1 100%; } }

/* Dettaglio attività progetto — variante 2, ispirata al mockup elenco attività. */
.crm-project-activities-v2 { --act-primary:#3569e8; --act-ink:#10245c; --act-muted:#7081a3; --act-line:#e2eaf5; --act-canvas:#f3f7fd; --act-card:#fff; box-sizing:border-box; min-height:calc(100vh - 64px); padding:26px 28px 38px; background:var(--act-canvas); }
.crm-project-activities-v2 *, .crm-project-activities-v2 *::before, .crm-project-activities-v2 *::after { box-sizing:border-box; }
.crm-project-activities-v2__intro { margin-bottom:18px; }.crm-project-activities-v2__intro h1 { margin:0 0 5px; color:var(--act-ink); font-size:clamp(1.6rem,2.3vw,2.15rem); font-weight:750; letter-spacing:-.025em; }.crm-project-activities-v2__intro h1 span { color:inherit; }.crm-project-activities-v2__intro p { margin:0; color:var(--act-muted); }
.crm-project-activities-v2__overview { display:grid; grid-template-columns:1fr 1fr 1.2fr 1.25fr auto; gap:0; align-items:center; margin-bottom:18px; overflow:hidden; border:1px solid var(--act-line); border-radius:13px; background:var(--act-card); box-shadow:0 8px 22px rgba(30,41,59,.05); }
.crm-project-activities-v2__summary-item { display:flex; gap:13px; align-items:center; min-height:82px; padding:16px 20px; border-right:1px solid var(--act-line); }.crm-project-activities-v2__summary-item > i { width:26px; color:#4263d5; font-size:1.45rem; text-align:center; }.crm-project-activities-v2__summary-item small, .crm-project-activities-v2__summary-progress small { display:block; color:var(--act-muted); font-size:.77rem; }.crm-project-activities-v2__summary-item strong, .crm-project-activities-v2__summary-progress strong { display:block; color:var(--act-ink); font-size:.92rem; }
.crm-project-activities-v2__summary-progress { display:flex; gap:12px; align-items:center; min-height:82px; padding:14px 20px; border-right:1px solid var(--act-line); }.crm-project-activities-v2__donut { display:grid; width:58px; height:58px; place-items:center; flex:0 0 58px; border-radius:50%; background:conic-gradient(#35b77d var(--att-progress,0%), #e6ecf5 0); }.crm-project-activities-v2__donut::before { width:45px; height:45px; content:''; border-radius:50%; background:var(--act-card); grid-area:1/1; }.crm-project-activities-v2__donut span { z-index:1; color:var(--act-ink); font-size:.8rem; font-weight:750; grid-area:1/1; }
.crm-project-activities-v2__overview-actions { display:flex; gap:9px; padding:15px 18px; }.crm-project-activities-v2__button { display:inline-flex; min-height:40px; gap:8px; align-items:center; justify-content:center; padding:0 13px; color:#315ed8; border:1px solid #9ab5ef; border-radius:7px; background:#fff; font-size:.88rem; font-weight:700; white-space:nowrap; }.crm-project-activities-v2__button:hover { color:#244db6; background:#f4f7ff; }.crm-project-activities-v2__button--primary { color:#fff; border-color:var(--act-primary); background:var(--act-primary); box-shadow:0 4px 10px rgba(53,105,232,.22); }.crm-project-activities-v2__button--primary:hover { color:#fff; background:#2858d1; }
.crm-project-activities-v2__workspace { overflow:hidden; border:1px solid var(--act-line); border-radius:13px; background:var(--act-card); box-shadow:0 8px 22px rgba(30,41,59,.05); }.crm-project-activities-v2__workspace-head { display:flex; align-items:center; justify-content:space-between; padding:18px 20px 13px; }.crm-project-activities-v2__workspace-head h2 { margin:0; color:var(--act-ink); font-size:1.1rem; font-weight:750; }.crm-project-activities-v2__workspace-head span { color:var(--act-muted); font-size:.82rem; }
.crm-project-activities-v2__tabs { display:grid; grid-template-columns:repeat(4,1fr); margin:0 18px 14px; overflow:hidden; border:1px solid #dce5f2; border-radius:9px; background:#f6f8fc; }.crm-project-activities-v2__tab { min-height:42px; color:#4f6388; border:0; border-right:1px solid #dce5f2; background:transparent; font-size:.87rem; font-weight:700; }.crm-project-activities-v2__tab:last-child { border-right:0; }.crm-project-activities-v2__tab--active { color:#fff; background:linear-gradient(115deg,#3569e8,#4e7ff1); box-shadow:0 3px 8px rgba(53,105,232,.22); }
.crm-project-activities-v2__filters { display:grid; grid-template-columns:2fr repeat(4,1fr); gap:10px; padding:0 18px 16px; }.crm-project-activities-v2__filters label { display:flex; align-items:center; gap:8px; height:38px; padding:0 10px; color:#8190aa; border:1px solid #d8e2f0; border-radius:7px; background:#fff; }.crm-project-activities-v2__filters label:focus-within { border-color:#8ea9ed; box-shadow:0 0 0 3px rgba(53,105,232,.1); }.crm-project-activities-v2__filters input { width:100%; min-width:0; border:0; outline:0; color:#263b66; background:transparent; font-size:.82rem; }.crm-project-activities-v2__filters input::placeholder { color:#8b9ab2; }
.crm-project-activities-v2__table-wrap { overflow-x:auto; border-top:1px solid var(--act-line); }.crm-project-activities-v2__table-head, .crm-project-activities-v2__row { display:grid; min-width:920px; grid-template-columns:minmax(230px,2fr) 90px 105px 105px 112px 108px 145px 112px; gap:12px; align-items:center; padding:11px 18px; }.crm-project-activities-v2__table-head { color:#536888; background:#f7f9fc; font-size:.75rem; font-weight:750; }.crm-project-activities-v2__table-head button { padding:0; color:inherit; border:0; background:transparent; font:inherit; text-align:left; }.crm-project-activities-v2__table-head i { margin-left:3px; color:#96a5bd; }
.crm-project-activities-v2__row { min-height:58px; color:#34486e; border-top:1px solid #edf1f7; font-size:.84rem; }.crm-project-activities-v2__row:hover { background:#fbfcff; }.crm-project-activities-v2__row--task { background:#fcfdff; }.crm-project-activities-v2__activity { display:flex; gap:9px; align-items:center; min-width:0; color:#21365f; }.crm-project-activities-v2__activity > i { color:#4380ec; font-size:1rem; }.crm-project-activities-v2__toggle, .crm-project-activities-v2__toggle-placeholder { display:grid; width:20px; height:20px; flex:0 0 20px; place-items:center; }.crm-project-activities-v2__toggle { padding:0; color:#5b76ad; border:0; border-radius:5px; background:transparent; }.crm-project-activities-v2__toggle:hover { color:#245fd7; background:#eaf1ff; }.crm-project-activities-v2__toggle i { font-size:.72rem; }.crm-project-activities-v2__row--task .crm-project-activities-v2__activity { padding-left:24px; position:relative; }.crm-project-activities-v2__row--task .crm-project-activities-v2__activity::before { position:absolute; left:7px; width:10px; height:17px; content:''; border-bottom:1px solid #d4deed; border-left:1px solid #d4deed; }.crm-project-activities-v2__edit-link { padding:0; color:inherit; border:0; background:transparent; font:inherit; text-align:left; text-decoration:none; cursor:pointer; }.crm-project-activities-v2__edit-link:hover { color:#285bce; }.crm-project-activities-v2__edit-link:focus-visible { outline:2px solid #4263d5; outline-offset:2px; border-radius:2px; }.crm-project-activities-v2__edit-link--description { overflow:hidden; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }.crm-project-activities-v2__code { color:#3569d9; font-weight:700; }
.crm-project-activities-v2__status { justify-self:start; padding:5px 9px; border-radius:6px; font-size:.75rem; font-weight:750; }.crm-project-activities-v2__status--done { color:#14845b; background:#dff6eb; }.crm-project-activities-v2__status--running { color:#1768d5; background:#e4efff; }.crm-project-activities-v2__status--not-started { color:#62738f; background:#edf1f6; }.crm-project-activities-v2__progress { display:flex; gap:7px; align-items:center; }.crm-project-activities-v2__progress > span { display:block; width:100%; height:8px; overflow:hidden; border-radius:99px; background:#e4eaf3; }.crm-project-activities-v2__progress i { display:block; height:100%; border-radius:inherit; background:#477ee9; }.crm-project-activities-v2__row:has(.crm-project-activities-v2__status--done) .crm-project-activities-v2__progress i { background:#36b47d; }.crm-project-activities-v2__progress small { min-width:32px; color:#5f7190; font-weight:700; }.crm-project-activities-v2__actions { display:flex; gap:5px; justify-content:flex-end; }.crm-project-activities-v2__actions button { display:grid; width:29px; height:29px; padding:0; place-items:center; color:#657795; border:1px solid #dbe4f0; border-radius:6px; background:#fff; }.crm-project-activities-v2__actions button:hover { color:#285bce; border-color:#b9cbeb; background:#f1f5ff; }.crm-project-activities-v2__actions button:nth-child(2):hover { color:#cc3e50; background:#fff3f4; }.crm-project-activities-v2__empty { padding:42px 20px; color:var(--act-muted); text-align:center; }
.crm-project-activities-v2 #inserimentoAttivita .modal-dialog { max-width:940px; }.crm-project-activities-v2 #inserimentoAttivita .modal-content { border-radius:16px; }
#inserimentoAttivita .modal-content { overflow:hidden; border:1px solid #dce5f3; border-radius:16px; box-shadow:0 24px 60px rgba(27,43,87,.22); }#inserimentoAttivita .modal-header { min-height:82px; padding:24px 30px; color:#fff; border:0; background:linear-gradient(122deg,#263f9f 0%,#4263d5 58%,#5d78df 100%); }#inserimentoAttivita .modal-title { display:flex; gap:11px; align-items:center; margin:0; color:#fff !important; font-size:1.18rem !important; font-weight:700; }#inserimentoAttivita .modal-title::before { display:grid; width:34px; height:34px; content:'\f0ae'; place-items:center; border:1px solid rgba(255,255,255,.22); border-radius:10px; background:rgba(255,255,255,.14); font-family:'FontAwesome'; font-weight:normal; }#inserimentoAttivita .modal-header .btn-close { filter:brightness(0) invert(1); }#inserimentoAttivita .modal-body { padding:30px; background:#f8faff; }#inserimentoAttivita .modal-body .container-fluid { padding:0; }#inserimentoAttivita .modal-body .row { margin-right:0; margin-bottom:18px; margin-left:0; padding:18px 20px 2px; border:1px solid #e1e8f4; border-radius:11px; background:#fff; }#inserimentoAttivita .form-floating > .form-control { min-height:50px; padding:1.45rem .85rem .45rem; color:#24344f; border:1px solid #cdd9eb; border-radius:8px; background-color:#fff; box-shadow:none; font-weight:500; }#inserimentoAttivita .form-floating > .form-control:disabled { color:#53647e; border-color:#dbe3ef; background-color:#f2f5fa; opacity:1; }#inserimentoAttivita .form-floating > label { height:auto; padding:.55rem .85rem; color:#61708a; font-size:.78rem; font-weight:700; }#inserimentoAttivita .form-floating > label::after { background:#fff !important; }#inserimentoAttivita #Ccodatt ~ label::after, #inserimentoAttivita #Cdtfinp ~ label::after { background:#f2f5fa !important; }#inserimentoAttivita .modal-footer { gap:10px; padding:18px 30px; border-top:1px solid #e5ebf4; background:#fff; }#inserimentoAttivita .modal-footer .btn { min-width:116px; min-height:40px; margin:0; border-radius:8px; font-weight:700; }#inserimentoAttivita #abbandonaAttivita { color:#8a5a00; border-color:#f1d69b; background:#fff8e7; }
html[data-bs-theme="dark"] .crm-project-activities-v2 { --act-primary:#647ef0; --act-ink:#edf2ff; --act-muted:#aab7cf; --act-line:#3c415c; --act-canvas:#181925; --act-card:#232536; background:var(--act-canvas); }html[data-bs-theme="dark"] .crm-project-activities-v2__overview, html[data-bs-theme="dark"] .crm-project-activities-v2__workspace { box-shadow:0 8px 22px rgba(0,0,0,.2); }html[data-bs-theme="dark"] .crm-project-activities-v2__summary-item, html[data-bs-theme="dark"] .crm-project-activities-v2__summary-progress { border-color:var(--act-line); }html[data-bs-theme="dark"] .crm-project-activities-v2__donut { background:conic-gradient(#47c18b var(--att-progress,0%),#41465e 0); }html[data-bs-theme="dark"] .crm-project-activities-v2__button { color:#becaff; border-color:#596ca8; background:#2b2e43; }html[data-bs-theme="dark"] .crm-project-activities-v2__button--primary { color:#fff; border-color:#5873e5; background:#5873e5; }html[data-bs-theme="dark"] .crm-project-activities-v2__tabs, html[data-bs-theme="dark"] .crm-project-activities-v2__table-head { border-color:#41465e; background:#2a2d40; }html[data-bs-theme="dark"] .crm-project-activities-v2__tab { color:#bdc7dc; border-color:#41465e; }html[data-bs-theme="dark"] .crm-project-activities-v2__tab--active { color:#fff; background:#5873e5; }html[data-bs-theme="dark"] .crm-project-activities-v2__filters label { color:#aebbd2; border-color:#484e69; background:#2c2f44; }html[data-bs-theme="dark"] .crm-project-activities-v2__filters input { color:#ecf1fb; }html[data-bs-theme="dark"] .crm-project-activities-v2__row { color:#c5cfe2; border-color:#373b54; }html[data-bs-theme="dark"] .crm-project-activities-v2__row:hover, html[data-bs-theme="dark"] .crm-project-activities-v2__row--task { background:#292c3f; }html[data-bs-theme="dark"] .crm-project-activities-v2__activity { color:#e7edff; }html[data-bs-theme="dark"] .crm-project-activities-v2__progress > span { background:#454a62; }html[data-bs-theme="dark"] .crm-project-activities-v2__actions button { color:#b8c3d7; border-color:#4a506b; background:#303348; }
html[data-bs-theme="dark"] #inserimentoAttivita .modal-content { border-color:#454561; background:#202031; }html[data-bs-theme="dark"] #inserimentoAttivita .modal-body { background:#1a1a28; }html[data-bs-theme="dark"] #inserimentoAttivita .modal-body .row, html[data-bs-theme="dark"] #inserimentoAttivita .modal-footer { border-color:#3b3b56; background:#252538; }html[data-bs-theme="dark"] #inserimentoAttivita .form-floating > .form-control { color:#edf1fa; border-color:#4b4b6d; background:#2d2d43; }html[data-bs-theme="dark"] #inserimentoAttivita .form-floating > .form-control:disabled { color:#b9c3d6; border-color:#464663; background:#29293c; }html[data-bs-theme="dark"] #inserimentoAttivita .form-floating > label { color:#aeb9cf; }html[data-bs-theme="dark"] #inserimentoAttivita .form-floating > label::after { background:#2d2d43 !important; }html[data-bs-theme="dark"] #inserimentoAttivita #Ccodatt ~ label::after, html[data-bs-theme="dark"] #inserimentoAttivita #Cdtfinp ~ label::after { background:#29293c !important; }
@media (min-width:1200px) { #MENUHEAD.menu-topbar-v2.menu-topbar-v2--sidebar-open ~ .crm-project-activities-v2 { width:calc(100% - 300px); margin-left:300px; } }
@media (max-width:1100px) { .crm-project-activities-v2__overview { grid-template-columns:1fr 1fr 1fr; }.crm-project-activities-v2__summary-progress { border-right:0; }.crm-project-activities-v2__overview-actions { grid-column:1/-1; justify-content:flex-end; border-top:1px solid var(--act-line); } }
@media (max-width:720px) { .crm-project-activities-v2 { padding:18px 10px 28px; }.crm-project-activities-v2__overview { grid-template-columns:1fr; }.crm-project-activities-v2__summary-item, .crm-project-activities-v2__summary-progress { min-height:66px; border-right:0; border-bottom:1px solid var(--act-line); }.crm-project-activities-v2__overview-actions { display:grid; grid-template-columns:1fr; justify-content:stretch; }.crm-project-activities-v2__filters { grid-template-columns:1fr 1fr; }.crm-project-activities-v2__tabs { grid-template-columns:1fr 1fr; }.crm-project-activities-v2__tab:nth-child(2) { border-right:0; }.crm-project-activities-v2__tab:nth-child(-n+2) { border-bottom:1px solid #dce5f2; } }
html[data-bs-theme="dark"] .crm-project-activities-v2__toggle { color:#aebfff; }html[data-bs-theme="dark"] .crm-project-activities-v2__toggle:hover { color:#fff; background:#3a4160; }

/* Il codice attività resta leggibile su una riga; la descrizione cede spazio. */
.crm-project-activities-v2__table-head, .crm-project-activities-v2__row { grid-template-columns:minmax(190px,1.6fr) 120px 105px 105px 112px 108px 145px 112px; }
.crm-project-activities-v2__code { white-space:nowrap; }
.crm-project-activities-v2__status--late { color:#bf5b00; background:#fff0d5; }
html[data-bs-theme="dark"] .crm-project-activities-v2__status--late { color:#ffd185; background:#513b1f; }
.crm-project-activities-v2__actions .crm-project-activities-v2__delete { color:#d14153; }.crm-project-activities-v2__actions .crm-project-activities-v2__delete:hover { color:#b52d3e; border-color:#efb9c1; background:#fff1f3; }
html[data-bs-theme="dark"] .crm-project-activities-v2__actions .crm-project-activities-v2__delete { color:#ff9dab; }.crm-project-activities-v2__actions .crm-project-activities-v2__delete:hover { color:#ffc2ca; border-color:#7b4854; background:#452b34; }
.crm-project-activities-v2__actions .crm-project-activities-v2__hours-toggle { color:#7a5fc2; }.crm-project-activities-v2__actions .crm-project-activities-v2__hours-toggle:hover { color:#5e43aa; border-color:#cfc3ef; background:#f4f0ff; }.crm-project-activities-v2__hours-detail { min-width:920px; padding:10px 18px 14px 68px; color:#405579; border-top:1px solid #e5ebf4; background:#f8faff; font-size:.83rem; }.crm-project-activities-v2__hours-detail-row { display:grid; grid-template-columns:110px minmax(160px,1fr) 90px minmax(180px,2fr); gap:12px; align-items:start; padding:9px 12px; border:1px solid #e0e8f3; border-radius:8px; background:#fff; }.crm-project-activities-v2__hours-detail small { display:block; margin-bottom:2px; color:#7c8da7; font-size:.7rem; font-weight:700; text-transform:uppercase; }.crm-project-activities-v2__hours-detail strong { color:#29436f; font-weight:600; }.crm-project-activities-v2__hours-detail span:nth-child(3) { text-align:right; }html[data-bs-theme="dark"] .crm-project-activities-v2__actions .crm-project-activities-v2__hours-toggle { color:#c9b7ff; }html[data-bs-theme="dark"] .crm-project-activities-v2__hours-detail { color:#c7d2e5; border-color:#3a4058; background:#24283a; }html[data-bs-theme="dark"] .crm-project-activities-v2__hours-detail-row { border-color:#414863; background:#2c3045; }html[data-bs-theme="dark"] .crm-project-activities-v2__hours-detail small { color:#aab7cd; }html[data-bs-theme="dark"] .crm-project-activities-v2__hours-detail strong { color:#e5ebf9; }
.crm-project-activities-v2__activity .crm-project-activities-v2__hours-toggle { display:grid; width:20px; height:20px; flex:0 0 20px; padding:0; place-items:center; color:#7a5fc2; border:0; border-radius:5px; background:transparent; }.crm-project-activities-v2__activity .crm-project-activities-v2__hours-toggle:hover { color:#5e43aa; background:#f4f0ff; }html[data-bs-theme="dark"] .crm-project-activities-v2__activity .crm-project-activities-v2__hours-toggle { color:#c9b7ff; }html[data-bs-theme="dark"] .crm-project-activities-v2__activity .crm-project-activities-v2__hours-toggle:hover { color:#fff; background:#44395e; }
.crm-project-activities-v2__hours-detail-row { grid-template-columns:110px minmax(160px,1fr) 90px minmax(180px,2fr) 34px; }.crm-project-activities-v2__hours-detail-actions { display:flex; justify-content:flex-end; }.crm-project-activities-v2__hours-detail-actions button { display:grid; width:28px; height:28px; padding:0; place-items:center; color:#3569e8; border:1px solid #cbd9f5; border-radius:6px; background:#f3f7ff; }.crm-project-activities-v2__hours-detail-actions button:hover { color:#234da8; border-color:#9cb8ed; background:#e8f0ff; }html[data-bs-theme="dark"] .crm-project-activities-v2__hours-detail-actions button { color:#9cc5ff; border-color:#4b5c7f; background:#293852; }html[data-bs-theme="dark"] .crm-project-activities-v2__hours-detail-actions button:hover { color:#d3e4ff; border-color:#6d86b5; background:#32476b; }
.crm-project-activities-v2__hours-detail-actions .crm-project-activities-v2__hours-detail-delete { color:#d14153; border-color:#efb9c1; background:#fff1f3; }.crm-project-activities-v2__hours-detail-actions .crm-project-activities-v2__hours-detail-delete:hover { color:#b52d3e; border-color:#df8693; background:#ffe5e9; }html[data-bs-theme="dark"] .crm-project-activities-v2__hours-detail-actions .crm-project-activities-v2__hours-detail-delete { color:#ff9dab; border-color:#7b4854; background:#452b34; }html[data-bs-theme="dark"] .crm-project-activities-v2__hours-detail-actions .crm-project-activities-v2__hours-detail-delete:hover { color:#ffc2ca; border-color:#a76271; background:#5b3340; }
.crm-project-activities-v2__hours-detail-row { grid-template-columns:110px minmax(160px,1fr) 90px minmax(180px,2fr) 68px; }
.crm-project-activities-v2 { height:calc(100vh - 64px); height:calc(100dvh - 64px); min-height:0; display:flex; flex-direction:column; overflow:hidden; }.crm-project-activities-v2__breadcrumb, .crm-project-activities-v2__intro, .crm-project-activities-v2__overview { flex:0 0 auto; }.crm-project-activities-v2__workspace { display:flex; flex:1 1 auto; min-height:0; flex-direction:column; margin-bottom:0; }.crm-project-activities-v2__workspace-head, .crm-project-activities-v2__tabs, .crm-project-activities-v2__filters { flex:0 0 auto; }.crm-project-activities-v2__table-wrap { display:flex; flex:1 1 auto; min-height:0; flex-direction:column; overflow-x:auto; overflow-y:hidden; }.crm-project-activities-v2__table-head { flex:0 0 auto; }.crm-project-activities-v2__table-wrap #elenco { flex:1 1 auto; min-height:0; overflow-y:auto; }
.crm-project-activities-v2__tabs { margin-bottom:10px; }.crm-project-activities-v2__filters { padding-bottom:10px; }.crm-project-activities-v2__filters label { height:34px; }.crm-project-activities-v2__table-head, .crm-project-activities-v2__row { padding-top:8px; padding-bottom:8px; }.crm-project-activities-v2__row { min-height:50px; }
.crm-project-activities-v2 { padding-top:18px; padding-bottom:24px; }.crm-project-activities-v2__breadcrumb { margin-bottom:10px; }.crm-project-activities-v2__intro { margin-bottom:10px; }.crm-project-activities-v2__overview { margin-bottom:10px; }.crm-project-activities-v2__summary-item { min-height:68px; padding:10px 16px; }.crm-project-activities-v2__summary-progress { min-height:68px; padding:9px 16px; }.crm-project-activities-v2__donut { width:48px; height:48px; flex-basis:48px; }.crm-project-activities-v2__donut::before { width:37px; height:37px; }.crm-project-activities-v2__overview-actions { padding:10px 14px; }.crm-project-activities-v2__workspace-head { gap:10px; padding:12px 18px 9px; }.crm-project-activities-v2__workspace-head > span { margin-left:auto; }.crm-project-activities-v2__filters-toggle { display:inline-flex; gap:7px; align-items:center; min-height:30px; padding:0 10px; color:#45618f; border:1px solid #cedbee; border-radius:6px; background:#f7f9fd; font-size:.78rem; font-weight:700; white-space:nowrap; }.crm-project-activities-v2__filters-toggle:hover { color:#245fd7; border-color:#aebfe0; background:#edf3ff; }.crm-project-activities-v2__workspace--filters-hidden .crm-project-activities-v2__filters { display:none; }html[data-bs-theme="dark"] .crm-project-activities-v2__filters-toggle { color:#bdcaff; border-color:#4c5879; background:#2c334a; }html[data-bs-theme="dark"] .crm-project-activities-v2__filters-toggle:hover { color:#fff; border-color:#6b7eae; background:#35415f; }
.crm-confirm-delete-modal .modal-dialog { max-width:470px; }.crm-confirm-delete-modal .modal-content { overflow:hidden; border:1px solid #f0d7d7; border-radius:16px; box-shadow:0 24px 60px rgba(83,33,42,.24); }.crm-confirm-delete-modal .modal-header { min-height:78px; padding:22px 26px; color:#fff; border:0; background:linear-gradient(122deg,#a83245,#d84a5d); }.crm-confirm-delete-modal .modal-title { display:flex; gap:10px; align-items:center; margin:0; color:#fff !important; font-size:1.1rem !important; font-weight:700; }.crm-confirm-delete-modal .modal-title::before { display:grid; width:33px; height:33px; content:'\f071'; place-items:center; border:1px solid rgba(255,255,255,.24); border-radius:50%; background:rgba(255,255,255,.14); font-family:'FontAwesome'; font-size:.9rem; font-weight:normal; }.crm-confirm-delete-modal .btn-close { filter:brightness(0) invert(1); }.crm-confirm-delete-modal .modal-body { padding:26px; background:#fffafa; }.crm-confirm-delete-modal .modal-body .container-fluid, .crm-confirm-delete-modal .modal-body .row { margin:0; padding:0; }.crm-confirm-delete-modal .modal-body .form-control { min-height:84px; padding:18px 18px 18px 58px; color:#5f2630; border:1px solid #f1d7d9; border-radius:11px; background:#fff; box-shadow:none; font-size:.96rem; font-weight:600; line-height:1.45; }.crm-confirm-delete-modal .modal-footer { gap:10px; padding:17px 26px; border-top:1px solid #f2e3e4; background:#fff; }.crm-confirm-delete-modal .modal-footer .btn { min-width:104px; min-height:40px; margin:0; border-radius:8px; font-size:.9rem; font-weight:700; }.crm-confirm-delete-modal .btn-danger { border-color:#cf3f52; background:#cf3f52; }.crm-confirm-delete-modal .btn-danger:hover { border-color:#b63245; background:#b63245; }html[data-bs-theme="dark"] .crm-confirm-delete-modal .modal-content { border-color:#663946; background:#28202a; }html[data-bs-theme="dark"] .crm-confirm-delete-modal .modal-body { background:#211b24; }html[data-bs-theme="dark"] .crm-confirm-delete-modal .modal-body .form-control { color:#f3d9dd; border-color:#593944; background:#30252f; }html[data-bs-theme="dark"] .crm-confirm-delete-modal .modal-footer { border-color:#4a3540; background:#28202a; }
.crm-project-activities-v2__actions .crm-project-activities-v2__worked-hours { color:#16805a; }.crm-project-activities-v2__actions .crm-project-activities-v2__worked-hours:hover { color:#0f6948; border-color:#a8dac6; background:#ebf9f2; }.crm-worked-hours-v2__card { max-width:820px; overflow:hidden; border:1px solid var(--act-line); border-radius:14px; background:var(--act-card); box-shadow:0 8px 22px rgba(30,41,59,.05); }.crm-worked-hours-v2__task { display:flex; gap:15px; align-items:flex-start; padding:24px; border-bottom:1px solid var(--act-line); }.crm-worked-hours-v2__task > i { color:var(--act-primary); font-size:1.5rem; }.crm-worked-hours-v2__task small, .crm-worked-hours-v2__task span { display:block; color:var(--act-muted); font-size:.82rem; }.crm-worked-hours-v2__task strong { display:block; margin:3px 0; color:var(--act-ink); font-size:1rem; }.crm-worked-hours-v2__notice { margin:20px 24px 0; padding:12px 14px; color:#436387; border:1px solid #cbdced; border-radius:8px; background:#eff6ff; font-size:.88rem; }.crm-worked-hours-v2__notice i { margin-right:8px; color:#3569e8; }.crm-worked-hours-v2__form { display:grid; grid-template-columns:1fr 1fr; gap:18px; padding:24px; }.crm-worked-hours-v2__form label { color:var(--act-muted); font-size:.8rem; font-weight:700; }.crm-worked-hours-v2__form input, .crm-worked-hours-v2__form textarea { display:block; width:100%; margin-top:6px; padding:10px; color:var(--act-ink); border:1px solid #cdd9eb; border-radius:7px; background:var(--act-card); font:inherit; }.crm-worked-hours-v2__notes, .crm-worked-hours-v2__footer { grid-column:1/-1; }.crm-worked-hours-v2__footer { display:flex; justify-content:flex-end; gap:9px; padding-top:4px; }.crm-worked-hours-v2__footer button:disabled { cursor:not-allowed; opacity:.55; }html[data-bs-theme="dark"] .crm-project-activities-v2__actions .crm-project-activities-v2__worked-hours { color:#7ce2b4; }html[data-bs-theme="dark"] .crm-worked-hours-v2__notice { color:#b9d6fa; border-color:#435b79; background:#243348; }html[data-bs-theme="dark"] .crm-worked-hours-v2__form input, html[data-bs-theme="dark"] .crm-worked-hours-v2__form textarea { color:var(--act-ink); border-color:#4b526e; background:#2c2f44; }
.crm-project-activities-v2__toast-container { z-index:1100; }.crm-project-activities-v2__toast { width:min(360px,calc(100vw - 32px)); overflow:hidden; color:#754900; border:1px solid #f1cf82; border-radius:10px; background:#fff8e7; box-shadow:0 12px 28px rgba(75,53,10,.18); }.crm-project-activities-v2__toast .toast-body { display:flex; gap:10px; align-items:center; padding:13px 14px; font-size:.88rem; font-weight:600; }.crm-project-activities-v2__toast .toast-body > i { color:#d58b00; font-size:1.1rem; }.crm-project-activities-v2__toast .btn-close { margin-left:auto; }
html[data-bs-theme="dark"] .crm-project-activities-v2__toast { color:#ffda91; border-color:#765b2d; background:#3c311f; box-shadow:0 12px 28px rgba(0,0,0,.3); }html[data-bs-theme="dark"] .crm-project-activities-v2__toast .toast-body > i { color:#ffc764; }html[data-bs-theme="dark"] .crm-project-activities-v2__toast .btn-close { filter:brightness(0) invert(1); }
.crm-worked-hours-v2__form input[readonly] { color:#62728c; border-color:#dbe3ef; background:#f2f5fa; }.crm-worked-hours-v2__form .is-invalid { border-color:#d85a68; box-shadow:0 0 0 3px rgba(216,90,104,.12); }html[data-bs-theme="dark"] .crm-worked-hours-v2__form input[readonly] { color:#b9c3d6; border-color:#464663; background:#29293c; }
.crm-worked-hours-v2__form .crm-worked-hours-v2__hours { text-align:right; }
.crm-worked-hours-v2__task > div { flex:1 1 auto; min-width:0; text-align:center; }.crm-worked-hours-v2__metrics { display:flex; justify-content:space-between; gap:18px; margin-top:4px; text-align:left; }.crm-worked-hours-v2__metrics span:last-child { text-align:right; }
.crm-project-activities-v2__workspace--filters-hidden .crm-project-activities-v2__tabs, .crm-project-activities-v2__workspace--filters-hidden .crm-project-activities-v2__filters { display:none; }
@media (max-height:699px) { .crm-project-activities-v2 .crm-projects-v2__breadcrumb, .crm-project-activities-v2__intro p { display:none; }.crm-project-activities-v2__intro { margin-bottom:8px; }.crm-project-activities-v2__intro h1 { margin-bottom:0; font-size:1rem; }.crm-project-activities-v2__overview { margin-bottom:8px; } }
@media (max-width:1499px) { .crm-project-activities-v2__table-head, .crm-project-activities-v2__row { grid-template-columns:minmax(230px,2fr) 90px 105px 105px 112px 145px 112px; }.crm-project-activities-v2__table-head > :nth-child(6), .crm-project-activities-v2__row > :nth-child(6) { display:none; } }
@media (max-width:1349px) { .crm-project-activities-v2-body { overflow-x:hidden; }.crm-project-activities-v2 { max-width:100%; }.crm-project-activities-v2__overview, .crm-project-activities-v2__workspace { min-width:0; } }
.crm-project-activities-v2__table-wrap #elenco { min-width:920px; overflow-x:hidden; }
.crm-project-activities-v2__table-wrap { overflow:auto; }.crm-project-activities-v2__table-wrap #elenco { overflow:visible; }.crm-project-activities-v2__table-head { position:sticky; top:0; z-index:2; }
@media (max-width:1099px) { .crm-project-activities-v2__overview { display:flex; justify-content:flex-end; border:0; border-radius:0; background:transparent; box-shadow:none; }.crm-project-activities-v2__summary-item, .crm-project-activities-v2__summary-progress { display:none; }.crm-project-activities-v2__overview-actions { margin-left:auto; padding:0; } }
@media (max-width:720px) { .crm-project-activities-v2__overview-actions { display:flex; grid-template-columns:none; justify-content:flex-end; gap:8px; }.crm-project-activities-v2__overview-actions .crm-project-activities-v2__button { min-width:0; padding:0 9px; font-size:.8rem; } }
/* La modale attività non deve ereditare la larghezza ridotta di modal-xl: date, codice e totale restano leggibili. */
#inserimentoAttivita .form-floating > .form-control { width:100%; }
@media (max-width:1199px) { #inserimentoAttivita .modal-dialog.modal-xl { max-width:min(980px,calc(100% - 2rem)); } }
@media (max-width:991px) { #inserimentoAttivita .modal-dialog.modal-xl { max-width:calc(100% - 1.5rem); margin:.75rem auto; } #inserimentoAttivita .modal-body { padding:24px; } #inserimentoAttivita .modal-body .row { padding-right:16px; padding-left:16px; } }
@media (min-width:768px) and (max-width:900px) { #inserimentoAttivita .form-floating.col-md-3 { flex:0 0 33.333333%; max-width:33.333333%; } #inserimentoAttivita .form-floating.col-md-3.ms-auto { margin-left:0 !important; } #inserimentoAttivita #Ccodatt, #inserimentoAttivita #Cdtini, #inserimentoAttivita #Coreprev, #inserimentoAttivita #Cdtfinp, #inserimentoAttivita #Ctotprev { width:100% !important; flex:0 0 100%; } }
@media (max-width:900px) { #inserimentoAttivita #Ccodatt, #inserimentoAttivita #Cdtini, #inserimentoAttivita #Coreprev, #inserimentoAttivita #Cdtfinp, #inserimentoAttivita #Ctotprev { width:100% !important; max-width:100% !important; flex:0 0 100% !important; } }
.crm-worked-hours-v2 .crm-project-activities-v2__intro { display:flex; width:100%; max-width:820px; gap:16px; align-items:flex-start; justify-content:space-between; }.crm-worked-hours-v2 .crm-project-activities-v2__intro > div { min-width:0; }.crm-worked-hours-v2 .crm-project-activities-v2__intro > .crm-project-activities-v2__button { flex:0 0 auto; margin-top:1px; }
@media (max-width:575px) { .crm-worked-hours-v2 .crm-project-activities-v2__intro { flex-wrap:wrap; }.crm-worked-hours-v2 .crm-project-activities-v2__intro > .crm-project-activities-v2__button { margin-left:auto; } }
.crm-projects-v2__list-controls { display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:flex-end; }.crm-projects-v2__status-toggle { display:inline-flex; gap:7px; align-items:center; justify-content:center; min-height:34px; padding:0 10px; color:#45618f; border:1px solid #cedbee; border-radius:6px; background:#f7f9fd; font-size:.78rem; font-weight:700; white-space:nowrap; }.crm-projects-v2__status-toggle:hover { color:#245fd7; border-color:#aebfe0; background:#edf3ff; }.crm-projects-v2__health--status-hidden { grid-template-columns:minmax(0,1fr); }.crm-projects-v2__health--status-hidden .crm-projects-v2__status { display:none; }html[data-bs-theme="dark"] .crm-projects-v2__status-toggle { color:#bdcaff; border-color:#4c5879; background:#2c334a; }html[data-bs-theme="dark"] .crm-projects-v2__status-toggle:hover { color:#fff; border-color:#6b7eae; background:#35415f; }
@media (max-width:640px) { .crm-projects-v2__list-controls { width:100%; justify-content:space-between; }.crm-projects-v2__list-controls .crm-projects-v2__tabs { width:auto; } }
.crm-projects-v2__table #elenco { height:auto; overflow-x:hidden; }
@media (max-width:969px) { .crm-projects-v2__table { overflow-x:auto; overflow-y:hidden; }.crm-projects-v2__table #elenco { min-width:900px; overflow-x:hidden; } }
@media (max-width:969px) { .crm-projects-v2__table-head, .crm-projects-v2__filters, .crm-projects-v2__row, .crm-projects-v2__table #elenco { width:1000px; min-width:1000px; } }
@media (max-width:1499px) { .crm-projects-v2__table-head, .crm-projects-v2__filters, .crm-projects-v2__row { grid-template-columns:84px minmax(180px,2fr) 115px 105px 105px 90px; }.crm-projects-v2__table-head > :nth-child(6), .crm-projects-v2__filters > :nth-child(6), .crm-projects-v2__row > :nth-child(6) { display:none; } }
/* Stesso adattamento della maschera attività, applicato ai dati progetto. */
#inserimentoProgetto .form-floating > .form-control { width:100%; }
@media (max-width:1199px) { #inserimentoProgetto .modal-dialog.modal-xl { max-width:min(980px,calc(100% - 2rem)); } }
@media (max-width:991px) { #inserimentoProgetto .modal-dialog.modal-xl { max-width:calc(100% - 1.5rem); margin:.75rem auto; } #inserimentoProgetto .modal-body { padding:24px; } #inserimentoProgetto .modal-body .row { padding-right:16px; padding-left:16px; } }
@media (min-width:768px) and (max-width:900px) { #inserimentoProgetto .form-floating.col-md-3 { flex:0 0 33.333333%; max-width:33.333333%; } #inserimentoProgetto .form-floating.col-md-3.ms-auto { margin-left:0 !important; } }
@media (max-width:900px) { #inserimentoProgetto #Ccodprog, #inserimentoProgetto #Cdtini, #inserimentoProgetto #Coreprev, #inserimentoProgetto #Cdtfinp, #inserimentoProgetto #Ctotprev { width:100% !important; max-width:100% !important; flex:0 0 100% !important; } }
/* Planner Gantt progetti: progetto e attività con operatori consuntivati. */
.crm-gantt-v2__card { display:flex; min-height:0; flex:1 1 auto; flex-direction:column; overflow:hidden; border:1px solid var(--crm-line); border-radius:14px; background:var(--crm-card); box-shadow:0 8px 22px rgba(30,41,59,.05); }.crm-gantt-v2__filters { display:flex; flex:0 0 auto; flex-wrap:wrap; gap:12px 18px; align-items:end; padding:13px 18px; border-bottom:1px solid var(--crm-line); background:#f7f9fd; }.crm-gantt-v2__filters label { display:flex; gap:5px; flex-direction:column; color:#637491; font-size:.73rem; font-weight:750; letter-spacing:.01em; }.crm-gantt-v2__filters select, .crm-gantt-v2__filters input { min-width:126px; height:33px; padding:0 9px; color:var(--crm-ink); border:1px solid #cdd9eb; border-radius:7px; background:var(--crm-card); font:inherit; font-size:.84rem; font-weight:600; }.crm-gantt-v2__filters input { min-width:86px; width:86px; }.crm-gantt-v2__summary { flex:0 0 auto; padding:12px 18px; color:var(--crm-muted); border-bottom:1px solid var(--crm-line); background:#fbfcfe; font-size:.84rem; font-weight:600; }.crm-gantt-v2__scroll { flex:1 1 auto; min-height:0; overflow:auto; }.crm-gantt-v2 #gantt { min-width:980px; }.crm-gantt-v2__head, .crm-gantt-v2__row { display:grid; grid-template-columns:330px minmax(650px,1fr); }.crm-gantt-v2__head { position:sticky; top:0; z-index:2; color:#536888; border-bottom:1px solid var(--crm-line); background:#f7f9fd; font-size:.76rem; font-weight:750; }.crm-gantt-v2__name-head { padding:12px 16px; border-right:1px solid var(--crm-line); }.crm-gantt-v2__axis { position:relative; height:40px; background:repeating-linear-gradient(90deg,transparent 0,transparent calc(100% / var(--gantt-days) * 7 - 1px),#e8edf5 calc(100% / var(--gantt-days) * 7 - 1px),#e8edf5 calc(100% / var(--gantt-days) * 7)); }.crm-gantt-v2__axis span { position:absolute; top:12px; transform:translateX(-1px); white-space:nowrap; }.crm-gantt-v2__row { min-height:57px; border-bottom:1px solid #edf1f6; }.crm-gantt-v2__name { display:flex; min-width:0; padding:10px 16px; flex-direction:column; justify-content:center; border-right:1px solid var(--crm-line); }.crm-gantt-v2__name strong { overflow:hidden; color:#263c68; text-overflow:ellipsis; white-space:nowrap; font-size:.85rem; }.crm-gantt-v2__name small { overflow:hidden; margin-top:3px; color:var(--crm-muted); text-overflow:ellipsis; white-space:nowrap; font-size:.74rem; }.crm-gantt-v2__row--progetto { background:#f9fbff; }.crm-gantt-v2__row--progetto .crm-gantt-v2__name strong { color:var(--crm-primary); font-size:.88rem; }.crm-gantt-v2__row--attivita .crm-gantt-v2__name { padding-left:37px; }.crm-gantt-v2__track { position:relative; min-width:0; background:repeating-linear-gradient(90deg,transparent 0,transparent calc(100% / var(--gantt-days) * 7 - 1px),#f0f3f8 calc(100% / var(--gantt-days) * 7 - 1px),#f0f3f8 calc(100% / var(--gantt-days) * 7)); }.crm-gantt-v2__bar { position:absolute; top:18px; height:19px; min-width:6px; border-radius:99px; background:linear-gradient(90deg,#4263d5,#6a82e8); box-shadow:0 3px 7px rgba(66,99,213,.2); }.crm-gantt-v2__row--attivita .crm-gantt-v2__bar { background:linear-gradient(90deg,#28a879,#65c69d); box-shadow:0 3px 7px rgba(27,153,107,.18); }.crm-gantt-v2__no-date { position:absolute; top:19px; left:14px; color:#99a7bd; font-size:.76rem; }.crm-gantt-v2__empty { padding:24px 16px; color:var(--crm-muted); font-size:.88rem; }.crm-gantt-v2__row:hover { background:#f6f9ff; }html[data-bs-theme="dark"] .crm-gantt-v2__card { box-shadow:0 8px 22px rgba(0,0,0,.2); }html[data-bs-theme="dark"] .crm-gantt-v2__filters, html[data-bs-theme="dark"] .crm-gantt-v2__summary, html[data-bs-theme="dark"] .crm-gantt-v2__head { border-color:var(--crm-line); background:#242438; }html[data-bs-theme="dark"] .crm-gantt-v2__filters label { color:#b9c5dc; }html[data-bs-theme="dark"] .crm-gantt-v2__filters select, html[data-bs-theme="dark"] .crm-gantt-v2__filters input { color:var(--crm-ink); border-color:#4b526e; background:#2c2f44; }html[data-bs-theme="dark"] .crm-gantt-v2__axis, html[data-bs-theme="dark"] .crm-gantt-v2__track { background:repeating-linear-gradient(90deg,transparent 0,transparent calc(100% / var(--gantt-days) * 7 - 1px),#373b53 calc(100% / var(--gantt-days) * 7 - 1px),#373b53 calc(100% / var(--gantt-days) * 7)); }html[data-bs-theme="dark"] .crm-gantt-v2__row { border-color:#35394f; }html[data-bs-theme="dark"] .crm-gantt-v2__row--progetto, html[data-bs-theme="dark"] .crm-gantt-v2__row:hover { background:#282b3e; }html[data-bs-theme="dark"] .crm-gantt-v2__name, html[data-bs-theme="dark"] .crm-gantt-v2__name-head { border-color:var(--crm-line); }html[data-bs-theme="dark"] .crm-gantt-v2__name strong { color:#e5ebf8; }
@media (min-width:1200px) { #MENUHEAD.menu-topbar-v2.menu-topbar-v2--sidebar-open ~ .crm-gantt-v2 { width:calc(100% - 300px); margin-left:300px; } }
@media (max-width:640px) { .crm-gantt-v2 { padding-right:10px; padding-left:10px; }.crm-gantt-v2__head, .crm-gantt-v2__row { grid-template-columns:260px minmax(650px,1fr); } }
/* Planner: ogni attività mostra separatamente periodo pianificato e periodo consuntivato. */
.crm-gantt-v2__legend { display:flex; gap:12px; align-items:center; margin-left:auto; padding-bottom:2px; color:var(--crm-muted); font-size:.76rem; font-weight:650; }.crm-gantt-v2__legend span { display:inline-flex; gap:5px; align-items:center; }.crm-gantt-v2__legend i { display:inline-block; width:18px; height:7px; border-radius:99px; }.crm-gantt-v2__legend-project { background:#4e6fdb; }.crm-gantt-v2__legend-planned { background:#3eb283; }.crm-gantt-v2__legend-worked { background:#ef9b28; }.crm-gantt-v2__row--attivita { min-height:66px; }.crm-gantt-v2__row--attivita .crm-gantt-v2__bar--planned { top:13px; height:17px; }.crm-gantt-v2__bar--worked { top:40px; height:10px; background:linear-gradient(90deg,#e58b17,#f6ba59) !important; box-shadow:0 2px 6px rgba(193,117,15,.22) !important; }.crm-gantt-v2__row--attivita .crm-gantt-v2__no-date { top:24px; }html[data-bs-theme="dark"] .crm-gantt-v2__legend-worked { background:#f6b44c; }html[data-bs-theme="dark"] .crm-gantt-v2__bar--worked { background:linear-gradient(90deg,#d9851f,#f3ba5b) !important; }
@media (max-width:640px) { .crm-gantt-v2__legend { width:100%; margin-left:0; } }
/* I filtri restano a sinistra; la legenda è ancorata al margine destro della barra. */
.crm-gantt-v2__filters { justify-content:space-between; }.crm-gantt-v2__filter-controls { display:flex; flex:1 1 auto; flex-wrap:wrap; gap:12px 18px; align-items:end; }.crm-gantt-v2__legend { flex:0 0 auto; margin-left:20px; }.crm-gantt-v2__filters .crm-gantt-v2__summary { width:100%; border-top:1px solid var(--crm-line); border-bottom:0; }.crm-gantt-v2__card--filters-hidden .crm-gantt-v2__filters { display:none; }
@media (max-width:640px) { .crm-gantt-v2__filter-controls { gap:10px; }.crm-gantt-v2__legend { margin-left:0; } }
@media (max-width:899px) { .crm-gantt-v2 > .crm-projects-v2__breadcrumb, .crm-gantt-v2 > .crm-projects-v2__intro p { display:none; } }
/* Nel Gantt la prima colonna resta leggibile durante lo scorrimento orizzontale. */
.crm-gantt-v2__name-head, .crm-gantt-v2__name { position:sticky; left:0; box-shadow:5px 0 8px rgba(30,41,59,.06); }.crm-gantt-v2__name-head { z-index:4; background:#f7f9fd; }.crm-gantt-v2__name { z-index:1; background:var(--crm-card); }.crm-gantt-v2__row--progetto .crm-gantt-v2__name { background:#f9fbff; }.crm-gantt-v2__row:hover .crm-gantt-v2__name { background:#f6f9ff; }html[data-bs-theme="dark"] .crm-gantt-v2__name-head { background:#242438; }html[data-bs-theme="dark"] .crm-gantt-v2__name { background:#202031; }html[data-bs-theme="dark"] .crm-gantt-v2__row--progetto .crm-gantt-v2__name, html[data-bs-theme="dark"] .crm-gantt-v2__row:hover .crm-gantt-v2__name { background:#282b3e; }
.crm-gantt-v2 #gantt { width:max(980px,100%); }.crm-gantt-v2 #gantt > .crm-gantt-v2__head, .crm-gantt-v2 #gantt > .crm-gantt-v2__row { width:100%; }.crm-gantt-v2__axis { overflow:hidden; }.crm-gantt-v2__axis span { transform:translateX(4px); }

/* Elenco progetti (progetti.php): i tasti azione stanno nell'ultima colonna. Colonna larga quanto i 3 tasti (3 x 30px + 2 x 5px),
   anche sotto i 1200px dove 90px li faceva sbordare; sotto i 500px un unico tasto con menu a tendina (come clienti.php),
   niente barra del percorso né titolo dell'elenco (i filtri rapidi restano). */
.progetti-v2 .crm-projects-v2__grid { grid-template-columns: 94px minmax(220px, 2fr) minmax(120px, 1fr) 125px 105px 150px 100px; }
.progetti-v2__menu { display: none; }
/* Il menu sta dentro .crm-projects-v2__row-actions: si annulla lo stile dei tasti quadrati sulle sue voci. */
.progetti-v2 .edit-v2__row-menu .dropdown-item { width: 100%; height: auto; border: 0; border-radius: 7px; }
.progetti-v2 .edit-v2__row-menu .dropdown-item:not(:hover) { background: transparent; }
@media (max-width: 1200px) { .progetti-v2 .crm-projects-v2__grid { grid-template-columns: 84px minmax(180px, 2fr) 115px 105px 105px 130px 100px; } }
@media (max-width: 500px) {
  .progetti-v2 .crm-projects-v2__grid { grid-template-columns: 84px minmax(180px, 2fr) 115px 105px 105px 130px 30px; min-width: 830px; }
  .progetti-v2 .crm-projects-v2__breadcrumb,
  .progetti-v2 .crm-projects-v2__list-title { display: none; }
  .progetti-v2 .crm-projects-v2__table-head > span:last-child { visibility: hidden; }
  .progetti-v2 .crm-projects-v2__row-actions > button { display: none; }
  .progetti-v2 .progetti-v2__menu { display: block; }
  .progetti-v2 .crm-projects-v2__actions { gap: 6px; }
  .progetti-v2 .crm-projects-v2__actions .crm-projects-v2__button { min-height: 32px; gap: 5px; padding: 0 9px; font-size: .78rem; }
  /* Tasto Mostra/Nascondi stato spostato accanto a "Planner progetti" (posizionaToggleStato in progetti.php): solo icona, alto come gli altri tasti. */
  .progetti-v2 .crm-projects-v2__actions .crm-projects-v2__status-toggle { min-height: 32px; width: 32px; padding: 0; }
  .progetti-v2 .crm-projects-v2__actions .crm-projects-v2__status-toggle > span { display: none; }
}

/* Allegati delle attività (Crm/View/modprogcrm.php): graffetta nella colonna Azioni, icona colorata se ci sono allegati.
   La colonna Azioni passa da 112px a 140px perché le righe hanno fino a 4 pulsanti (nuovo task/ore, allegati, modifica, elimina). */
.crm-project-activities-v2__table-head, .crm-project-activities-v2__row { grid-template-columns:minmax(190px,1.6fr) 120px 105px 105px 112px 108px 145px 140px; }
@media (max-width:1499px) { .crm-project-activities-v2__table-head, .crm-project-activities-v2__row { grid-template-columns:minmax(230px,2fr) 90px 105px 105px 112px 145px 140px; } }
.crm-project-activities-v2__actions button.crm-project-activities-v2__attachments:hover { color:#285bce; border-color:#b9cbeb; background:#f1f5ff; }
.crm-project-activities-v2__actions button.crm-project-activities-v2__attachments--full, .crm-project-activities-v2__actions button.crm-project-activities-v2__attachments--full:hover { color:#e08a00; }
html[data-bs-theme="dark"] .crm-project-activities-v2__actions button.crm-project-activities-v2__attachments--full { color:#ffc764; }
