body[data-app] .shell{display:block}
body[data-app] .shell>aside{display:none}
body[data-app] .workspace>header{padding:0 1.5rem;height:72px;background:#fcfdfb;gap:1rem}
.app-brand{display:flex;align-items:center;gap:.7rem;min-width:0;margin-right:auto;color:var(--green)}
.app-brand img{width:36px;height:36px}
.app-brand span{display:grid;line-height:1.2;font-size:1.15rem;font-weight:750}
.app-brand small{font-size:.65rem;font-weight:500;letter-spacing:.08em}
#breadcrumb{display:none}
body[data-app] #menu{display:block;font-size:.85rem;padding:.6rem .8rem;border:1px solid var(--border);border-radius:10px;text-align:center}
.account-button{background:transparent;font-size:.85rem;max-width:32%;cursor:pointer}
.app-switcher{display:grid;grid-template-columns:1fr 1fr;gap:.75rem}
.app-switcher a{display:flex;align-items:center;gap:.8rem;border:1px solid var(--border);border-radius:12px;padding:1rem}
.app-switcher img{width:36px;height:36px}
.app-switcher-item{position:relative;min-width:0}
.app-switcher-item>a{height:100%;width:100%}
.app-switcher-info{display:none;position:absolute;right:0;bottom:0;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--muted);font:600 13px/1 Georgia,serif}
.app-switcher-info::before{content:"";position:absolute;inset:13px;border:1px solid currentColor;border-radius:50%;opacity:.6}
.app-switcher-info:hover,.app-switcher-info[aria-expanded=true]{background:rgb(65 105 225 / .1);color:#4169e1}
.app-help-tooltip{display:none;position:fixed;inset:auto;margin:0;width:280px;max-width:calc(100vw - 24px);padding:14px 16px;border:1px solid rgb(255 255 255 / .18);border-radius:14px;background:rgb(24 36 59 / .88);color:#fff;backdrop-filter:blur(18px) saturate(140%);-webkit-backdrop-filter:blur(18px) saturate(140%);box-shadow:0 14px 40px rgb(13 24 43 / .24);overflow:visible;z-index:100;animation:app-tip-in .16s ease-out}
.app-help-tooltip:is(:popover-open,.is-visible){display:block}
.app-help-tooltip>strong{display:block;font-size:14px;line-height:1.3;letter-spacing:-.01em;color:#fff}
.app-help-tooltip>p{margin:6px 0 0;color:rgb(255 255 255 / .86);font-size:13px;font-weight:400;line-height:1.55}
.app-help-tooltip::before{content:"";position:absolute;top:-5px;left:var(--app-tip-arrow,50%);width:8px;height:8px;background:rgb(24 36 59 / .88);border-top:1px solid rgb(255 255 255 / .18);border-left:1px solid rgb(255 255 255 / .18);transform:translateX(-50%) rotate(45deg)}
.app-help-tooltip[data-placement=top]::before{top:auto;bottom:-5px;border:0;border-right:1px solid rgb(255 255 255 / .18);border-bottom:1px solid rgb(255 255 255 / .18)}
@keyframes app-tip-in{from{opacity:0;translate:0 3px}to{opacity:1;translate:0 0}}
@media(hover:none),(pointer:coarse){.app-switcher-info{display:grid;top:2px;right:2px;bottom:auto}body[data-app] #dialog.app-switcher-dialog .app-switcher-item>a{flex-direction:column;align-items:flex-start;gap:8px;min-height:92px;padding:12px}body[data-app] #dialog.app-switcher-dialog .app-switcher-item>a>strong{line-height:1.25}}
@media(prefers-reduced-motion:reduce){.app-help-tooltip{animation:none}}
.app-switcher-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:22px}
.app-switcher-heading h2{margin:0 0 6px}
.app-switcher-heading p{margin:0;color:var(--muted);font-size:14px}
.app-switcher-close{display:grid;place-items:center;width:44px;height:44px;flex:none;padding:0;border:0;background:transparent;font-size:28px;line-height:1}
.app-switcher a[aria-current=true],.app-switcher a[aria-current=page]{background:#edf2e8}
@media(max-width:760px){body[data-app] .workspace>header{height:64px;padding:0 .75rem;gap:.55rem}.app-brand img{width:30px;height:30px}.app-brand span{font-size:1rem}.account-button{max-width:26%;padding:.5rem}.app-switcher{grid-template-columns:1fr}body[data-app] #menu{padding:.55rem}}

.catalog-icon{width:36px;height:36px;vertical-align:middle;margin-right:.65rem}.home-catalog h3{display:flex;align-items:center}

body.embedded-app .workspace>header{display:none}body.embedded-app main{padding:20px;max-width:none}body.embedded-app .page-title{margin-top:0}body.embedded-app .notification-brand{display:none}

body.embedded-app{--green:#176fee;--border:#e0e9f5;background:#f7faff;color:#162d50}body.embedded-app main{padding:24px}body.embedded-app .panel{background:white;border-radius:14px}.notification-brand{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;height:auto;padding:0;margin:0 0 24px}.notification-brand h1{font-size:24px}@media(max-width:760px){body.embedded-app main{padding:14px}}
.calendar-legend{display:flex;gap:16px;flex-wrap:wrap;font-size:12px;color:#748094;margin:0 0 15px}.calendar-legend span{display:flex;gap:6px;align-items:center}.calendar-legend i{width:8px;height:8px;border-radius:50%;background:#8d9ba8}.space-more{position:relative}.space-more summary{cursor:pointer;padding:8px;list-style:none}.space-more[open] a,.space-more[open] button{display:block;padding:12px;font-size:13px;background:white;border:1px solid #e5e9ef}.calendar-legend .legend-calendar i{background:#5c8dcc}.calendar-legend .legend-tasks i{background:#9175bb}.calendar-legend .legend-planubia i{background:#6b9f81}.calendar-legend .legend-matchvity i{background:#c59165}.calendar-legend .legend-grow i{background:#9da95d}

/* Responsive app surfaces: keep intrinsic content inside the viewport. */
@media(min-width:761px){
 body[data-app] main{padding:clamp(20px,2.5vw,40px) clamp(20px,3vw,48px)}
 .page-title,.section-title{flex-wrap:wrap}
 .page-title>*,.toolbar>*,.split>*,.app-switcher>*{min-width:0;max-width:100%}
 .page-title h1,.panel h2,.search-result h2{overflow-wrap:anywhere}
 .tasks-filters{max-height:calc(100dvh - 32px);overflow-y:auto}
}
@media(min-width:761px) and (max-width:1100px){.split{grid-template-columns:minmax(0,1fr)}}
body[data-app] main, .split>*, .app-switcher>a, .calendar-grid>*{min-width:0}
.app-switcher a{overflow-wrap:anywhere;min-width:0}.app-switcher img{flex-shrink:0}
body[data-app] dialog{max-width:calc(100vw - 24px);max-height:90dvh;overflow:auto}
body[data-app] dialog form,body[data-app] dialog label{min-width:0}
body[data-app] input,body[data-app] select,body[data-app] textarea{min-width:0;max-width:100%}
body[data-app] #menu svg{display:block}body[data-app] #menu{min-width:44px;min-height:44px;flex-shrink:0}
body[data-app] .account-button{min-width:0}.app-brand img{flex-shrink:0}
.insights-metrics>*{min-width:0;overflow-wrap:anywhere}
@media(max-width:760px){body[data-app] main{padding-left:max(1rem,env(safe-area-inset-left));padding-right:max(1rem,env(safe-area-inset-right));padding-bottom:max(1.5rem,env(safe-area-inset-bottom))}body[data-app] dialog{padding:1.25rem}.app-switcher{grid-template-columns:minmax(0,1fr)}.section-title{flex-wrap:wrap}.toolbar>*{max-width:100%}.search-result h2{overflow-wrap:anywhere}.insights-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.split{grid-template-columns:minmax(0,1fr)}}
@media(max-width:360px){.insights-metrics{grid-template-columns:minmax(0,1fr)}.app-brand small{display:none}}

.calendar-legend .legend-family i,.calendar-event.family{background:#5940a0}.calendar-event.family{color:white}

body.embedded-app #sidebar{display:none}body.embedded-app .workspace{margin-left:0;width:100%}body.embedded-app main{margin-left:0}

/* Keep each app's own left menu available when Home chrome is collapsed. */
body.embedded-app .workspace>header{display:flex;height:auto;min-height:56px;padding:10px 16px;gap:12px}body.embedded-app .workspace>header #menu{display:grid;place-items:center;order:-1;min-width:44px;min-height:44px}body.embedded-app .notification-brand{display:flex;flex-wrap:nowrap;justify-content:flex-start}body.embedded-app .notification-brand>a{display:none}body.embedded-app .notification-brand h1{font-size:20px}
