*{box-sizing:border-box}body{margin:0;background:#f3f7fc;color:#0b2448;font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif}.shell{width:min(92%,890px);margin:24px auto 48px;background:#f4f8fd;border-radius:0 0 36px 36px;box-shadow:0 14px 38px #15385b0b;min-height:600px}.blue{background:linear-gradient(120deg,#153e86,#1758b5);color:#fff;border-radius:0 0 36px 36px;padding:34px 4% 68px}.top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.brand{color:white;text-decoration:none;font-weight:900;font-size:clamp(18px,2.5vw,28px);letter-spacing:-.8px}.check{font-size:1.25em}.cyan{color:#5dd0ff}.brand small{display:block;font-weight:400;letter-spacing:2px;font-size:12px;color:#c7dfff;margin:4px 0 0 30px}.back{color:#e3efff;font-size:13px;text-decoration:none}.blue h1{font-size:clamp(26px,4vw,38px);margin:52px 0 10px}.blue p{font-size:clamp(16px,2.5vw,23px);margin:0;color:#d9e9ff}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:-38px 2.7% 0;position:relative}.stat{min-height:110px;background:#fff;border-radius:22px;display:flex;flex-direction:column;align-items:center;justify-content:center;box-shadow:0 8px 25px #15385b08;text-align:center;padding:8px}.stat.active{background:#ecf4ff;border:3px solid #1763ed}.stat b{font-size:35px;color:#111}.stat:nth-child(2) b{color:#c58111}.stat:nth-child(3) b{color:#008766}.stat:nth-child(4) b{color:#74869d}.stat span{font-size:13px;color:#71849c;margin-top:3px}.content{padding:40px 3% 58px}.section-title{display:flex;justify-content:space-between;align-items:center;gap:15px}.section-title h2{font-size:25px;margin:0 0 18px}.add{background:none;border:0;color:#1461d7;font-size:20px;font-weight:800;cursor:pointer;margin-bottom:18px}.items{background:white;border-radius:23px;min-height:110px;padding:14px 20px}.empty{color:#7c90a9;text-align:center;padding:24px 0;font-size:19px}.item{display:flex;justify-content:space-between;align-items:center;gap:12px;border-bottom:1px solid #e5ecf6;padding:13px 2px;flex-wrap:wrap}.item:last-child{border:0}.item.done strong{text-decoration:line-through;color:#7b8da1}.meta{color:#7588a1;font-size:13px;margin-top:5px}.item button{border:1px solid #dae3ef;border-radius:9px;background:white;color:#1b59b6;padding:9px 11px;cursor:pointer;margin:2px}.notice{font-size:12px;line-height:1.6;color:#71849c;margin:22px 3px}dialog{border:0;border-radius:22px;padding:26px;width:min(92vw,450px);box-shadow:0 25px 70px #092b5480}dialog::backdrop{background:#061f46a6}dialog h2{margin-top:0}dialog label{display:block;font-size:14px;font-weight:600;margin:15px 0}dialog input{display:block;width:100%;margin-top:7px;border:1px solid #c7d5e7;border-radius:10px;padding:12px;font:inherit}.actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}.actions button{padding:12px 17px;border:1px solid #ccd9e8;border-radius:10px;background:white;cursor:pointer}.actions .primary{background:#1761d4;color:white;border-color:#1761d4}@media(max-width:620px){.shell{width:100%;margin:0;border-radius:0}.blue{padding:25px 5% 62px}.stats{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:-33px}.stat{min-height:92px}.content{padding:30px 5%}.section-title h2{font-size:20px}.add{font-size:17px}.back{max-width:110px;text-align:right}.blue h1{margin-top:35px}}
/* v33: complete inline editor, consistent with the Italian SCADENZA ZERO form */
.editor-panel{background:#fff;border-radius:18px;margin:22px 3% 0;padding:clamp(18px,3vw,30px);box-shadow:0 5px 18px #123f7b08}
.editor-panel h2{font-size:clamp(20px,2.6vw,26px);margin:0 0 8px;color:#0a2347}
.formhelp{color:#627c9b;font-size:13px;line-height:1.6;margin:0 0 22px}
.editor-panel label{display:block;color:#102b52;font-size:13px;font-weight:750;margin:16px 0 7px}
.editor-panel input,.editor-panel select{width:100%;min-width:0;display:block;padding:13px 14px;border:1px solid #c8d8ec;border-radius:9px;background:white;color:#0a2347;font:inherit;font-size:15px}
.editor-panel input:focus,.editor-panel select:focus{outline:2px solid #1764e8;outline-offset:1px}
.editor-panel .save{display:block;width:100%;background:#1761df;color:white;border:0;border-radius:10px;padding:15px;margin-top:24px;font-weight:750;cursor:pointer;font-size:15px}
.editor-panel .save:hover{background:#104eae}
@media(max-width:620px){.editor-panel{margin:15px 4% 0;padding:18px}}

/* v34: the complete form is only visible after pressing + Add */
.editor-panel[hidden]{display:none!important}
.content .editor-panel{margin:4px 0 22px}
.cancel-editor{display:block;width:100%;background:#fff;color:#1655b4;border:1px solid #c7d8ef;border-radius:10px;padding:13px;margin-top:18px;font-weight:700;cursor:pointer}

/* v35 — Icona contestuale per ciascuna scadenza */
.due-details{display:flex;align-items:center;gap:13px;min-width:0;flex:1 1 180px}
.due-details>div{min-width:0;overflow-wrap:anywhere}
.due-icon{width:46px;height:46px;flex:0 0 46px;display:flex;align-items:center;justify-content:center;background:#e8f2ff;border-radius:12px;font-size:24px;line-height:1}
@media(max-width:420px){.due-icon{width:40px;height:40px;flex-basis:40px;font-size:21px}.due-details{gap:10px}}

/* v36 — Italian dashboard-style status and actions */
.due-actions{display:flex;flex-direction:column;align-items:flex-end;gap:5px;min-width:115px;text-align:right}
.due-status{font-size:12px;color:#c17a0b;font-weight:600}
.due-status.overdue{color:#cb3434}
.item .due-actions button{margin:0;padding:2px 0;border:0;background:transparent;color:#1761df;border-radius:0;font-size:12px;line-height:1.6;cursor:pointer}
.item .due-actions button:hover{text-decoration:underline}
.item .due-actions .action-done{font-weight:600}
.action-links{display:flex;gap:7px;justify-content:flex-end}
.item .due-actions .action-delete{color:#df3b43}
@media(max-width:420px){.due-actions{min-width:100px}.item{flex-wrap:nowrap}.due-details{flex:1 1 0;min-width:0}}

/* v37: four functional, accessible summary filters */
button.stat{border:3px solid transparent;font:inherit;color:inherit;cursor:pointer;appearance:none;transition:border-color .12s,background-color .12s}
button.stat.active{border:3px solid #1763ed;background:#ecf4ff}
button.stat:hover:not(.active){border-color:#b8d3fb}
button.stat:focus-visible{outline:3px solid #0d54cc;outline-offset:3px}
.item .due-actions button[hidden]{display:none}

/* v39: FREE limit + PRO upgrade popup (demo; no checkout enabled) */
.free-usage{margin:0 0 12px;color:#637d9b;font-size:13px;font-weight:650}
.upgrade-modal{width:min(92vw,470px);max-height:90vh;overflow:auto;padding:clamp(24px,5vw,36px);border:0;border-radius:22px;box-shadow:0 28px 90px #09244b70;color:#0b2448}
.upgrade-modal::backdrop{background:#061e46a8}
.upgrade-mark{width:58px;height:58px;border-radius:16px;background:#e6f1ff;color:#165bc9;font-size:28px;display:grid;place-items:center;margin-bottom:14px}
.upgrade-eyebrow{font-size:11px;font-weight:800;letter-spacing:1.2px;color:#165bc9;margin:0 0 10px}
.upgrade-modal h2{font-size:clamp(23px,4vw,30px);line-height:1.2;margin:0 0 12px;color:#102f64}
.upgrade-modal p:not(.upgrade-eyebrow){font-size:15px;line-height:1.6;color:#5d7290}
.upgrade-benefit{border:1px solid #d9e6f8;background:#f2f7ff;border-radius:14px;padding:15px;margin:18px 0 20px;display:flex;flex-direction:column;gap:7px}
.upgrade-benefit strong{color:#104b9d;font-size:14px}
.upgrade-benefit span{color:#607996;font-size:13px;line-height:1.5}
.upgrade-primary{display:block;text-align:center;text-decoration:none;background:#1761df;color:#fff;padding:15px 16px;border-radius:10px;font-size:15px;font-weight:800}
.upgrade-primary:hover{background:#104aab}
.upgrade-secondary{display:block;width:100%;border:0;background:transparent;color:#5b7496;font-size:14px;font-weight:650;padding:15px 12px;margin-top:6px;cursor:pointer}
