:root{--bg:#f5f7fc;--paper:#fff;--ink:#172b4b;--sub:#8391a9;--line:#e9edf5;--blue:#487bd1;--blue-soft:#edf3ff;--mint:#60b595;--rose:#d08cad;--shadow:0 12px 35px rgba(28,49,86,.06);font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Inter,Arial,sans-serif;color:var(--ink);font-synthesis:none;-webkit-tap-highlight-color:transparent}*{box-sizing:border-box}html{height:100%;-webkit-text-size-adjust:100%}body{margin:0;background:var(--bg);min-height:100%;}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.55;cursor:not-allowed}[hidden]{display:none!important}.shell{max-width:1140px;margin:auto;min-height:100vh;background:#fff}.topbar{height:74px;display:flex;align-items:center;justify-content:space-between;padding:0 40px;border-bottom:1px solid var(--line);background:#fff;position:sticky;top:0;z-index:4}.brand{display:flex;align-items:center;gap:9px}.brand-symbol,.login-symbol{color:var(--blue);font-size:37px;line-height:1;font-weight:900;letter-spacing:-.16em}.brand-symbol span,.login-symbol span{color:#ec98ab;margin-left:1px}.brand-name{font-weight:700;font-size:19px;letter-spacing:-.6px}.brand-name b{color:var(--blue)}.header-actions{display:flex;align-items:center;gap:12px}.sync-badge{font-size:11px;color:#8a97ab;font-weight:700}.avatar{width:38px;height:38px;border:0;border-radius:50%;background:#eaf1fd;color:var(--blue);font-weight:700}main{max-width:760px;margin:auto;padding:28px 35px 130px}.page{display:none;animation:fadeIn .18s ease}.page.active{display:block}@keyframes fadeIn{from{opacity:.4}to{opacity:1}}.hero{display:flex;align-items:center;justify-content:space-between;margin:11px 0 26px}.eyebrow{font-size:10px;letter-spacing:1.7px;font-weight:800;color:var(--blue);margin:0 0 9px}.hero h1,.view-head h1{font-size:36px;letter-spacing:-1.35px;line-height:1.2;margin:0 0 11px}.hero h1 span,.view-head h1 span{color:var(--blue)}.subtitle,.view-head>p:not(.eyebrow){font-size:14px;color:var(--sub);margin:0}.hero-calendar{width:60px;height:60px;border-radius:19px;background:#edf3fd;display:grid;place-items:center;color:#6b90d8;font-size:32px}.metric-row{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:29px}.metric{border:1px solid var(--line);border-radius:17px;background:#fff;padding:18px;display:flex;align-items:center;gap:9px;flex-wrap:wrap;min-width:0}.metric-symbol{display:grid;place-items:center;width:30px;height:30px;border-radius:10px;font-size:18px}.metric-symbol.blue{color:#638cdc;background:#ecf2fe}.metric-symbol.rose{color:#ce8eac;background:#fcf0f6}.metric-symbol.olive{color:#77ab91;background:#ecf9f1}.metric strong{font-size:27px;font-weight:800;letter-spacing:-.8px;line-height:1}.metric small{display:block;width:100%;color:#8492a7;font-size:12px;font-weight:600}.section-heading{display:flex;justify-content:space-between;align-items:end;margin:22px 0 15px}.section-heading h2{font-size:19px;letter-spacing:-.6px;margin:0}.section-heading .eyebrow{margin-bottom:6px}.quiet-btn,.text-btn{border:0;background:transparent;color:var(--blue);font-weight:700;font-size:13px;padding:8px}.weekrail{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}.daychip{min-width:0;background:#fff;border:1px solid var(--line);border-radius:14px;min-height:79px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;color:#98a6bc}.daychip strong{font-size:17px;color:#425773;line-height:1}.daychip small{font-weight:700;font-size:11px}.daychip i{width:4px;height:4px;border-radius:50%;background:#a1b7e1;opacity:0}.daychip i.mark{opacity:1}.daychip.active{background:var(--blue);border-color:var(--blue);box-shadow:0 6px 15px rgba(72,123,209,.16)}.daychip.active small,.daychip.active strong{color:white}.daychip.active i{background:white}.daily{margin-top:28px}.plus-btn{background:var(--blue);color:white;border:0;border-radius:11px;width:35px;height:35px;font-size:26px;line-height:1}.filters{display:flex;gap:7px;margin:0 0 15px;overflow-x:auto;scrollbar-width:none}.filters button{flex-shrink:0;white-space:nowrap;border:1px solid var(--line);padding:9px 12px;border-radius:9px;background:#fff;color:#7c8ba3;font-size:12px;font-weight:700}.filters button.selected{background:#eaf2ff;color:var(--blue);border-color:#c3d5f7}.event-list{display:flex;flex-direction:column;gap:9px;min-height:80px}.event-item{display:flex;align-items:stretch;gap:12px;min-height:79px;padding:14px 15px;background:#fff;border:1px solid var(--line);border-radius:15px;text-align:left;width:100%;box-shadow:0 4px 12px rgba(22,43,75,.025);color:var(--ink);overflow:hidden}.event-item:active{transform:scale(.997)}.event-item .time-slot{width:60px;min-width:60px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:4px;border-right:1px solid #edf0f6;padding-right:10px}.time-slot strong{font-size:13px;white-space:nowrap;font-variant-numeric:tabular-nums}.time-slot small{font-size:10px;color:#9aa6b8;white-space:nowrap}.event-item .rail{width:4px;min-width:4px;border-radius:8px;background:var(--blue)}.event-item.family .rail{background:var(--rose)}.event-item.ruas .rail{background:var(--mint)}.event-text{flex:1;min-width:0;padding:1px 0}.event-text strong{font-size:14px;display:block;line-height:1.3;overflow-wrap:anywhere}.event-text p{font-size:11px;color:var(--sub);margin:6px 0 0;line-height:1.4}.event-item .arrow{align-self:center;color:#a8b5cb}.empty{background:#f9fbff;border:1px dashed #dce4f1;border-radius:14px;padding:31px 18px;text-align:center;color:#93a1b4;font-size:13px;line-height:1.6}.empty strong{display:block;color:#465b7b;margin-bottom:4px}.notice{display:flex;align-items:flex-start;gap:13px;padding:18px 19px;background:#eef4fd;border-radius:16px;margin-top:22px}.notice>span{color:#6c92db;font-size:20px}.notice p{margin:0;font-size:12px;line-height:1.8;color:#7286a7}.notice strong{color:#33496b}.bottomnav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);max-width:1140px;width:100%;height:76px;background:#fff;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-around;z-index:6;padding-bottom:env(safe-area-inset-bottom)}.bottomnav button{border:0;background:transparent;color:#96a5bb;min-width:65px;display:flex;gap:5px;align-items:center;flex-direction:column}.bottomnav button span{font-size:25px;line-height:1.1}.bottomnav button small{font-size:10px;font-weight:700}.bottomnav button.active{color:var(--blue)}.fab{display:none}.view-head{margin:19px 0 26px}.view-head h1{font-size:35px}.calendar{background:white;padding:22px 18px;border:1px solid var(--line);border-radius:19px}.monthbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.monthbar strong{font-size:17px;letter-spacing:-.3px;text-transform:capitalize}.chevron{border:1px solid var(--line);border-radius:10px;width:36px;height:36px;background:#fff;font-size:24px;color:var(--blue)}.weekdays,.monthgrid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;text-align:center}.weekdays span{color:#a3adbf;font-size:11px;font-weight:700;padding:4px}.monthcell{min-height:43px;background:transparent;border:0;position:relative;border-radius:11px;color:#5c6b82;font-size:13px}.monthcell.out{color:#bdc5d2}.monthcell.current{background:#eaf1fe;color:#3769ba}.monthcell.picked{background:var(--blue);color:white}.monthcell .dots{position:absolute;bottom:3px;left:50%;transform:translateX(-50%);display:flex;gap:2px}.monthcell .dots i{width:4px;height:4px;background:#84a4d7;border-radius:50%}.monthcell.picked .dots i{background:white}.settings-card,.family-card{background:white;border:1px solid var(--line);border-radius:18px;padding:23px;margin:0 0 17px}.settings-card h2,.family-card h2{font-size:18px;line-height:1.4;margin:0 0 8px;overflow-wrap:anywhere}.soft{font-size:13px;line-height:1.7;color:#8a97ad}.family-code{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:17px;letter-spacing:1px;padding:12px;background:#f4f6fa;border:1px dashed #cbd5e6;border-radius:10px;overflow-wrap:anywhere}.buttonrow{display:flex;gap:9px;flex-wrap:wrap}.primary,.secondary,.danger{border-radius:11px;padding:12px 17px;font-size:13px;font-weight:750;white-space:nowrap}.primary{background:var(--blue);color:white;border:1px solid var(--blue)}.secondary{border:1px solid #d8e1ef;color:#466ca6;background:#fff}.danger{color:#b85169;border:1px solid #f3cfda;background:white}.wide{width:100%;margin-top:16px}.settings-card .secondary{margin-top:8px}.toggle-line{display:flex;align-items:center;gap:10px;font-size:13px;font-weight:600;margin:15px 0}.toggle-line input{width:18px;height:18px;accent-color:var(--blue)}.login-overlay{min-height:calc(100dvh - 74px);padding:32px 22px;background:#f5f7fc;display:flex;align-items:center;justify-content:center}.login-card{max-width:460px;width:100%;background:white;border:1px solid var(--line);border-radius:23px;padding:38px;box-shadow:var(--shadow)}.login-symbol{margin-bottom:20px}.login-card h1{font-size:30px;line-height:1.22;letter-spacing:-1px;margin:0 0 12px}.login-card label,.sheet label{display:block;font-size:12px;font-weight:750;margin:17px 0 7px}.login-card input,.sheet input,.sheet select,.sheet textarea{display:block;width:100%;background:#f8faff;border:1px solid #dae2ef;color:#263c5b;border-radius:10px;padding:13px;outline:0;font-size:14px;min-height:46px}.login-card input:focus,.sheet input:focus,.sheet select:focus,.sheet textarea:focus{border-color:var(--blue);box-shadow:0 0 0 3px #dae7fc}.password-row{display:flex;gap:3px;align-items:center}.password-row input{flex:1;min-width:0}.auth-extra{display:flex;justify-content:space-between;gap:10px;margin-top:12px}.fine{font-size:11px;line-height:1.7;color:#9ca8b8;margin-top:18px}.overlay{position:fixed;inset:0;background:rgba(18,35,64,.42);z-index:20;display:flex;align-items:flex-end;justify-content:center}.sheet{width:100%;max-width:560px;max-height:94dvh;overflow-y:auto;overscroll-behavior:contain;background:white;border-radius:22px 22px 0 0;padding:23px 25px calc(24px + env(safe-area-inset-bottom));box-shadow:0 -20px 50px rgba(13,27,55,.13)}.sheet-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.sheet-head h2{font-size:22px;letter-spacing:-.7px;margin:0}.close{width:35px;height:35px;border-radius:9px;color:#8595ab;background:#f3f5f9;border:0;font-size:25px}.formgrid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.sheet em{color:#bd6781;font-style:normal}.form-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:10px;margin-top:25px}.form-actions .danger{margin-right:auto}.detail-row{display:flex;gap:15px;border-bottom:1px solid var(--line);padding:13px 0;font-size:14px}.detail-row .detail-label{width:82px;min-width:82px;color:#8a98ae;font-size:12px}.detail-row .detail-value{line-height:1.5;overflow-wrap:anywhere}.toast{position:fixed;left:50%;transform:translateX(-50%);bottom:95px;max-width:min(520px,calc(100vw - 30px));background:#243a5c;color:white;padding:13px 19px;border-radius:13px;box-shadow:0 12px 28px #223e6050;font-size:13px;z-index:60;text-align:center}.fine-link{font-size:12px;color:var(--blue);font-weight:600}.family-form{display:flex;gap:9px;flex-wrap:wrap;align-items:center}.family-form input{min-width:0;flex:1;padding:12px;border:1px solid #dfe5ee;border-radius:10px}.family-form .secondary{padding:12px}.status-tip{margin-top:9px;font-size:12px;color:var(--sub);line-height:1.6}.sync-badge.bad{color:#b45064}.sync-badge.ok{color:#52a083}.twoline{white-space:nowrap;font-variant-numeric:tabular-nums}
@media(max-width:620px){.shell{min-height:100dvh}.topbar{height:66px;padding:0 21px}.brand-name{font-size:17px}.brand-symbol{font-size:32px}main{padding:20px 17px calc(105px + env(safe-area-inset-bottom))}.hero{margin:14px 0 24px}.hero h1{font-size:30px}.hero-calendar{height:48px;width:48px;font-size:24px}.metric-row{gap:8px;margin-bottom:30px}.metric{padding:11px;gap:7px;border-radius:13px}.metric strong{font-size:23px}.metric small{font-size:10px}.metric-symbol{width:25px;height:25px;font-size:15px}.section-heading h2{font-size:17px}.daychip{min-height:69px;border-radius:11px}.weekrail{gap:5px}.daychip strong{font-size:16px}.daychip small{font-size:10px}.filters{gap:6px}.filters button{padding:9px 10px}.event-item{padding:12px 10px;gap:9px}.event-item .time-slot{min-width:52px;width:52px;padding-right:6px}.event-text strong{font-size:13px}.bottomnav{height:calc(68px + env(safe-area-inset-bottom))}.bottomnav button span{font-size:22px}.calendar{padding:18px 12px}.monthcell{min-height:40px}.view-head h1{font-size:32px}.family-card,.settings-card{padding:19px}.login-card{padding:28px 23px}.sheet{padding:22px 19px calc(20px + env(safe-area-inset-bottom))}.toast{bottom:calc(85px + env(safe-area-inset-bottom))}}@media(max-width:340px){.metric small{font-size:9px}.metric{padding:10px 7px}.event-text strong{font-size:12px}.hero h1{font-size:28px}.formgrid{gap:7px}.sheet{padding-left:12px;padding-right:12px}}

/* Beta 2.1: collegamento privato del calendario e attivazione notifiche. */
.feed-panel{margin:14px 0;padding:12px;border:1px solid #dce6f3;border-radius:12px;background:#f7faff;min-width:0}
.feed-panel input{font-size:12px;width:100%;max-width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.feed-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.feed-actions button{flex:1 1 135px}
#pushStatus,#feedStatus{overflow-wrap:anywhere}.settings-card{min-width:0}

/* Beta 2.2 — Sistema cromatico uniforme: lavoro blu, privato viola, famiglia verde. */
:root{--mfb-work:#467DD5;--mfb-private:#9A73C5;--mfb-family:#4BA68A;--mfb-work-soft:#f1f6ff;--mfb-private-soft:#f8f3fd;--mfb-family-soft:#f1fbf6}
.event-item.ruas,.event-item.work{background:var(--mfb-work-soft);border-color:#dfeaff}
.event-item.private{background:var(--mfb-private-soft);border-color:#e9dcf5}
.event-item.family{background:var(--mfb-family-soft);border-color:#dcefe7}
.event-item.ruas .rail,.event-item.work .rail{background:var(--mfb-work)}
.event-item.private .rail{background:var(--mfb-private)}
.event-item.family .rail{background:var(--mfb-family)}
.category-dot,.filter-dot{display:inline-block;width:9px;min-width:9px;height:9px;border-radius:50%;background:var(--mfb-private)}
.category-dot.private,.filter-dot.private,.monthcell .dots i.private{background:var(--mfb-private)}
.category-dot.family,.filter-dot.family,.monthcell .dots i.family{background:var(--mfb-family)}
.category-dot.work,.filter-dot.work,.monthcell .dots i.work{background:var(--mfb-work)}
.event-type-label{font-size:9px;letter-spacing:.08em;font-weight:850;display:flex;align-items:center;gap:6px;margin:0 0 6px;color:#576c8c;white-space:nowrap}
.event-item .time-slot{white-space:nowrap;font-variant-numeric:tabular-nums}
.metric-symbol.work{background:#eaf2ff;color:var(--mfb-work)}.metric-symbol.family{background:#eaf9f2;color:var(--mfb-family)}
.filters button{display:flex;align-items:center;gap:6px}.filters button[data-filter="ruas"].selected{border-color:#b9d1f6;color:var(--mfb-work);background:#eef5ff}.filters button[data-filter="private"].selected{border-color:#d6c0eb;color:var(--mfb-private);background:var(--mfb-private-soft)}.filters button[data-filter="family"].selected{border-color:#b9e2d0;color:#31846a;background:var(--mfb-family-soft)}
.monthcell .dots{gap:3px}.monthcell .dots i{flex-shrink:0;width:5px;height:5px}
.feed-category{border-radius:11px;padding:10px 11px;margin-top:10px;min-width:0;border:1px solid #dfe7f1}
.feed-category.work{background:var(--mfb-work-soft)}.feed-category.private{background:var(--mfb-private-soft)}.feed-category.family{background:var(--mfb-family-soft)}
.feed-category label{font-weight:760;font-size:12px;display:flex;align-items:center;gap:8px;margin-bottom:8px;white-space:nowrap}
.feed-copy-row{display:flex;gap:8px;align-items:center;min-width:0}.feed-copy-row input{min-width:0;flex:1}.feed-copy-row button{flex-shrink:0;font-size:12px;padding:10px 11px}
.twoline,.metric strong,.time-slot strong,.monthbar strong{white-space:nowrap;font-variant-numeric:tabular-nums}
@media(max-width:360px){.event-item{gap:7px}.event-item .time-slot{min-width:46px;width:46px;padding-right:5px}.event-type-label{font-size:8px}.feed-copy-row{gap:5px}.feed-copy-row button{padding:10px 8px}}

/* Keep category colors readable even on selected calendar date. */
.monthcell.picked .dots i.work{background:var(--mfb-work);box-shadow:0 0 0 1px white}.monthcell.picked .dots i.private{background:var(--mfb-private);box-shadow:0 0 0 1px white}.monthcell.picked .dots i.family{background:var(--mfb-family);box-shadow:0 0 0 1px white}
