/* Projects: fasi, kanban, Gantt, calendario, carico, task (sopra app.css, comune alle app MyReweke) */
.rag { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.rag i { width: 10px; height: 10px; border-radius: 50%; background: #9aa6b4; display: inline-block; }
.rag.g i { background: #1E7B4B; } .rag.a i { background: #E0A100; } .rag.r i { background: #C0362C; }
.prj-head { margin-bottom: 14px; } .prj-head h1 { margin: 2px 0 0; }
.prj-head .meta { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; color: var(--muted); font-size: 13px; margin-top: 6px; }
.prj-head .bar { margin-top: 10px; max-width: 360px; }
.late { color: var(--danger); font-weight: 600; } .soon { color: var(--warn); font-weight: 600; }
.row-actions { display: flex; gap: 2px; justify-content: flex-end; flex: none; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } .grid2.top { align-items: start; }
.grid2 > .card + .card { margin-top: 0; } .grid2 > div > .card + .card { margin-top: 16px; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
.w-prog { min-width: 140px; } .w-prog .bar { min-width: 100px; height: 8px; margin-bottom: 2px; }
.act-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); cursor: pointer; flex-wrap: wrap; } .act-row:last-child { border-bottom: 0; } .act-row .grow { flex: 1; min-width: 160px; }
.ptabs a { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; font: 600 13.5px var(--font); color: var(--muted); border-bottom: 2px solid transparent; text-decoration: none; }
.ptabs a.on { color: var(--brand); border-bottom-color: var(--mint); } .ptabs a:hover { color: var(--brand); text-decoration: none; } .ptabs .ico { width: 16px; height: 16px; }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.ph-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fff; }
.ph-card h4 { margin: 0 0 8px; font-size: 14px; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.ph-card .row { margin-bottom: 8px; } .ph-card .bar { min-width: 0; height: 8px; }
.ph-card .note { margin: 8px 0 0; font-size: 13px; color: var(--muted); display: flex; gap: 6px; } .ph-card .note .ico { width: 15px; height: 15px; flex: none; }
.ph-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 14px; }
.ph-step { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; font-size: 13px; font-weight: 600; }
.ph-step b, .ph-num { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 12px; flex: none; }
.ph-step small { color: var(--muted); font-weight: 500; } .ph-arrow { color: var(--faint); font-size: 18px; }
.ph-title { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.upd { border-left: 3px solid var(--line-strong); padding: 6px 0 6px 14px; margin-bottom: 14px; } .upd p { margin: 6px 0 0; white-space: pre-wrap; }
.upd.g { border-color: #1E7B4B; } .upd.a { border-color: #E0A100; } .upd.r { border-color: #C0362C; }
/* Kanban */
.kb { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.kb-col { background: var(--soft); border-radius: 12px; padding: 10px; min-height: 240px; }
.kb-col.over { outline: 2px dashed var(--mint); outline-offset: -2px; }
.kb-col h4 { font-size: 13px; display: flex; justify-content: space-between; align-items: center; margin: 2px 2px 6px; }
.kb-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 8px; cursor: pointer; box-shadow: var(--shadow); font-size: 13px; }
.kb-card[draggable="true"] { cursor: grab; } .kb-card .t { font-weight: 600; margin-bottom: 4px; } .kb-card .t .ico { width: 14px; height: 14px; }
.kb-card .m { color: var(--muted); font-size: 12px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .kb-card.dragging { opacity: .45; }
/* Gantt */
.gantt { overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; max-height: 72vh; }
.g-body { position: relative; }
.g-row { display: flex; height: 34px; border-bottom: 1px solid var(--line); position: relative; z-index: 4; }
.g-name { position: sticky; left: 0; z-index: 6; background: #fff; width: 250px; min-width: 250px; padding: 0 10px; display: flex; align-items: center; gap: 6px; border-right: 1px solid var(--line-strong); font-size: 13px; overflow: hidden; white-space: nowrap; cursor: pointer; }
.g-name span { overflow: hidden; text-overflow: ellipsis; } .g-name .mono { flex: none; color: var(--muted); font-size: 12px; }
.g-row.ph, .g-row.ph .g-name { background: var(--soft); } .g-row.ph .g-name { font-weight: 700; cursor: default; }
.g-track { position: relative; flex: none; }
.g-head { position: sticky; top: 0; z-index: 8; background: #fff; } .g-head .g-row { height: 24px; font-size: 11px; color: var(--muted); } .g-head .g-name { z-index: 9; font-weight: 600; }
.g-cell { position: absolute; top: 0; bottom: 0; text-align: center; line-height: 24px; border-left: 1px solid #eef1f5; overflow: hidden; } .g-cell.we { color: #b0b8c4; } .g-cell.g-month { text-align: left; padding-left: 6px; font-weight: 600; }
.g-bg { position: absolute; top: 0; bottom: 0; left: 250px; z-index: 0; pointer-events: none; } .g-bg i { position: absolute; top: 0; bottom: 0; background: rgba(120, 130, 150, .07); }
.g-today { position: absolute; top: 0; bottom: 0; width: 2px; background: #C0362C; opacity: .55; z-index: 2; pointer-events: none; }
.g-svg { position: absolute; left: 250px; top: 0; z-index: 3; pointer-events: none; }
.g-bar { position: absolute; top: 7px; height: 18px; border-radius: 5px; background: #8aa0b6; cursor: pointer; z-index: 4; min-width: 6px; }
.g-bar.doing { background: #2456C7; } .g-bar.blocked { background: #C0362C; } .g-bar.review { background: #E0A100; } .g-bar.done { background: #1E7B4B; }
.g-bar.conf { outline: 2px solid #C0362C; outline-offset: 1px; }
.g-ms { position: absolute; top: 9px; width: 15px; height: 15px; transform: rotate(45deg); background: #7B3FBF; cursor: pointer; z-index: 4; }
.g-base { position: absolute; top: 27px; height: 4px; border-radius: 2px; background: #b7c0cc; z-index: 4; }
.g-lbl { position: absolute; top: 8px; font-size: 11.5px; color: var(--muted); white-space: nowrap; z-index: 4; } .g-lbl .slip { color: var(--danger); font-weight: 700; }
.g-sum { position: absolute; top: 12px; height: 8px; background: #1d2b3a; border-radius: 2px; z-index: 4; }
.g-sum::before, .g-sum::after { content: ""; position: absolute; top: 4px; border: 4px solid transparent; border-top-color: #1d2b3a; } .g-sum::before { left: 0; } .g-sum::after { right: 0; }
.g-due { position: absolute; top: 4px; width: 2px; height: 26px; background: #C0362C; opacity: .75; z-index: 3; }
.g-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 8px 0 0; align-items: center; }
.g-legend i.lg { display: inline-block; width: 18px; height: 8px; border-radius: 3px; margin-right: 5px; vertical-align: middle; background: #8aa0b6; }
.g-legend i.lg.doing { background: #2456C7; } .g-legend i.lg.blocked { background: #C0362C; } .g-legend i.lg.review { background: #E0A100; } .g-legend i.lg.done { background: #1E7B4B; }
.g-legend i.lg.base { background: #b7c0cc; height: 4px; } .g-legend i.lg.ms { background: #7B3FBF; width: 10px; height: 10px; transform: rotate(45deg); } .g-legend i.lg.sum { background: #1d2b3a; height: 5px; }
.sdot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: #8aa0b6; display: inline-block; } .sdot.doing { background: #2456C7; } .sdot.blocked { background: #C0362C; } .sdot.review { background: #E0A100; } .sdot.done { background: #1E7B4B; }
/* Calendario */
.cal-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; } .cal-nav h3 { margin: 0; min-width: 160px; text-align: center; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.cal-h { padding: 6px 8px; font-weight: 600; font-size: 12px; background: var(--soft); color: var(--muted); text-transform: capitalize; }
.cal-c { min-height: 96px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); padding: 4px; font-size: 12px; min-width: 0; } .cal-c:nth-child(7n+8) { border-left: 0; }
.cal-c.we { background: #fafbfc; } .cal-c.off { color: #b0b8c4; } .cal-c.today { outline: 2px solid var(--mint); outline-offset: -2px; } .cal-c .dn { font-weight: 600; margin-bottom: 2px; }
.cal-chip { display: block; padding: 1px 6px; margin-top: 2px; border-radius: 5px; font-size: 11.5px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: #e3ebf3; }
.cal-chip.doing { background: var(--info-50); color: var(--info); } .cal-chip.blocked { background: var(--danger-50); color: var(--danger); } .cal-chip.review { background: var(--warn-50); color: var(--warn); } .cal-chip.done { background: var(--ok-50); color: var(--ok); text-decoration: line-through; } .cal-chip.ms { background: #efe6fa; color: #5a2c97; }
/* Carico */
.load td.c, .load th.c { text-align: center; }
.ld { display: inline-block; min-width: 46px; padding: 3px 6px; border-radius: 6px; background: var(--soft); font-variant-numeric: tabular-nums; }
.ld.ok { background: var(--ok-50); color: var(--ok); } .ld.warn { background: var(--warn-50); color: var(--warn); font-weight: 700; } .ld.bad { background: var(--danger-50); color: var(--danger); font-weight: 700; }
/* Task */
.chk-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 0; font-size: 13.5px; } .chk-row .chk { min-height: 30px; }
.cmt { padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; white-space: pre-wrap; } .cmt .m { color: var(--muted); font-size: 12px; white-space: normal; }
.deps-box { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; margin-top: 8px; } .deps-box .chk { min-height: 30px; }
.chips .chip .ibtn { padding: 0; } .chips .chip .ibtn .ico { width: 12px; height: 12px; }
@media (max-width: 700px) { .rtable td.nowrap, .rtable .pill, .rtable .chip { white-space: normal; } .rtable td { min-width: 0; overflow-wrap: anywhere; } }
@media (max-width: 760px) { .g-name { width: 150px; min-width: 150px; } .g-bg, .g-svg { left: 150px; } .cal-c { min-height: 64px; } .cal-chip { font-size: 10.5px; } }
.act-r { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.plist td:nth-child(2) { min-width: 220px; }
@media (max-width: 700px) { .plist td:nth-child(2) { min-width: 0; } }
/* Intestazione del progetto: pulsanti sempre allineati in alto a destra (vanno a capo solo da telefono) */
.ph-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; } .ph-top .crumb { margin-bottom: 0; }
.ph-actions { display: flex; gap: 8px; flex: none; justify-content: flex-end; }
.prj-head h1 { overflow-wrap: anywhere; }
@media (max-width: 700px) { .ph-top { flex-direction: column; align-items: flex-start; } .ph-actions { flex-wrap: wrap; justify-content: flex-start; } }
/* Gantt a schermo intero */
.gfs-bar { display: none; align-items: center; gap: 12px; padding: 0 0 10px; } .gfs-bar .grow { flex: 1; }
.gwrap:fullscreen, .gwrap.gfull { background: #fff; padding: 14px 16px; display: flex; flex-direction: column; }
.gwrap.gfull { position: fixed; inset: 0; z-index: 200; }
.gwrap:fullscreen .gfs-bar, .gwrap.gfull .gfs-bar { display: flex; }
.gwrap:fullscreen .gantt, .gwrap.gfull .gantt { max-height: none; flex: 1; }
body.gfull-on { overflow: hidden; }
/* Task a schede: contatori, allegati, checklist */
.tcount { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 11.5px; line-height: 18px; text-align: center; }
.ptabs a.on .tcount { background: var(--brand-50); color: var(--brand-700); }
.dropzone { display: flex; align-items: center; gap: 12px; border: 2px dashed var(--line-strong); border-radius: 12px; padding: 16px; cursor: pointer; background: var(--soft); margin-bottom: 8px; }
.dropzone:hover, .dropzone.over { border-color: var(--mint); background: var(--brand-50); } .dropzone.busy { opacity: .55; pointer-events: none; }
.dropzone .ico { width: 22px; height: 22px; color: var(--brand); flex: none; }
.files { margin-top: 6px; }
.file-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); } .file-row:last-child { border-bottom: 0; }
.file-row .fi { font-size: 18px; flex: none; } .file-row .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.card.narrow { max-width: 760px; }
.deps-box .dep { display: flex; gap: 6px; } .deps-box .dep .grow { flex: 1; }
