/* Home reference: plum navigation, pale surfaces, compact reception work area. */
:root{--ink:#171722;--muted:#696674;--surface:#fff;--line:#eeeaef;--soft:#f8f2f6;--shadow:0 8px 24px #4d2c3c05}body{color:var(--ink);background:var(--page)}aside{width:250px;padding:28px 18px;background:linear-gradient(130deg,color-mix(in srgb,var(--brand) 72%,#fff),color-mix(in srgb,var(--brand) 66%,#160f19) 55%,color-mix(in srgb,var(--brand) 72%,#241725));overflow-y:auto}.workspace{margin-left:250px}.brand-lockup{padding:0 11px}.brand-lockup .logo{gap:12px;font-size:40px;font-weight:500;letter-spacing:-2px;line-height:1.3}.brand-bee{width:60px;height:40px;filter:brightness(0) invert(1);opacity:.95}.brand-tagline{max-width:150px;margin-top:5px;font-size:16px;line-height:1.35;color:#e3d7df}.studio{display:none}#nav{margin-top:32px;gap:5px}#nav button{display:flex;align-items:center;gap:24px;padding:17px 16px;border-radius:12px;font-weight:400;color:#f1e8ed;font-size:14px;background:transparent}#nav button svg{flex-shrink:0}#nav button.active{background:#ffffff20;color:white;box-shadow:inset 0 1px 0 #ffffff09}#nav button:hover{background:#ffffff13}#nav button.active:hover{background:#ffffff29}.sidefoot{display:block;margin-top:35px}.business-button{display:flex;align-items:center;gap:13px;width:100%;text-align:left;color:white}.business-button>span:nth-child(2){flex:1;min-width:0;overflow-wrap:anywhere;font-size:13px}.business-button small{display:block;font-size:12px;color:#dbc9d2}.business-button .home-avatar{background:#ffffff22;color:white;width:41px;height:41px;font-size:15px}.app-header{height:65px;padding:12px 30px;background:var(--surface);border-bottom:1px solid var(--line);display:flex;gap:28px;justify-content:flex-end}.header-location{margin-right:auto;color:var(--muted);font-size:13px}.home-view .header-location{visibility:hidden}.global-search-wrap{position:relative;max-width:360px;width:34vw}.global-search-wrap input{width:100%;height:38px;border-radius:24px;border:1px solid #e6dfe6;background:#faf8fa;padding:8px 14px 8px 44px;font-size:12px;color:var(--ink)}.search-symbol{position:absolute;top:3px;left:16px;font-size:26px;line-height:30px;color:var(--ink)}.header-tools{gap:20px;display:flex;align-items:center}.header-tools .iconbutton{width:30px;height:35px;color:var(--ink);border:0;background:transparent;position:relative}.home-view #privacy{display:none}#notification-button i{position:absolute;top:2px;right:2px;width:7px;height:7px;background:#783349;border-radius:50%;border:1px solid var(--surface)}.search-results{position:absolute;right:0;top:48px;background:var(--surface);border:1px solid var(--line);border-radius:15px;box-shadow:0 14px 45px #39232e24;width:min(470px,calc(100vw - 32px));max-height:65vh;overflow:auto;z-index:20;padding:8px}.search-heading{font-size:12px;color:var(--muted);padding:8px 12px}.search-result{display:block;text-align:left;width:100%;padding:12px;background:transparent;border:0;border-radius:9px;color:var(--ink)}.search-result:hover{background:var(--soft)}.search-result b{display:block;font-size:14px}.search-result small{display:block;font-size:12px;margin-top:4px;color:var(--muted);overflow-wrap:anywhere}.search-empty{padding:12px;font-size:14px}main{max-width:1600px;padding:25px 36px 35px}h1,h2,h3{color:var(--ink)}.home-intro{display:flex;justify-content:space-between;align-items:center;gap:24px;margin:0 0 20px;padding:0 6px}.home-date{font-size:12px;text-transform:uppercase;letter-spacing:.7px;color:#5b5360;margin-bottom:5px}.home-intro h1{font-family:'DM Sans',sans-serif;font-size:38px;letter-spacing:-1px;line-height:1.2;font-weight:600;margin:7px 0 5px}.home-intro p{font-size:19px;color:#6b6475;font-weight:400;margin:0}.new-appointment-split{display:flex;align-items:stretch;flex-shrink:0;box-shadow:0 5px 14px #6f3e5120;border-radius:11px;overflow:hidden}.new-appointment-split .btn{min-height:48px;display:flex;align-items:center;gap:15px;border-radius:0;font-size:14px;padding:12px 17px;border:0;white-space:nowrap}.new-appointment-split .btn:last-child{padding-left:7px;padding-right:17px}.btn.primary{background:var(--brand);border-color:var(--brand);color:white}.btn.primary:hover{filter:brightness(1.09)}.home-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:20px}.home-metric{display:flex;align-items:flex-start;gap:20px;padding:16px;border:1px solid #ffffff8c;border-radius:15px;min-height:129px;text-align:left;box-shadow:var(--shadow);color:var(--ink);font:inherit}.home-metric:hover{box-shadow:0 8px 26px #51273b0d}.metric-appointments{background:linear-gradient(120deg,#faf9ff,#f9f7fd)}.metric-value{background:linear-gradient(120deg,#fafffd,#f2f9f8)}.metric-wait{background:linear-gradient(120deg,#fffcf9,#fdf9f6)}.metric-gift{background:linear-gradient(120deg,#fff9fc,#faf4f8)}.metric-occupancy{background:linear-gradient(120deg,#faf9ff,#f5f2ff)}.metric-icon{display:grid;place-items:center;width:55px;height:55px;border-radius:50%;flex-shrink:0;color:#392732;background:#eeE7f0}.metric-value .metric-icon{background:#e7f3f1;color:#2c3633}.metric-wait .metric-icon{background:#f9eee2;color:#4f3427}.metric-gift .metric-icon{background:#fbe6ec;color:#753143}.metric-occupancy .metric-icon{background:#eee9ff;color:#7054d8}.occupancy-status{margin-left:auto;padding:3px 8px;border:1px solid #bfead8;border-radius:6px;background:#eaf9f2;color:#16785b;font-size:11px;font-weight:600;line-height:1.2;white-space:nowrap}.metric-occupancy .metric-title{width:100%}.metric-body{min-width:0;flex:1;display:block;padding-top:3px}.metric-title{font-size:13px;color:#5f5c6c;display:flex;align-items:center;gap:5px;min-height:24px}.metric-body strong{display:block;font-size:29px;letter-spacing:-1px;line-height:1.25;font-weight:650;margin:3px 0 7px}.metric-comparison{display:flex;align-items:center;gap:9px;flex-wrap:wrap;line-height:1.3}.metric-change{font-size:12px;color:#17684e;background:#e5f3ec;border-radius:5px;padding:2px 5px;white-space:nowrap}.metric-change.negative{background:#fbeceb;color:#a04b4b}.metric-baseline{font-size:12px;color:#827b88}.metric-eye{border:0;background:transparent;color:#897681;display:inline-flex;align-items:center;padding:0;opacity:.8}.metric-eye svg{width:16px;height:16px}.home-columns{display:grid;grid-template-columns:minmax(0,1.88fr) minmax(325px,1fr);gap:20px;align-items:start}.home-card{background:var(--surface);border:1px solid #ece7ec;border-radius:16px;box-shadow:var(--shadow)}.home-agenda{padding:0 20px;min-width:0}.home-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.home-section-head h2,.quick-card h2{font-family:'DM Sans',sans-serif;font-size:18px;font-weight:650;letter-spacing:-.35px}.agenda-head{min-height:72px;padding:17px 0 14px}.section-title{border:0;background:transparent;font-size:19px;font-weight:650;letter-spacing:-.3px;color:var(--ink);padding:0;display:flex;align-items:center;gap:16px;white-space:nowrap}.section-title span{color:var(--brand);font-size:26px;font-weight:400}.agenda-head .filters{gap:10px;display:flex;flex-wrap:nowrap}.agenda-head .control-button{font-size:12px;border:1px solid #e6dfe8;border-radius:10px;min-height:39px;padding:8px 12px;background:var(--surface);color:var(--ink);box-shadow:0 2px 3px #34233503;max-width:215px;white-space:nowrap}.home-appointment{display:grid;grid-template-columns:65px 54px minmax(0,1fr) 100px 34px 37px;align-items:center;gap:13px;padding:15px 0;border-top:1px solid var(--line);min-height:81px}.home-time{font-size:14px;display:grid;gap:3px;align-self:start;padding-top:4px}.home-time b{font-weight:650}.home-time span{color:var(--muted)}.home-avatar{display:inline-grid;place-items:center;flex-shrink:0;width:44px;height:44px;border-radius:50%;background:#efdee7;color:#704456;font-size:16px;font-weight:400}.home-person{min-width:0}.person-name{border:0;background:transparent;text-align:left;padding:0;color:var(--ink);font-size:15px;font-weight:650;overflow-wrap:anywhere}.person-name:hover{text-decoration:underline;text-underline-offset:3px}.home-person p{font-size:14px;margin:1px 0;color:#666272;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.home-person small{font-size:12px;color:#777080}.home-person .home-note-preview{font-size:12px;color:var(--brand);margin-top:4px}.home-status{justify-self:start;padding:6px 11px;border-radius:7px;background:#edf7f1;color:#246a4d;font-size:12px;white-space:nowrap}.home-status.done{background:#edf6f1}.home-status.progress{background:#eaf1ff;color:#285cad}.home-status.pending{background:#fff2df;color:#925b12}.home-status.cancel{background:#f5e7eb;color:#9a4f62}.row-icon{border:1px solid var(--line);color:var(--ink);border-radius:9px;background:var(--surface);width:34px;min-height:34px;display:inline-flex;align-items:center;justify-content:center;font-size:14px;padding:5px;letter-spacing:1px}.row-icon:hover{background:var(--soft);border-color:#d6c1cf}.row-icon.has-note{color:var(--brand);background:var(--soft)}.agenda-bottom{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--line);gap:10px;min-height:59px}.textbtn{color:var(--brand)}.agenda-bottom .textbtn,.weekly-card .textbtn{display:inline-flex;align-items:center;gap:12px;font-weight:400;font-size:13px;padding:0}.home-side{display:grid;gap:15px;min-width:0}.next-home{background:linear-gradient(120deg,#f5e8ee,color-mix(in srgb,var(--accent) 84%,white));border-radius:16px;padding:16px 18px 14px;color:var(--ink)}.next-home .home-section-head{margin-bottom:12px}.next-home .home-section-head>span{color:var(--brand);font-size:13px;text-align:right}.next-inner{background:#ffffff66;border-radius:13px;padding:17px}.next-person{display:flex;align-items:center;gap:15px}.home-avatar.large{height:57px;width:57px;font-size:20px;background:#ebd5e0}.next-person>div{flex:1;min-width:0}.next-person .person-name{font-size:17px}.next-person p{font-size:14px;color:#453b47;line-height:1.4;margin:5px 0 11px}.next-meta{display:flex;gap:10px;justify-content:space-between;flex-wrap:wrap;font-size:12px}.next-meta>span:last-child{display:flex;gap:7px;align-items:center}.next-actions{display:flex;gap:12px;margin-top:16px}.next-actions .primary{flex:1;display:flex;align-items:center;justify-content:center;gap:9px;font-size:14px;min-height:44px;border-radius:10px;padding:10px}.next-actions .row-icon{width:47px;background:transparent;border-color:#d9bbc9;color:var(--brand)}.next-note{display:flex;gap:8px;align-items:center;margin-top:10px;background:transparent;border:0;color:var(--brand);width:100%;padding:0}.next-note span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.next-note svg{flex-shrink:0}.quick-card{padding:16px 18px 14px}.quick-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:13px}.quick-grid button{display:flex;align-items:center;gap:14px;background:var(--soft);color:var(--brand);border:0;border-radius:10px;text-align:left;padding:12px 14px;min-height:44px;font-size:12px}.quick-grid button:hover{background:var(--accent)}.quick-grid svg{flex-shrink:0}.weekly-card{padding:17px 18px 14px}.weekly-card h2{font-size:17px}.weekly-card .textbtn{font-size:12px;gap:8px;white-space:nowrap}.weekly-chart{display:flex;gap:12px;margin-top:30px;padding-top:26px;height:158px}.chart-column{border:0;background:transparent;display:flex;flex:1;min-width:0;flex-direction:column;align-items:center;padding:0;color:var(--ink);position:relative}.bar-space{height:100%;width:100%;display:flex;align-items:flex-end;position:relative;border-bottom:1px solid var(--line)}.chart-bar{display:block;width:100%;background:#d8c5ce;border-radius:4px 4px 0 0;min-height:2px}.chart-column.selected .chart-bar{background:linear-gradient(#734a5c,#5f394b)}.chart-day{font-size:12px;padding-top:9px}.chart-tip{display:none;position:absolute;bottom:calc(100% + 8px);left:50%;transform:translateX(-50%);min-width:99px;background:var(--brand);color:#fff;box-shadow:0 5px 10px #44243225;border-radius:9px;padding:9px 12px;z-index:2;text-align:left;white-space:nowrap}.chart-tip b{font-size:13px;font-weight:500}.chart-tip small{display:block;font-size:11px;color:#e5d8e0;line-height:1.3;margin-top:2px}.chart-tip:after{content:'';position:absolute;top:100%;left:45%;border:5px solid transparent;border-top-color:var(--brand)}.chart-column:hover .chart-tip,.chart-column:focus-visible .chart-tip{display:block}.chart-caption{font-size:11px;color:var(--muted);margin:17px 0 0}.owner-name-field{margin-bottom:15px}.report-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:20px 0}.report-summary .home-card{padding:22px}.report-summary strong{display:block;font-size:30px;margin-top:8px}.report-navigation{display:flex;gap:10px}.detailed-report{padding:24px}.report-table-wrap{overflow-x:auto}.detailed-report table{width:100%;border-collapse:collapse;margin:20px 0}.detailed-report td,.detailed-report th{text-align:left;padding:15px 8px;border-bottom:1px solid var(--line);font-size:14px}.detailed-report th{color:var(--muted);font-weight:500}footer{font-size:11px;color:#8c7e8a;padding:0 36px 22px}
@media(min-width:1450px){.home-appointment{gap:17px}.home-agenda{padding:0 22px}.home-metric{padding:17px 15px}.home-columns{grid-template-columns:minmax(0,1.88fr) minmax(370px,1fr)}}
@media(max-width:1250px){aside{width:218px;padding-left:14px;padding-right:14px}.workspace{margin-left:218px}main{padding:24px}.brand-lockup .logo{font-size:35px}.brand-bee{width:47px}#nav button{gap:17px;padding:15px 12px}.home-intro h1{font-size:32px}.home-intro p{font-size:16px}.home-metric{gap:11px;padding:14px 12px}.metric-icon{width:42px;height:42px}.metric-title{font-size:12px}.metric-body strong{font-size:26px}.home-columns{grid-template-columns:minmax(0,1.5fr) minmax(305px,1fr);gap:15px}.home-appointment{grid-template-columns:49px 38px minmax(0,1fr) 83px 31px 31px;gap:8px}.home-avatar{width:35px;height:35px;font-size:13px}.home-status{font-size:11px;padding:5px 7px}.agenda-head{align-items:flex-start;flex-direction:column;gap:12px}.home-person .person-name{font-size:14px}.home-person p{font-size:13px}.home-person small{font-size:11px}.home-agenda{padding:0 15px}.quick-grid button{padding:10px;font-size:11px;gap:9px}.home-section-head h2{font-size:16px}.weekly-card .home-section-head{flex-wrap:wrap;gap:8px}.next-inner{padding:12px}.next-person{gap:10px}.home-avatar.large{width:43px;height:43px;font-size:17px}.next-person .person-name{font-size:15px}.next-actions .primary{font-size:12px}.home-metrics{gap:10px}}
@media(max-width:1050px){.home-columns{grid-template-columns:1fr}.home-side{grid-template-columns:1fr 1fr}.weekly-card{grid-column:2;grid-row:1/3}.agenda-head{flex-direction:row;align-items:center;flex-wrap:wrap}.home-appointment{grid-template-columns:65px 54px minmax(0,1fr) 100px 34px 37px;gap:13px}.home-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.home-metric{min-height:112px;gap:18px}.home-intro{flex-wrap:wrap}.home-intro h1{font-size:32px}.next-home{grid-column:1}.quick-card{grid-column:1}.weekly-chart{height:230px;margin-top:45px}.metric-title{font-size:14px}.metric-body strong{font-size:28px}}
@media(max-width:700px){aside{position:static;width:100%;padding:20px 16px 10px;overflow:visible}.workspace{margin-left:0}.brand-lockup{padding:0 4px}.brand-lockup .logo{font-size:33px}.brand-tagline{max-width:none;font-size:14px}.brand-bee{width:48px;height:32px}#nav{display:flex;overflow-x:auto;margin-top:20px;gap:5px;padding-bottom:5px}#nav button{flex-shrink:0;gap:9px;padding:11px 13px;font-size:13px}#nav button svg{width:19px;height:19px}.sidefoot{display:none}.app-header{height:62px;padding:12px 17px;gap:15px}.header-location{display:none}.global-search-wrap{max-width:none;width:auto;flex:1}.global-search-wrap input{font-size:12px}.header-tools{gap:12px}.header-tools .iconbutton{width:28px}.header-tools #privacy{display:none}main{padding:22px 16px}.home-intro{padding:0;gap:17px}.home-intro h1{font-size:29px}.home-intro p{font-size:16px}.home-date{font-size:11px}.new-appointment-split{width:100%}.new-appointment-split .btn:first-child{flex:1;justify-content:center}.home-metric{gap:10px;padding:13px 11px;min-height:112px}.metric-icon{width:36px;height:36px}.metric-icon svg{width:22px;height:22px}.metric-title{font-size:12px}.metric-body strong{font-size:25px}.metric-baseline{font-size:11px}.metric-comparison{gap:5px}.home-side{grid-template-columns:1fr}.next-home,.quick-card,.weekly-card{grid-column:auto;grid-row:auto}.home-columns{gap:15px}.home-appointment{grid-template-columns:43px 36px minmax(0,1fr) 32px 32px;gap:8px;padding:13px 0}.home-status{grid-column:3;grid-row:auto;font-size:11px;max-width:100%;margin-top:-2px}.home-appointment>.row-icon{grid-row:1}.home-appointment>.row-icon:nth-last-child(2){grid-column:4}.home-appointment>.row-icon:last-child{grid-column:5}.home-person{grid-column:3;grid-row:1}.home-time{grid-column:1;grid-row:1;font-size:12px}.home-avatar{grid-column:2;grid-row:1;align-self:start;margin-top:3px}.home-person small{display:block;font-size:11px}.home-person .person-name{font-size:14px}.home-person p{font-size:12px}.agenda-head .filters{width:100%;gap:7px}.agenda-head .control-button{min-width:0;max-width:none;flex:1;font-size:11px;padding:8px}.section-title{font-size:18px}.home-agenda{padding:0 13px}.agenda-bottom .textbtn{font-size:12px;gap:5px}.next-home .home-section-head h2,.quick-card h2,.weekly-card h2{font-size:18px}.next-person .person-name{font-size:17px}.next-actions .primary{font-size:14px}.quick-grid button{font-size:12px;padding:13px}.weekly-chart{height:166px;margin-top:30px}.report-summary{gap:8px}.report-summary .home-card{padding:12px}.report-summary small{font-size:11px}.report-summary strong{font-size:24px}.report-navigation{flex-wrap:wrap}.detailed-report{padding:16px}footer{padding:0 16px 20px;line-height:1.5}.home-intro h1{overflow-wrap:anywhere}}
@media(prefers-reduced-motion:no-preference){.home-card,.home-metric,.next-home{animation:home-appear .3s ease-out}.chart-bar{transition:height .25s ease}.btn,.row-icon,.quick-grid button{transition:background .15s,box-shadow .15s}@keyframes home-appear{from{opacity:.6;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}}

.search-symbol{top:9px;display:flex;align-items:center;height:20px;line-height:1}
/* Shared theme colors: all home decoration derives from the selected palette. */
body{--soft:color-mix(in srgb,var(--accent) 32%,white);--line:color-mix(in srgb,var(--brand) 10%,white)}
.home-metric.metric-appointments,.home-metric.metric-value,.home-metric.metric-wait,.home-metric.metric-gift,.home-metric.metric-occupancy{background:linear-gradient(120deg,color-mix(in srgb,var(--accent) 12%,white),color-mix(in srgb,var(--accent) 34%,white));border-color:color-mix(in srgb,var(--accent) 35%,white)}
.home-metric .metric-icon{background:color-mix(in srgb,var(--accent) 70%,white);color:var(--brand)}
.home-avatar,.home-avatar.large{background:color-mix(in srgb,var(--accent) 80%,white);color:var(--brand)}
.next-home{background:linear-gradient(120deg,color-mix(in srgb,var(--accent) 54%,white),var(--accent))}
.home-card{border-color:var(--line)}.chart-bar{background:color-mix(in srgb,var(--brand) 28%,white)}.chart-column.selected .chart-bar{background:linear-gradient(color-mix(in srgb,var(--brand) 85%,white),var(--brand))}
.next-actions .row-icon,.row-icon:hover{border-color:color-mix(in srgb,var(--brand) 25%,white)}
.global-search-wrap input{background:color-mix(in srgb,var(--accent) 15%,white);border-color:var(--line)}
.search-symbol{top:50%;transform:translateY(-50%);left:16px;height:18px;line-height:1;pointer-events:none}.search-symbol svg{display:block}
.metric-body strong{font-size:clamp(20px,2vw,29px);white-space:nowrap;letter-spacing:-.6px;max-width:100%;font-variant-numeric:tabular-nums}.home-metric{min-width:0;column-gap:12px}.metric-value .metric-body{min-width:0}.metric-title{flex-wrap:wrap;line-height:1.35}.metric-eye{flex-shrink:0}
.home-status.scheduled{background:transparent;padding:0;min-height:0}.home-status.done{color:#176341;background:#e7f5eb}.home-status.progress{color:#174fa6;background:#e7efff}.home-status.cancel{color:#a42734;background:#fce8eb}.home-appointment.is-deleted .home-person>p:not(.home-note-preview),.home-appointment.is-deleted .home-time{color:var(--muted)}
.metric-change.neutral{color:var(--muted);background:var(--soft)}
@media(max-width:1250px) and (min-width:1051px){.metric-value .metric-icon{width:34px;height:34px}.metric-value{column-gap:8px}.metric-body strong{font-size:24px}}
@media(max-width:700px){.home-metric{column-gap:8px}.metric-value .metric-icon{width:30px;height:30px}.metric-body strong{font-size:clamp(18px,5.5vw,25px)}.metric-body{padding-top:0}.home-status.scheduled{display:none}}
/* Align the glyph and input within the same box; no inherited input margin. */
.global-search-wrap{display:grid;align-items:center}
.global-search-wrap input{grid-area:1/1;margin:0;line-height:20px;box-sizing:border-box}
.global-search-wrap .search-symbol{grid-area:1/1;position:static;transform:none;align-self:center;justify-self:start;margin:0 0 0 16px;width:18px;height:18px;z-index:1;display:flex;align-items:center;justify-content:center}
.global-search-wrap .search-shortcut-hint{grid-area:1/1;align-self:center;justify-self:end;margin:0 10px;z-index:1;pointer-events:none;white-space:nowrap;display:inline-flex;align-items:center;justify-content:center}
#global-search{padding-right:62px}
/* Dark surfaces and hover states{background:var(--soft);border-color:var(--line);color:var(--ink)}

/* Cover the viewport even when the current page contains only a few cards. */
body{min-height:100vh;min-height:100dvh}

/* Home: integra la topbar con lo sfondo della pagina,evitando lo stacco bianco netto. */
body.home-view .app-header{background:var(--page);border-bottom-color:transparent}

/* Home: separazione morbida della topbar,adattiva al tema selezionato. */
body.home-view .app-header{
  background:linear-gradient(90deg,
    color-mix(in srgb,var(--accent) 32%,var(--page)),
    color-mix(in srgb,var(--accent) 18%,var(--page)) 52%,
    var(--page));
  border-bottom-color:color-mix(in srgb,var(--brand) 10%,var(--page));
}

/* Home: ricerca a sinistra e scorciatoia Buoni regalo accanto al nuovo appuntamento. */
body.home-view .header-location{display:none}
body.home-view .global-search-wrap{margin-right:auto}
.home-intro-actions{display:flex;align-items:center;gap:12px;flex-shrink:0}
.home-gift-shortcut{min-height:48px;display:flex;align-items:center;gap:10px;padding:12px 16px;background:var(--surface);border:1px solid var(--line);color:var(--ink);border-radius:10px;box-shadow:0 3px 10px #38243a0a;white-space:nowrap;font-weight:500}
.home-gift-shortcut svg{color:var(--brand)}
.home-gift-shortcut strong{font-weight:700;color:var(--ink)}
.home-gift-shortcut:hover{background:var(--soft);border-color:color-mix(in srgb,var(--brand) 18%,var(--line))}
@media(max-width:700px){.home-intro-actions{width:100%;flex-wrap:wrap}.home-intro-actions .new-appointment-split{width:auto;flex:1}.home-gift-shortcut{flex:1;justify-content:center}}

/* Home color accents: neutral surfaces,color only where it helps scanning */
.home-metric.metric-appointments{background:var(--surface);border-color:var(--line)}
.home-metric.metric-value{background:var(--surface);border-color:var(--line)}
.home-metric.metric-occupancy{background:var(--surface);border-color:var(--line)}
.home-metric.metric-wait{background:var(--surface);border-color:var(--line)}
.home-metric.metric-appointments .metric-icon{background:#e8f4ff;color:#1683c7}
.home-metric.metric-value .metric-icon{background:#e5f8ef;color:#15966a}
.home-metric.metric-occupancy .metric-icon{background:#eee9ff;color:#7658e8}
.home-metric.metric-wait .metric-icon{background:#e9edff;color:#5149d8}

/* Tema Bianco: sidebar blu notte (modifica puntuale) */
html[data-esteja-theme="white"] aside{background:#0f1b2d;}
html[data-esteja-theme="white"] #nav button{color:#aebbd0;}
html[data-esteja-theme="white"] #nav button.active{background:#ffffff14;color:#fff;}
html[data-esteja-theme="white"] #nav button:hover{background:#ffffff0d;color:#fff;}
html[data-esteja-theme="white"] #nav button.active:hover{background:#ffffff1c;}
html[data-esteja-theme="white"] .brand-tagline{color:#9eacc1;}
html[data-esteja-theme="white"] .business-button small{color:#9eacc1;}

/* PUNTO 2 — accenti cromatici KPI Home (base: sidebar blu notte) */
.home-metric.metric-appointments{border-color:#d7eaf8;box-shadow:inset 0 3px 0 #49a9df,var(--shadow)}
.home-metric.metric-value{border-color:#d4eee2;box-shadow:inset 0 3px 0 #45c694,var(--shadow)}
.home-metric.metric-occupancy{border-color:#e1dafb;box-shadow:inset 0 3px 0 #8b72ed,var(--shadow)}
.home-metric.metric-wait{border-color:#dddffa;box-shadow:inset 0 3px 0 #6863dc,var(--shadow)}
.home-metric.metric-appointments .metric-icon{background:#e8f5fd;color:#1687c9}
.home-metric.metric-value .metric-icon{background:#e4f8ee;color:#15966a}
.home-metric.metric-occupancy .metric-icon{background:#eee9ff;color:#7658e8}
.home-metric.metric-wait .metric-icon{background:#e9edff;color:#5149d8}
.home-metric.metric-appointments .metric-title{color:#397a9f}
.home-metric.metric-value .metric-title{color:#28795e}
.home-metric.metric-occupancy .metric-title{color:#6550ad}
.home-metric.metric-wait .metric-title{color:#53508e}


/* PUNTO 3 — avatar cliente con palette pastello stabile per cliente */
.home-appointment .home-avatar.client-tone-0,.next-home .home-avatar.client-tone-0{background:#dceeff;color:#2f6fa8}
.home-appointment .home-avatar.client-tone-1,.next-home .home-avatar.client-tone-1{background:#eee4ff;color:#7454ad}
.home-appointment .home-avatar.client-tone-2,.next-home .home-avatar.client-tone-2{background:#ddf5e9;color:var(--ds-success)}
.home-appointment .home-avatar.client-tone-3,.next-home .home-avatar.client-tone-3{background:#fff0c9;color:#9a6b16}
.home-appointment .home-avatar.client-tone-4,.next-home .home-avatar.client-tone-4{background:#f7dfeb;color:#a05278}
.home-appointment .home-avatar.client-tone-5,.next-home .home-avatar.client-tone-5{background:#e2e6ff;color:#555fa9}

/* Esteja Home — Punto 5: CTA e stati cromatici */
.home-intro-actions .btn.primary,.next-home .next-actions .btn.primary{
  background:#0f1b2d;
  border-color:#0f1b2d;
  color:#fff;
  box-shadow:0 5px 14px #0f1b2d20;
}
.home-intro-actions .btn.primary:hover,.next-home .next-actions .btn.primary:hover{
  background:#172740;
  border-color:#172740;
  filter:none;
}
.home-gift-shortcut{
  background:var(--surface);
  border-color:#e7def6;
}
.home-gift-shortcut svg,.home-gift-shortcut strong{
  color:#7454ad;
}
.home-gift-shortcut:hover{
  background:#faf7ff;
  border-color:#cfc0e8;
}
.home-status.done{
  background:#e7f5ec;
  color:#23724f;
}
.home-status.progress{
  background:#e7f1ff;
  color:#2868ad;
}
.home-status.pending{
  background:#fff1d9;
  color:#946118;
}
.home-status.cancel{
  background:#f8e8ed;
  color:#a04f67;
}
.home-agenda .textbtn,.weekly-card .textbtn,.section-title span{
  color:#7454ad;
}

/* Esteja Home — Punto 6: rifinitura tipografica e gerarchia visiva */
.home-intro h1{font-size:36px;line-height:1.14;letter-spacing:-1.15px;font-weight:650}
.home-intro p{font-size:16px;line-height:1.45;color:#716b79}
.home-date{font-size:11px;letter-spacing:.9px;font-weight:600}
.metric-title{font-size:12.5px;font-weight:550;letter-spacing:.01em}
.metric-body strong{font-size:28px;line-height:1.18;font-weight:700;letter-spacing:-.85px}
.metric-baseline,.metric-change{font-size:11.5px}
.home-section-head h2,.quick-card h2,.section-title{font-size:18px;font-weight:650;letter-spacing:-.4px}
.home-appointment{min-height:78px;padding:13px 0}
.home-time{font-size:13px;line-height:1.3}
.person-name{font-size:14.5px;font-weight:650;letter-spacing:-.1px}
.home-person p{font-size:13px;line-height:1.35;margin:2px 0}
.home-person small,.home-person .home-note-preview{font-size:11.5px}
.home-status{font-size:11.5px;font-weight:600;padding:5px 10px}
.agenda-bottom .textbtn,.weekly-card .textbtn{font-size:12.5px;font-weight:500}
@media(max-width:700px){.home-intro h1{font-size:31px}.home-intro p{font-size:15px}.metric-body strong{font-size:clamp(18px,5.5vw,25px)}}


/* Fix puntuale Occupazione slot: percentuale e stato sulla stessa riga */
.metric-occupancy .occupancy-value-row{display:flex;align-items:center;gap:12px;margin:3px 0 7px;min-height:34px}
.metric-occupancy .occupancy-value-row>strong{display:block;margin:0}
.metric-occupancy .occupancy-status{margin-left:0;flex-shrink:0}

/* Fix puntuale header agenda: più respiro orizzontale al titolo,altezza invariata */
@media(min-width:1251px){
  .agenda-head .section-title{min-width:300px;flex-shrink:0}
}
/* Home agenda: altezza dinamica in base agli appuntamenti.
   Rimane compatta con pochi elementi e cresce naturalmente fino agli 8 mostrati in Home. */
@media(min-width:1051px){
  .home-columns{align-items:start}
  .home-agenda{height:auto;display:block}
  .home-appointment-list{flex:none}
  .agenda-bottom{margin-top:0}
}

/* RIFERIMENTO HOME — Punto 2: scala desktop più compatta e sidebar leggermente più larga.
   Solo proporzioni/spaziature: nessun cambio di struttura o contenuti. */
@media(min-width:1251px){
  body.home-view aside{
    width:272px;
    padding:24px 16px 22px;
  }
  body.home-view .workspace{margin-left:272px}
  body.home-view .brand-lockup{padding:0 10px}
  body.home-view .brand-lockup .logo{
    gap:10px;
    font-size:34px;
    letter-spacing:-1.6px;
  }
  body.home-view .brand-bee{width:52px;height:35px}
  body.home-view .brand-tagline{
    max-width:170px;
    margin-top:3px;
    font-size:12.5px;
    line-height:1.4;
  }
  body.home-view #nav{margin-top:27px;gap:4px}
  body.home-view #nav button{
    gap:18px;
    padding:14px 14px;
    border-radius:10px;
    font-size:13.5px;
  }
  body.home-view .sidefoot{margin-top:28px}
  body.home-view .pro-card{
    gap:12px;
    padding:16px 15px;
    min-height:86px;
    border-radius:14px;
  }
  body.home-view .pro-card strong{font-size:13px}
  body.home-view .pro-card small{font-size:11.5px;margin-top:4px}
  body.home-view .business-button{gap:11px}
  body.home-view .business-button>span:nth-child(2){font-size:12.5px}
  body.home-view .business-button small{font-size:11.5px}
  body.home-view .business-button .home-avatar{width:38px;height:38px;font-size:14px}

  body.home-view .app-header{
    height:58px;
    padding:9px 28px;
    gap:24px;
  }
  body.home-view .global-search-wrap{max-width:410px}
  body.home-view .global-search-wrap input{height:36px;font-size:11.5px}
  body.home-view .search-symbol{top:2px;font-size:24px}
  body.home-view .header-tools{gap:16px}

  body.home-view main{
    max-width:1660px;
    padding:22px 32px 30px;
  }
  body.home-view .home-intro{
    gap:20px;
    margin-bottom:16px;
    padding:0 2px;
  }
  body.home-view .home-date{font-size:10.5px;margin-bottom:3px}
  body.home-view .home-intro h1{
    font-size:34px;
    line-height:1.1;
    margin:5px 0 4px;
  }
  body.home-view .home-intro p{font-size:15px;line-height:1.35}
  body.home-view .home-intro-actions{gap:10px}
  body.home-view .new-appointment-split .btn,
  body.home-view .home-gift-shortcut{
    min-height:44px;
    font-size:13px;
  }
  body.home-view .new-appointment-split .btn{gap:11px;padding:10px 15px}
  body.home-view .home-gift-shortcut{padding:10px 14px}

  body.home-view .home-metrics{
    gap:16px;
    margin-bottom:18px;
  }
  body.home-view .home-metric{
    min-height:116px;
    gap:16px;
    padding:14px 15px;
    border-radius:14px;
  }
  body.home-view .metric-icon{width:50px;height:50px}
  body.home-view .metric-title{min-height:21px;font-size:11.8px}
  body.home-view .metric-body{padding-top:2px}
  body.home-view .metric-body strong{font-size:26px;margin:2px 0 5px}
  body.home-view .metric-baseline,
  body.home-view .metric-change{font-size:10.8px}
  body.home-view .occupancy-status{font-size:10.5px;padding:3px 7px}
  body.home-view .metric-occupancy .occupancy-value-row{min-height:31px;gap:10px;margin:2px 0 5px}

  body.home-view .home-columns{
    grid-template-columns:minmax(0,1.92fr) minmax(320px,.96fr);
    gap:18px;
  }
  body.home-view .home-card{border-radius:14px}
  body.home-view .home-agenda{padding:0 18px}
  body.home-view .agenda-head{min-height:64px;padding:14px 0 12px}
  body.home-view .agenda-head .section-title{font-size:17px}
  body.home-view .agenda-head .control-button{
    min-height:36px;
    padding:7px 11px;
    font-size:11.5px;
    border-radius:9px;
  }
  body.home-view .home-appointment{
    grid-template-columns:60px 49px minmax(0,1fr) 94px 32px 35px;
    gap:11px;
    min-height:72px;
    padding:10px 0;
  }
  body.home-view .home-time{font-size:12.5px}
  body.home-view .home-avatar{width:40px;height:40px;font-size:14.5px}
  body.home-view .person-name{font-size:14px}
  body.home-view .home-person p{font-size:12.5px}
  body.home-view .home-person small,
  body.home-view .home-person .home-note-preview{font-size:11px}
  body.home-view .home-status{font-size:11px;padding:4px 9px}
  body.home-view .row-icon{width:32px;min-height:32px;font-size:13px}
  body.home-view .agenda-bottom{min-height:53px}

  body.home-view .home-side{gap:13px}
  body.home-view .next-home{padding:14px 16px 13px;border-radius:14px}
  body.home-view .next-home .home-section-head{margin-bottom:10px}
  body.home-view .next-inner{padding:14px;border-radius:11px}
  body.home-view .home-avatar.large{width:50px;height:50px;font-size:18px}
  body.home-view .next-person{gap:12px}
  body.home-view .next-person .person-name{font-size:15.5px}
  body.home-view .next-person p{font-size:12.5px;margin:3px 0 8px}
  body.home-view .next-meta{font-size:11px}
  body.home-view .next-actions{gap:10px;margin-top:13px}
  body.home-view .next-actions .primary{min-height:40px;font-size:12.5px;padding:8px}
  body.home-view .next-actions .row-icon{width:42px}
  body.home-view .quick-card{padding:14px 16px 13px}
  body.home-view .quick-grid{gap:8px;margin-top:11px}
  body.home-view .quick-grid button{min-height:40px;padding:10px 12px;font-size:11.5px;gap:11px}
  body.home-view .weekly-card{padding:15px 16px 13px}
  body.home-view .weekly-card h2{font-size:16px}
  body.home-view .weekly-chart{margin-top:24px;padding-top:22px;height:148px}
}


/* RIFERIMENTO HOME — Punto 3: righe appuntamenti più ordinate e informative.
   Trattamento,operatore,durata e prezzo stanno su un'unica riga; le note hanno una riga dedicata. */
.home-appointment{grid-template-columns:65px 54px minmax(0,1fr) 100px 34px 78px}
.home-person .home-appointment-meta{
  display:flex;
  align-items:center;
  min-width:0;
  margin:2px 0 0;
  color:#59667d;
  font-size:12px;
  line-height:1.35;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.home-appointment-meta>span{flex:0 0 auto}
.home-appointment-meta>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis}
.home-appointment-meta .meta-sep{padding:0 6px;color:#b1bac8}
.home-person .home-note-preview{
  display:block;
  margin:3px 0 0;
  color:#8d79b8;
  font-size:11.5px;
  line-height:1.3;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.row-note-button{width:auto;min-width:72px;gap:7px;padding:5px 9px;letter-spacing:0;font-weight:500}
.row-note-button span{display:inline}
.row-note-button svg{flex-shrink:0}

@media(min-width:1251px){
  body.home-view .home-appointment{grid-template-columns:60px 49px minmax(0,1fr) 94px 32px 74px}
  body.home-view .home-person .home-appointment-meta{font-size:11.5px}
  body.home-view .home-person .home-note-preview{font-size:10.8px}
  body.home-view .row-note-button{min-width:70px;padding:5px 8px}
}
@media(max-width:1250px) and (min-width:1051px){
  .home-appointment{grid-template-columns:49px 38px minmax(0,1fr) 83px 31px 68px}
  .row-note-button{min-width:66px;padding:5px 7px;font-size:12px}
}
@media(max-width:1050px) and (min-width:701px){
  .home-appointment{grid-template-columns:65px 54px minmax(0,1fr) 100px 34px 76px}
}
@media(max-width:700px){
  .home-appointment{grid-template-columns:43px 36px minmax(0,1fr) 32px 32px}
  .row-note-button{width:32px;min-width:32px;padding:5px;gap:0}
  .row-note-button span{display:none}
  .home-person .home-appointment-meta{display:block;font-size:11px;white-space:nowrap}
  .home-person .home-note-preview{font-size:10.8px}
  .home-appointment-meta .meta-sep{padding:0 3px}
}

/* RIFERIMENTO HOME — Punto 4: orari agenda più netti e leggibili.
   Solo la colonna orari: cifre tabulari/monospaziate,start più deciso,fine più discreta. */
.home-time{
  font-family:"SFMono-Regular",Menlo,Monaco,Consolas,"Liberation Mono",monospace;
  font-variant-numeric:tabular-nums;
  font-feature-settings:"tnum" 1;
  letter-spacing:-.035em;
}
.home-time b{
  font-weight:700;
  color:var(--ink);
}
.home-time span{
  font-weight:500;
  color:#59667d;
}

/* RIFERIMENTO HOME — Punto 5: azioni appuntamento più pulite e allineate.
   Migliora badge di stato,pulsante Note e menu azioni senza toccare la struttura. */
.home-appointment{
  grid-template-columns:65px 54px minmax(0,1fr) max-content 34px 72px;
  align-items:center;
}
.home-status{
  justify-self:end;
  align-self:center;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  padding:5px 10px;
  border-radius:999px;
  font-size:11px;
  font-weight:600;
  line-height:1.15;
  letter-spacing:.01em;
  border:1px solid transparent;
  box-shadow:inset 0 1px 0 #ffffff4a;
}
.home-status.scheduled{
  color:#60718a;
  background:#f2f6fb;
  border-color:#d8e2ee;
}
.home-status.done{
  color:#1f6b4c;
  background:#eaf7ef;
  border-color:#c9e7d4;
}
.home-status.progress{
  color:#235faf;
  background:#eaf1ff;
  border-color:#d3e0ff;
}
.home-status.pending{
  color:#8b6117;
  background:#fff5e4;
  border-color:#f2dfb6;
}
.home-status.cancel{
  color:#a44555;
  background:#f9ebef;
  border-color:#ebcbd4;
}
.row-icon{
  width:34px;
  min-height:34px;
  align-self:center;
  border-radius:10px;
  border-color:#e4eaf1;
  background:#fbfcfe;
  color:#5c6a7e;
  box-shadow:0 1px 2px rgba(31,53,88,.04);
}
.row-icon:hover{
  background:#f3f7fb;
  border-color:#d8e0ea;
}
.row-note-button{
  min-width:72px;
  min-height:34px;
  padding:5px 10px;
  gap:6px;
  font-size:11.5px;
  font-weight:600;
  color:#637289;
  background:#fbfcfe;
  border-color:#e4eaf1;
  box-shadow:0 1px 2px rgba(31,53,88,.04);
}
.row-note-button svg{width:14px;height:14px}
.row-note-button.has-note{
  color:#7357be;
  background:#f4efff;
  border-color:#ddd1ff;
}
.row-note-button:hover{
  background:#f4f7fb;
  border-color:#d8e0ea;
}
.row-note-button.has-note:hover{
  background:#efe8ff;
  border-color:#d3c4ff;
}

@media(min-width:1251px){
  body.home-view .home-appointment{grid-template-columns:60px 49px minmax(0,1fr) max-content 32px 68px}
  body.home-view .home-status{font-size:10.5px;padding:5px 9px;min-height:26px}
  body.home-view .row-icon{width:32px;min-height:32px}
  body.home-view .row-note-button{min-width:68px;min-height:32px;padding:5px 9px;font-size:11px}
}
@media(max-width:1250px) and (min-width:1051px){
  .home-appointment{grid-template-columns:49px 38px minmax(0,1fr) max-content 31px 66px}
  .home-status{font-size:10.5px;padding:5px 8px}
  .row-note-button{min-width:64px;font-size:11px;padding:5px 8px}
}
@media(max-width:1050px) and (min-width:701px){
  .home-appointment{grid-template-columns:65px 54px minmax(0,1fr) max-content 34px 72px}
}
@media(max-width:700px){
  .home-status{padding:4px 8px;font-size:10.5px;min-height:24px}
  .row-icon{width:32px;min-height:32px}
  .row-note-button{width:32px;min-width:32px;padding:5px}
}

/* FIX Punto 5 — note con accento rosso + nessun badge vuoto. */
.home-status[aria-hidden="true"],.home-status:empty{
  display:none !important;
}
.row-note-button.has-note{
  color:#c84c5d;
  background:#fff1f3;
  border-color:#f1c8cf;
}
.row-note-button.has-note:hover{
  color:#b83f50;
  background:#ffe8ec;
  border-color:#eeb7c1;
}


/* FIX Agenda — stato con colonna fissa + orari leggermente più distanziati. */
.home-appointment{grid-template-columns:65px 54px minmax(0,1fr) 116px 34px 72px}
.home-status{justify-self:start; min-width:104px}
.home-status[aria-hidden="true"],.home-status:empty{visibility:hidden !important; opacity:0; pointer-events:none; display:inline-flex !important}
.home-time{gap:6px}
@media(min-width:1251px){
  body.home-view .home-appointment{grid-template-columns:60px 49px minmax(0,1fr) 108px 32px 68px}
  body.home-view .home-status{min-width:98px}
}
@media(max-width:1250px) and (min-width:1051px){
  .home-appointment{grid-template-columns:49px 38px minmax(0,1fr) 104px 31px 66px}
  .home-status{min-width:96px}
}
@media(max-width:1050px) and (min-width:701px){
  .home-appointment{grid-template-columns:65px 54px minmax(0,1fr) 116px 34px 72px}
  .home-status{min-width:104px}
}
@media(max-width:700px){
  .home-time{gap:5px}
}


/* RIFERIMENTO HOME — Punto 6: card Prossimo appuntamento più compatta e gerarchica. */
.next-home{
  background:var(--surface);
  border:1px solid #e4e9ef;
  box-shadow:var(--shadow);
  padding:15px 16px 14px;
}
.next-home .home-section-head{
  margin-bottom:11px;
  align-items:center;
}
.next-home .home-section-head h2{
  font-size:16px;
  font-weight:700;
  letter-spacing:-.25px;
}
.next-home .home-section-head>span{
  display:inline-flex;
  align-items:center;
  min-height:26px;
  padding:4px 9px;
  border:1px solid #cfe5f5;
  border-radius:6px;
  background:#edf8ff;
  color:#2370a3;
  font-size:10.5px;
  font-weight:650;
  line-height:1;
  white-space:nowrap;
}
.next-inner{
  padding:13px;
  border:1px solid #e9edf2;
  border-radius:12px;
  background:#f9fbfd;
}
.next-person{
  display:flex;
  align-items:center;
  gap:12px;
}
.next-home .home-avatar.large{
  width:43px;
  height:43px;
  font-size:16px;
}
.next-person>div{min-width:0;flex:1}
.next-person .person-name{
  font-size:14.5px;
  font-weight:700;
  line-height:1.2;
}
.next-person p{
  margin:3px 0 7px;
  color:#6f7d92;
  font-size:11.5px;
  line-height:1.3;
}
.next-meta{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:5px 9px;
  color:#53637a;
  font-size:10.8px;
  line-height:1.3;
}
.next-meta span{
  display:inline-flex;
  align-items:center;
  gap:4px;
}
.next-meta svg{width:13px;height:13px}
.next-note{
  margin-top:8px;
  color:#c84c5d;
  font-size:11px;
}
.next-note span{font-size:11px}
.next-actions{
  gap:8px;
  margin-top:10px;
}
.next-home .next-actions .btn.primary{
  min-height:36px;
  border-radius:9px;
  padding:7px 10px;
  font-size:11.5px;
  font-weight:600;
  box-shadow:none;
}
.next-home .next-actions .row-icon{
  width:38px;
  min-height:36px;
  border-color:#dfe6ee;
  background:#f7f9fc;
  color:#607087;
}
.next-home .next-actions .row-icon:hover{
  background:#eef3f8;
  border-color:#d4dde8;
}

@media(min-width:1251px){
  body.home-view .next-home{padding:13px 15px 12px}
  body.home-view .next-inner{padding:12px}
  body.home-view .next-person{gap:11px}
  body.home-view .next-person .person-name{font-size:14px}
  body.home-view .next-person p{font-size:11px;margin:2px 0 6px}
  body.home-view .next-meta{font-size:10.5px}
  body.home-view .next-actions{margin-top:9px}
  body.home-view .next-actions .primary{min-height:35px;font-size:11px}
  body.home-view .next-actions .row-icon{width:37px;min-height:35px}
}

/* FIX Punto 6 — orari del prossimo appuntamento più leggibili e note lunghe contenute. */
.next-person>div{
  min-width:0;
  max-width:100%;
  overflow:hidden;
}
.next-meta{
  min-width:0;
  width:100%;
}
.next-meta span:first-child{
  color:var(--ink);
  font-size:12.5px;
  font-weight:700;
  font-variant-numeric:tabular-nums;
  letter-spacing:-.01em;
}
.next-note{
  display:flex;
  align-items:center;
  gap:7px;
  width:100%;
  max-width:100%;
  min-width:0;
  overflow:hidden;
  padding:0;
  border:0;
  background:transparent;
  text-align:left;
  cursor:pointer;
}
.next-note svg{flex:0 0 auto}
.next-note span{
  display:block;
  min-width:0;
  flex:1 1 auto;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.next-inner,.next-person,.next-actions{min-width:0;max-width:100%}

@media(min-width:1251px){
  body.home-view .next-meta span:first-child{font-size:12px}
}


/* FIX Punto 6 — anteprima nota del prossimo appuntamento più corta e mai espansiva. */
.next-inner{overflow:hidden}
.next-note{max-width:100%;overflow:hidden}
.next-note span{width:0;max-width:240px;flex:1 1 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(min-width:1251px){body.home-view .next-note span{max-width:220px}}

/* RIFERIMENTO HOME — Punto 7: Azioni rapide più compatte e coerenti. */
.quick-card{
  padding:17px 18px 18px;
}
.quick-card h2{
  margin:0;
  font-size:17px;
  line-height:1.2;
  letter-spacing:-.3px;
}
.quick-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
  margin-top:14px;
}
.quick-grid button{
  min-width:0;
  min-height:46px;
  padding:10px 13px;
  gap:10px;
  border:1px solid color-mix(in srgb,var(--brand) 8%,#e8eaf0);
  border-radius:11px;
  background:color-mix(in srgb,var(--brand) 4%,#fff);
  color:#667187;
  font-size:12px;
  font-weight:550;
  line-height:1.2;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  transition:background .15s ease,border-color .15s ease,transform .15s ease;
}
.quick-grid button svg{
  width:18px;
  height:18px;
  flex:0 0 18px;
  color:var(--brand);
}
.quick-grid button:hover{
  background:color-mix(in srgb,var(--brand) 8%,#fff);
  border-color:color-mix(in srgb,var(--brand) 18%,#dfe4ec);
  transform:translateY(-1px);
}
@media(min-width:1251px){
  body.home-view .quick-card{padding:15px 16px 16px}
  body.home-view .quick-card h2{font-size:16px}
  body.home-view .quick-grid{gap:8px;margin-top:12px}
  body.home-view .quick-grid button{min-height:42px;padding:9px 11px;gap:9px;font-size:11px}
  body.home-view .quick-grid button svg{width:17px;height:17px;flex-basis:17px}
}

/* HOME — respiro colonna destra e allineamento inferiore con l'agenda. */
@media(min-width:1051px){
  body.home-view .home-side{
    align-self:stretch;
    display:flex;
    flex-direction:column;
    gap:20px;
  }
  body.home-view .home-side .weekly-card{
    flex:1 1 auto;
    display:flex;
    flex-direction:column;
    min-height:0;
  }
  body.home-view .home-side .weekly-chart{
    flex:1 1 auto;
    min-height:150px;
  }
}

/* PUNTO 8 — solo Andamento settimanale: grafico più leggibile e proporzionato. */
body.home-view .weekly-card{
  padding:18px 20px 16px;
  overflow:visible;
}
body.home-view .weekly-card .home-section-head{
  align-items:center;
  min-height:32px;
}
body.home-view .weekly-card .home-section-head h2{
  font-size:17px;
  line-height:1.2;
}
body.home-view .weekly-card .textbtn{
  font-size:11.5px;
  gap:7px;
  align-items:center;
}
body.home-view .weekly-chart{
  gap:10px;
  margin-top:22px;
  padding-top:32px;
  min-height:190px;
}
body.home-view .bar-space{
  width:72%;
  margin:0 auto;
  border-bottom-color:#dfe5ec;
}
body.home-view .chart-bar{
  border-radius:6px 6px 2px 2px;
  min-height:3px;
  background:#d7dce4;
}
body.home-view .chart-column.selected .chart-bar{
  background:linear-gradient(180deg,color-mix(in srgb,var(--brand) 82%,#ffffff),var(--brand));
  box-shadow:0 3px 8px color-mix(in srgb,var(--brand) 18%,transparent);
}
body.home-view .chart-day{
  margin-top:7px;
  padding:4px 7px;
  border-radius:999px;
  font-size:11.5px;
  line-height:1;
  font-weight:500;
  color:#626d7d;
}
body.home-view .chart-column.selected .chart-day{
  color:var(--brand);
  background:color-mix(in srgb,var(--brand) 9%,#ffffff);
  font-weight:700;
}
body.home-view .chart-tip{
  bottom:calc(100% + 10px);
  min-width:105px;
  padding:8px 10px;
  border-radius:8px;
  box-shadow:0 8px 22px rgba(26,34,49,.14);
}
body.home-view .chart-tip b{font-size:12px;font-weight:700}
body.home-view .chart-tip small{font-size:10.5px;margin-top:3px}
body.home-view .chart-caption{
  margin-top:16px;
  padding-top:11px;
  border-top:1px solid color-mix(in srgb,var(--line) 75%,transparent);
  font-size:10.5px;
  line-height:1.35;
}
@media(min-width:1251px){
  body.home-view .weekly-card{padding:17px 18px 15px}
  body.home-view .weekly-card h2{font-size:16px}
  body.home-view .weekly-chart{margin-top:20px;padding-top:30px;min-height:185px;height:auto}
}
@media(max-width:1050px){
  body.home-view .weekly-chart{min-height:210px}
}
@media(max-width:700px){
  body.home-view .weekly-card{padding:16px}
  body.home-view .weekly-chart{min-height:170px;padding-top:27px}
  body.home-view .bar-space{width:78%}
}

/* HOME — Punto 9: rifinitura KPI superiori. Solo proporzioni,gerarchia e allineamenti. */
@media(min-width:1251px){
  body.home-view .home-metrics{gap:15px;margin-bottom:19px}
  body.home-view .home-metric{
    min-height:112px;
    padding:15px 16px;
    gap:14px;
    align-items:center;
    border-radius:15px;
  }
  body.home-view .metric-icon{
    width:46px;
    height:46px;
  }
  body.home-view .metric-icon svg{width:24px;height:24px}
  body.home-view .metric-body{padding-top:0;align-self:center}
  body.home-view .metric-title{
    min-height:18px;
    font-size:11.5px;
    line-height:1.25;
    font-weight:600;
    letter-spacing:0;
  }
  body.home-view .metric-body strong{
    font-size:27px;
    line-height:1.1;
    font-weight:700;
    margin:5px 0 6px;
    letter-spacing:-.75px;
  }
  body.home-view .metric-comparison{gap:6px;min-height:16px}
  body.home-view .metric-baseline,
  body.home-view .metric-change{font-size:10.5px;line-height:1.25}
  body.home-view .metric-occupancy .occupancy-value-row{
    min-height:30px;
    gap:9px;
    margin:4px 0 5px;
  }
  body.home-view .metric-occupancy .occupancy-value-row>strong{font-size:27px}
  body.home-view .occupancy-status{
    font-size:9.8px;
    line-height:1.2;
    padding:3px 7px;
    border-radius:6px;
  }
}

/* HOME — Punto 10: rifinitura header superiore. Solo topbar,intro e CTA della Home. */
@media(min-width:1251px){
  body.home-view .app-header{
    height:56px;
    padding:8px 32px 8px 30px;
    gap:20px;
    align-items:center;
  }
  body.home-view .global-search-wrap{
    width:min(31vw,390px);
    max-width:390px;
  }
  body.home-view .global-search-wrap input{
    height:35px;
    padding-left:40px;
    border-radius:11px;
    font-size:11.5px;
    box-shadow:0 1px 2px rgba(30,45,68,.025);
  }
  body.home-view .global-search-wrap .search-symbol{
    margin-left:13px;
    width:17px;
    height:17px;
  }
  body.home-view .global-search-wrap .search-symbol svg{width:17px;height:17px}
  body.home-view .header-tools{gap:8px;margin-left:auto}
  body.home-view .header-tools .iconbutton{
    width:34px;
    height:34px;
    border:1px solid var(--line);
    border-radius:9px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
  }
  body.home-view .header-tools .iconbutton:hover{background:#f5f2ff}
  body.home-view #privacy[aria-pressed="true"]{background:#f5f2ff;color:#714af4}

  body.home-view .home-intro{
    align-items:center;
    gap:24px;
    margin-bottom:17px;
    padding:0 1px;
  }
  body.home-view .home-date{
    margin-bottom:3px;
    font-size:10px;
    font-weight:650;
    letter-spacing:.72px;
  }
  body.home-view .home-intro h1{
    margin:4px 0 3px;
    font-size:33px;
    line-height:1.08;
    letter-spacing:-1px;
  }
  body.home-view .home-intro p{
    font-size:14px;
    line-height:1.4;
  }
  body.home-view .home-intro-actions{gap:9px}
  body.home-view .new-appointment-split{
    border-radius:10px;
    box-shadow:0 4px 12px color-mix(in srgb,var(--brand) 13%,transparent);
  }
  body.home-view .new-appointment-split .btn,
  body.home-view .home-gift-shortcut{
    min-height:41px;
    font-size:12px;
    font-weight:650;
  }
  body.home-view .new-appointment-split .btn{
    gap:9px;
    padding:9px 14px;
  }
  body.home-view .new-appointment-split .btn svg,
  body.home-view .home-gift-shortcut svg{width:17px;height:17px}
  body.home-view .home-gift-shortcut{
    gap:8px;
    padding:9px 13px;
    border-radius:10px;
    box-shadow:0 2px 7px rgba(31,53,88,.035);
  }
}

/* HOME — Punto 11: rifinitura esclusiva della sidebar desktop.
   Nessuna modifica a navigazione,contenuti o comportamento. */
@media(min-width:701px){
  body.home-view aside{
    border-right:1px solid rgba(255,255,255,.055);
  }
  body.home-view .brand-lockup{
    padding:1px 12px 0;
  }
  body.home-view .brand-lockup .logo{
    align-items:center;
  }
  body.home-view .brand-bee{
    opacity:.92;
  }
  body.home-view .brand-tagline{
    color:rgba(233,239,248,.68);
  }
  body.home-view #nav{
    margin-top:31px;
    gap:5px;
  }
  body.home-view #nav button{
    position:relative;
    min-height:46px;
    padding:12px 14px;
    gap:15px;
    border-radius:11px;
    color:rgba(225,232,243,.72);
    font-size:13.5px;
    font-weight:500;
    line-height:1.2;
    transition:background-color .16s ease,color .16s ease,transform .16s ease;
  }
  body.home-view #nav button svg{
    width:20px;
    height:20px;
    flex:0 0 20px;
    opacity:.88;
  }
  body.home-view #nav button:hover{
    background:rgba(255,255,255,.075);
    color:#fff;
  }
  body.home-view #nav button.active{
    background:rgba(255,255,255,.115);
    color:#fff;
    font-weight:650;
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.035);
  }
  body.home-view #nav button.active::before{
    content:"";
    position:absolute;
    left:0;
    top:11px;
    bottom:11px;
    width:3px;
    border-radius:0 4px 4px 0;
    background:rgba(255,255,255,.92);
  }
  body.home-view #nav button.active svg{opacity:1}

  body.home-view .pro-card{
    margin-top:auto;
    border-color:rgba(255,255,255,.11);
    background:rgba(255,255,255,.035);
    box-shadow:none;
  }
  body.home-view .pro-card:hover{
    background:rgba(255,255,255,.065);
    border-color:rgba(255,255,255,.16);
  }
  body.home-view .pro-crown{opacity:.9}

  body.home-view .sidefoot{
    margin-top:14px;
    padding-top:14px;
    border-top:1px solid rgba(255,255,255,.09);
  }
  body.home-view .business-button{
    padding:7px 6px;
    border-radius:11px;
  }
  body.home-view .business-button:hover{background:rgba(255,255,255,.055)}
  body.home-view .business-button .home-avatar{
    width:36px;
    height:36px;
    font-size:13px;
    background:rgba(255,255,255,.12);
  }
  body.home-view .business-button>span:nth-child(2){
    font-weight:600;
    line-height:1.25;
  }
  body.home-view .business-button small{
    margin-top:3px;
    color:rgba(221,229,240,.58);
    font-weight:400;
  }
  body.home-view .business-button>svg{
    width:15px;
    height:15px;
    opacity:.55;
  }
}


/* HOME — rifinitura finale: nota agenda più neutra e corta. */
.home-person .home-note-preview{
  color:#66758a;
  width:max-content;
  max-width:min(78%,360px);
}
@media(max-width:1250px) and (min-width:1051px){
  .home-person .home-note-preview{max-width:min(72%,280px)}
}
@media(max-width:700px){
  .home-person .home-note-preview{width:auto;max-width:88%}
}

/* HOME — Punto 13: anteprima note in celeste chiaro,distinta dai metadati senza risultare invadente. */
.home-person .home-note-preview{
  color:#4f9ed8;
}


/* SIDEBAR GLOBALE — stessa sidebar approvata della Home in tutte le sezioni.
   Modifica solo sidebar e offset workspace; nessun layout delle pagine interne. */
@media(min-width:1251px){
  body aside{
    width:272px;
    padding:24px 16px 22px;
  }
  body .workspace{margin-left:272px}
  body .brand-lockup{padding:0 10px}
  body .brand-lockup .logo{
    gap:10px;
    font-size:34px;
    letter-spacing:-1.6px;
    align-items:center;
  }
  body .brand-bee{width:52px;height:35px;opacity:.92}
  body .brand-tagline{
    max-width:170px;
    margin-top:3px;
    font-size:12.5px;
    line-height:1.4;
    color:rgba(233,239,248,.68);
  }
  body #nav{
    margin-top:31px;
    gap:5px;
  }
  body #nav button{
    position:relative;
    min-height:46px;
    padding:12px 14px;
    gap:15px;
    border-radius:11px;
    color:rgba(225,232,243,.72);
    font-size:13.5px;
    font-weight:500;
    line-height:1.2;
    transition:background-color .16s ease,color .16s ease,transform .16s ease;
  }
  body #nav button svg{
    width:20px;
    height:20px;
    flex:0 0 20px;
    opacity:.88;
  }
  body #nav button:hover{
    background:rgba(255,255,255,.075);
    color:#fff;
  }
  body #nav button.active{
    background:rgba(255,255,255,.115);
    color:#fff;
    font-weight:650;
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.035);
  }
  body #nav button.active::before{
    content:"";
    position:absolute;
    left:0;
    top:11px;
    bottom:11px;
    width:3px;
    border-radius:0 4px 4px 0;
    background:rgba(255,255,255,.92);
  }
  body #nav button.active svg{opacity:1}
  body .pro-card{
    margin-top:auto;
    gap:12px;
    padding:16px 15px;
    min-height:86px;
    border-radius:14px;
    border-color:rgba(255,255,255,.11);
    background:rgba(255,255,255,.035);
    box-shadow:none;
  }
  body .pro-card:hover{
    background:rgba(255,255,255,.065);
    border-color:rgba(255,255,255,.16);
  }
  body .pro-crown{opacity:.9}
  body .sidefoot{
    margin-top:14px;
    padding-top:14px;
    border-top:1px solid rgba(255,255,255,.09);
  }
  body .business-button{
    gap:11px;
    padding:7px 6px;
    border-radius:11px;
  }
  body .business-button:hover{background:rgba(255,255,255,.055)}
  body .business-button .home-avatar{
    width:36px;
    height:36px;
    font-size:13px;
    background:rgba(255,255,255,.12);
  }
  body .business-button>span:nth-child(2){
    font-size:12.5px;
    font-weight:600;
    line-height:1.25;
  }
  body .business-button small{
    font-size:11.5px;
  }
}
@media(min-width:701px){
  body aside{border-right:1px solid rgba(255,255,255,.055)}
}

/* Global desktop sidebar width — approved compact proportion. */
@media(min-width:1251px){
  body aside{width:258px}
  body .workspace{margin-left:258px}
  body.home-view aside{width:258px}
  body.home-view .workspace{margin-left:258px}
}


/* Home — center empty next-appointment message after removing duplicate CTA. */
body.home-view .next-home .next-inner .next-empty{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:112px;
  margin:0;
  text-align:center;
}


/* Home — quick action icons use the secondary lilac accent. */
body.home-view .quick-grid button svg{
  color:#8064c2;
  stroke:currentColor;
}

/* Logo name: only the typeface changes; size,colour and spacing stay as set above. */
aside .brand-lockup .brand-name{font-family:"Cormorant Garamond",Georgia,serif;font-weight:600}
