:root{--navy:#1b3a6b;--navy-d:#10264a;--ink:#14202e;--muted:#4f5f73;--line:#dde3ec;--bg:#f3f5f8;--ok:#1f5c3c;--ok-bg:#e3f2ea;--warn:#8a4a12;--warn-bg:#fff1e0;--err:#9b1c1c;--err-bg:#fde8e8}
*{box-sizing:border-box}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Inter,sans-serif;background:var(--bg);color:var(--ink);font-size:16px;line-height:1.45}
a{color:var(--navy)}a:hover{color:var(--navy-d)}
h1{font-size:1.5rem;margin:.2rem 0 .6rem}h2{font-size:1.15rem;margin:.2rem 0 .6rem}
.top{background:var(--navy);color:#fff}
.top-in{max-width:980px;margin:0 auto;padding:.7rem 1rem;display:flex;align-items:center;gap:.8rem;flex-wrap:wrap}
.top a{color:#fff;text-decoration:none}
.brand{font-weight:700;flex:1}
.back{font-size:1.8rem;line-height:1;min-width:44px;min-height:44px;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.12);border-radius:10px}
.menu{display:flex;gap:.3rem;flex-wrap:wrap}
.menu a{padding:.55rem .7rem;border-radius:8px;font-size:.95rem}
.menu a:hover{background:rgba(255,255,255,.14)}
.wrap{max-width:980px;margin:0 auto;padding:1rem}
.card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:1rem;margin:0 0 .8rem}
.card.narrow{max-width:420px;margin:2rem auto}
.list .row-link,.row-link{display:flex;flex-direction:column;gap:.15rem;text-decoration:none;color:var(--ink)}
.row-link:hover{border-color:var(--navy)}
.muted{color:var(--muted)}.small{font-size:.86rem}.mono{font-family:ui-monospace,Consolas,monospace;letter-spacing:.04em}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.head-row{display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap}
.btn{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:.5rem 1rem;border-radius:10px;border:1px solid #c3ccd8;background:#fff;color:var(--ink);font:inherit;font-weight:600;text-decoration:none;cursor:pointer}
.btn.small{min-height:40px;padding:.35rem .8rem;font-size:.9rem}
.btn.primary{background:var(--navy);border-color:var(--navy);color:#fff}
.btn.primary:hover{background:var(--navy-d)}
.btn.danger{border-color:var(--err);color:var(--err)}
.form{display:flex;flex-direction:column;gap:.45rem}
.form label{font-weight:600;font-size:.92rem;margin-top:.3rem}
input,select,textarea{font:inherit;padding:.6rem .7rem;border:1px solid #c3ccd8;border-radius:10px;background:#fff;width:100%;min-height:44px}
textarea{resize:vertical}
input[type=checkbox],input[type=radio]{width:auto;min-height:0}
fieldset{border:1px solid var(--line);border-radius:12px;padding:.8rem;margin:0 0 .8rem}
legend{font-weight:700;padding:0 .3rem}
.grid2{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:.2rem 1rem}
.grid2>div{display:flex;flex-direction:column;gap:.3rem}
.check{display:flex;align-items:center;gap:.5rem;font-weight:400!important;min-height:40px}
.checks{display:flex;flex-direction:column}
.search{display:flex;gap:.5rem;flex-wrap:wrap;align-items:center;margin-bottom:.8rem}
.search input[type=search]{flex:1 1 260px;width:auto}
.tags{display:inline-flex;gap:.35rem;flex-wrap:wrap}
.tag{font-size:.78rem;font-weight:600;padding:.18rem .55rem;border-radius:999px;background:#eef1f5;color:#3c4a5c}
.tag.ok{background:var(--ok-bg);color:var(--ok)}.tag.warn{background:var(--warn-bg);color:var(--warn)}
.flash{padding:.8rem 1rem;border-radius:10px;margin:0 0 .8rem;background:var(--ok-bg);color:var(--ok)}
.flash.err{background:var(--err-bg);color:var(--err)}
.boat-head p{margin:.25rem 0}
.note-int{background:var(--warn-bg);padding:.6rem .8rem;border-radius:10px}
.phase{margin-bottom:1rem}.phase:last-child{margin-bottom:0}
.phase-head{display:flex;justify-content:space-between;gap:1rem}
.bar{height:8px;background:#e3e8ef;border-radius:4px;overflow:hidden;margin:.4rem 0 .5rem}
.bar div{height:8px;background:var(--navy)}
.steps{list-style:none;margin:0;padding:0}
.steps li{display:flex;justify-content:space-between;align-items:center;gap:.6rem;padding:.35rem 0;border-bottom:1px solid #eef1f5;flex-wrap:wrap}
.steps li.done span:first-child{color:var(--ok)}
.inline{display:inline}
.seg{display:flex;gap:.5rem}
.seg label{flex:1;display:flex;align-items:center;justify-content:center;gap:.4rem;border:1px solid #c3ccd8;border-radius:10px;min-height:44px;margin:0;cursor:pointer}
.seg label:has(input:checked){border-color:var(--navy);background:#e6edf7}
.entry.anom{border-color:#e0a060}
.entry.arch{opacity:.6}
.entry-head{display:flex;justify-content:space-between;gap:.6rem;flex-wrap:wrap}
.entry p{margin:.45rem 0;white-space:normal}
.media{display:flex;gap:.5rem;flex-wrap:wrap;margin:.4rem 0}
.media img{width:120px;height:90px;object-fit:cover;border-radius:8px;display:block;background:#e3e8ef}
.media video{width:100%;max-width:420px;border-radius:8px;background:#000}
.actions{display:flex;gap:.4rem;flex-wrap:wrap;margin-top:.5rem}
details.tr{background:var(--bg);border-radius:8px;padding:.4rem .7rem;margin:.4rem 0}
details.tr summary{cursor:pointer;font-size:.9rem;color:var(--muted);min-height:32px;display:flex;align-items:center}
.user-row{display:flex;justify-content:space-between;gap:1rem;flex-wrap:wrap;align-items:flex-start}
.user-row.arch{opacity:.6}
.user-row select{width:auto;min-height:40px;padding:.3rem .5rem}
.langs{display:flex;gap:.8rem}.langs a[aria-current]{font-weight:700;text-decoration:none}
.upload-progress{height:8px;background:#e3e8ef;border-radius:4px;overflow:hidden}
.upload-progress div{height:8px;width:0;background:var(--navy);transition:width .2s}
@media (max-width:560px){.wrap{padding:.7rem}.card{padding:.85rem}.menu a{padding:.5rem}}
details.phase summary{list-style:none;cursor:pointer;min-height:36px;align-items:center}
details.phase summary::-webkit-details-marker{display:none}
details.phase summary strong::before{content:'▸ ';color:var(--muted)}
details.phase[open] summary strong::before{content:'▾ '}
details.edit-user{margin:.3rem 0}
details.edit-user summary{cursor:pointer;color:var(--navy);min-height:32px;display:flex;align-items:center}
.phone{display:flex;gap:.4rem}
.phone select{flex:0 0 7.2rem;width:7.2rem}
.phone input[type=tel]{flex:1;min-width:0}
.linkbtn{background:none;border:0;padding:0 0 0 .5rem;color:var(--navy);text-decoration:underline;font:inherit;font-size:.86rem;cursor:pointer;min-height:32px}
/* Diario compatto: azioni piccole a destra */
.entry{margin-bottom:.5rem;padding:.75rem 1rem}
.entry-row{display:flex;gap:1rem;align-items:flex-start;justify-content:space-between}
.entry-main{flex:1;min-width:0}
.entry-main p{margin:.3rem 0}
.entry .actions{margin-top:0;flex:0 0 auto;justify-content:flex-end;gap:.3rem;align-items:center}
.entry .actions .btn,.entry .actions .btn.small{min-height:32px;padding:.15rem .6rem;font-size:.8rem;border-radius:8px}
.entry.step{padding:.45rem 1rem;background:#fafbfc}
.entry.step .entry-main p{margin:.1rem 0;font-size:.95rem}
@media (max-width:640px){.entry-row{flex-direction:column;gap:.4rem}.entry .actions{justify-content:flex-start}.entry .actions .btn,.entry .actions .btn.small{min-height:38px}}
.step-form{display:inline-flex;gap:.3rem;align-items:center}
.btn.cam{padding:.35rem .6rem;cursor:pointer;color:var(--navy)}
.btn.cam:focus-within{outline:2px solid var(--navy);outline-offset:2px}
.grid4{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:.2rem .8rem}
.grid4>div{display:flex;flex-direction:column;gap:.3rem}
.engine{padding:.4rem 0 .6rem;border-bottom:1px solid #eef1f5;margin-bottom:.4rem}
.engine-title{display:block;margin-top:.2rem}
.engines{margin:.3rem 0;padding-left:1.1rem}
.step-line{display:flex;justify-content:space-between;gap:.6rem;flex-wrap:wrap;align-items:center;min-height:32px}
.step-line strong{color:var(--ok);font-weight:600;margin-right:.4rem}
.btn.cam.mini{min-height:30px;padding:.1rem .45rem;margin-left:.4rem;vertical-align:middle}
.entry .actions form.inline{display:inline-flex}
.label-like{font-weight:600;font-size:.92rem;margin-top:.3rem}
.media-edit{display:flex;gap:.7rem;flex-wrap:wrap}
.media-item{display:flex;flex-direction:column;gap:.2rem;align-items:flex-start}
.media-item img,.media-item video{width:140px;height:105px;object-fit:cover;border-radius:8px;background:#e3e8ef}
.tr-missing{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap;background:var(--warn-bg);border-radius:8px;padding:.35rem .7rem;margin:.4rem 0}
/* Check guidato */
.check-item{display:flex;flex-direction:column;gap:.45rem}
.check-item.anom{border-color:#e0a060}
.check-head{display:flex;justify-content:space-between;gap:.5rem;flex-wrap:wrap;align-items:flex-start}
.seg3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.4rem}
.seg3 label{font-weight:600!important;font-size:.92rem}
.seg3 label.s-ok:has(input:checked){background:var(--ok-bg);border-color:var(--ok);color:var(--ok)}
.seg3 label.s-na:has(input:checked){background:#eef1f5;border-color:#4a5568}
.seg3 label.s-an:has(input:checked){background:var(--warn-bg);border-color:#b5651d;color:var(--warn)}
.timer{display:flex;gap:.6rem;align-items:center;flex-wrap:wrap}
.timer-time{font-size:1.4rem;font-weight:700;font-variant-numeric:tabular-nums}
.timer.done .timer-time{color:var(--ok)}
.btn.cam-wide{align-self:flex-start;gap:.4rem;cursor:pointer;color:var(--navy)}
.check-actions{display:grid;grid-template-columns:1fr 2fr;gap:.6rem;position:sticky;bottom:0;background:var(--bg);padding:.6rem 0}
.check-form fieldset{border:0;padding:0;margin:0;min-width:0}
.check-links{display:flex;gap:.5rem;flex-wrap:wrap;margin:.4rem 0}
