/* Insights follows Documents' current compact pearl and coral layout. */
body[data-app=insights]{--green:#b34c3a;--muted:#68717d;--border:#e9e5e2;--insights-ink:#27313f;--insights-soft:#fbeeea;--insights-coral:#d96c58;background:#fbfaf9;color:var(--insights-ink)}
body[data-app=insights] .shell{display:grid;grid-template-columns:88px minmax(0,1fr);min-width:0;min-height:100dvh}
body[data-app=insights] #sidebar{position:sticky;inset:0 auto auto 0;display:flex;flex-direction:column;width:88px;height:100dvh;padding:14px 7px max(12px,env(safe-area-inset-bottom));background:#f8f7f5;border-right:1px solid var(--border);color:var(--insights-ink);visibility:visible;transform:none;box-shadow:none;z-index:30;overflow-y:auto}
body[data-app=insights] .insights-side-brand{display:flex;justify-content:center;align-items:center;min-height:58px;margin-bottom:12px;flex:none}
.insights-side-brand img{width:36px;height:36px}.insights-side-brand>span{display:none}
body[data-app=insights] .insights-local-nav{display:grid;gap:6px;margin:0;flex:1;align-content:start}
body[data-app=insights] .insights-local-nav a,body[data-app=insights] .sidebar-bottom>a,body[data-app=insights] #insights-app-switcher{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:6px;min-height:68px;width:100%;padding:7px 3px;border:0;border-radius:12px;background:transparent;color:var(--insights-ink);font-size:.75rem;font-weight:500;line-height:1.3;text-align:center;overflow-wrap:anywhere}
body[data-app=insights] .insights-local-nav svg,body[data-app=insights] .sidebar-bottom svg{width:23px;height:23px;flex:none}
body[data-app=insights] .insights-local-nav a span{font-size:.75rem}
body[data-app=insights] .insights-local-nav a:hover,body[data-app=insights] .sidebar-bottom>a:hover,body[data-app=insights] #insights-app-switcher:hover{background:#f1eeeb;filter:none}
body[data-app=insights] .insights-local-nav a[aria-current=page],body[data-app=insights] #insights-app-switcher[aria-expanded=true]{color:var(--green);background:var(--insights-soft)}
body[data-app=insights] .sidebar-bottom{display:grid;gap:3px;flex:none;margin-top:12px;padding:10px 0 0;border-top:1px solid var(--border)}
body[data-app=insights] .sidebar-bottom>a,body[data-app=insights] #insights-app-switcher{min-height:62px}
body[data-app=insights] #session-button,body[data-app=insights] #menu,.insights-side-close,.insights-mobile-brand{display:none}
body[data-app=insights] .workspace{min-width:0}
body[data-app=insights] .workspace>.insights-topbar{height:62px;min-height:62px;padding:0 24px;background:#fff;gap:16px;justify-content:flex-start;border-bottom:1px solid var(--border)}
body[data-app=insights] #breadcrumb{display:block;min-width:0;padding:0;border:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:.875rem}
.insights-topbar-actions{display:flex;align-items:center;gap:12px;margin-left:auto;flex:none;min-width:0}
body[data-app=insights] #notice-bell{display:grid;place-items:center;position:relative;width:44px;height:44px;min-width:44px;padding:0;border:1px solid transparent;border-radius:12px;background:transparent;color:#58677e}
body[data-app=insights] #notice-bell>svg{width:22px;height:22px}
.insights-notice-badge{position:absolute;top:0;right:0;min-width:18px;padding:2px 4px;border-radius:8px;background:var(--green);color:white;font-size:.75rem;line-height:1.1}
body[data-app=insights] .account-button{display:flex;align-items:center;gap:10px;max-width:240px;min-height:44px;border:0;margin:0;padding:4px 8px;border-radius:12px;background:transparent;color:var(--insights-ink)}
.insights-user-avatar{display:grid;place-items:center;width:36px;height:36px;flex:none;border-radius:50%;background:#edf0f3;color:#536071;font-size:.875rem;font-weight:600}
.insights-user-name{min-width:0;max-width:155px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;font-weight:500}
body[data-app=insights] #notice-bell:hover,body[data-app=insights] .account-button:hover{background:#f8f5f2;filter:none}
body[data-app=insights] #main{padding:22px 24px;max-width:1860px;min-width:0}
body[data-app=insights] .page-title{margin-bottom:24px;gap:20px}.insights-heading h1{font-size:clamp(1.5rem,2.1vw,2rem);line-height:1.3;letter-spacing:-.035em;margin:0;color:var(--insights-ink)}
.insights-heading .eyebrow{color:var(--muted);font-size:.75rem;font-weight:500;letter-spacing:.09em;margin-bottom:10px}.insights-heading .muted{margin:8px 0 0;font-size:1rem}
.insights-period-label{display:flex;align-items:center;gap:10px;margin:0;font-size:.875rem;color:var(--muted)}
body[data-app=insights] #insights-period{margin:0;width:auto;padding:10px 12px;min-height:44px;color:var(--insights-ink);border:1px solid var(--border);border-radius:9px;background:#fff;font-size:1rem}
body[data-app=insights] #refresh-insights{display:flex;align-items:center;gap:7px;min-height:44px;padding:10px 14px;border-radius:9px;font-size:.875rem;background:var(--green);color:#fff;border-color:transparent}
#refresh-insights svg{width:18px;height:18px;flex:none}
body[data-app=insights] .insights-metrics{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:24px}
body[data-app=insights] .panel{border-color:var(--border);box-shadow:0 4px 18px #49382805;border-radius:16px;padding:22px;overflow-wrap:anywhere}
body[data-app=insights] .metric{padding:18px}.insights-metric-label{display:flex;align-items:center;gap:8px;font-size:.875rem;color:var(--muted)}
.insights-metric-icon{width:18px;height:18px;flex:none;color:var(--green)}
body[data-app=insights] .metric>strong{font:700 1.875rem/1.35 Manrope,system-ui,sans-serif;margin:10px 0 5px;letter-spacing:-.5px;font-variant-numeric:tabular-nums}
body[data-app=insights] .metric p{font-size:.875rem;line-height:1.5;margin:0 0 12px}body[data-app=insights] .metric a{font-size:.875rem;font-weight:500;color:var(--green)}
body[data-app=insights] .insights-sections{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(260px,1fr);gap:24px;align-items:start}
.insights-tasks-section{grid-row:span 3;scroll-margin-top:20px}.insights-sections>section{scroll-margin-top:20px}
body[data-app=insights] .panel h2{font-size:1.125rem;line-height:1.4;margin-top:0;color:var(--insights-ink)}body[data-app=insights] .panel h3{font-size:1rem;margin-top:24px}
body[data-app=insights] .chart-columns{gap:6px;min-width:max(100%,320px)}body[data-app=insights] .insights-chart{overflow-x:auto;padding:0 0 8px;margin:20px 0}
body[data-app=insights] .chart-column{min-width:14px;font-size:.75rem;font-variant-numeric:tabular-nums}.chart-column>span{color:var(--muted)}
body[data-app=insights] .chart-track{height:190px;background:#f8f2ef;border-radius:5px;margin:6px 0 8px}body[data-app=insights] .chart-track>div{background:var(--insights-coral);border-radius:5px 5px 0 0}
body[data-app=insights] .chart-column small{font-size:.75rem;color:var(--muted)}
body[data-app=insights] .insights-breakdown{margin:12px 0 0}.insights-breakdown strong{font-variant-numeric:tabular-nums;color:var(--insights-ink)}
body[data-app=insights] .insights-breakdown li{padding:13px 0;gap:16px;font-size:1rem}.insights-breakdown li>span{min-width:0}
body[data-app=insights] .insights-sections details{border-top:1px solid var(--border);padding-top:14px;margin-top:16px}body[data-app=insights] summary{cursor:pointer;font-size:.875rem;color:var(--green);min-height:32px}
body[data-app=insights] .insights-sections table{font-size:.875rem;border-collapse:collapse;margin-top:10px}.insights-sections th,.insights-sections td{border-bottom:1px solid var(--border)}
body[data-app=insights] progress{accent-color:var(--insights-coral);margin:10px 0;max-width:100%;height:12px;border:0;border-radius:8px;overflow:hidden}body[data-app=insights] progress::-webkit-progress-bar{background:#f4ede9}body[data-app=insights] progress::-webkit-progress-value{background:var(--insights-coral)}
body[data-app=insights] .footnote{color:var(--muted);font-size:.8125rem;line-height:1.6}.insights-updated{margin:24px 0 0;max-width:1100px}
body[data-app=insights] .entry-card{border-color:var(--border);box-shadow:0 18px 60px #4938280a}body[data-app=insights] .entry-card .eyebrow{color:var(--muted)}
body[data-app=insights] .app-switcher a[aria-current=true]{background:var(--insights-soft);border-color:#e6c0b8}body[data-app=insights] dialog{color:var(--insights-ink);border-color:var(--border)}
body[data-app=insights] a:focus-visible,body[data-app=insights] button:focus-visible{outline-color:var(--insights-coral)}
@media(max-width:1100px){body[data-app=insights] .insights-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}body[data-app=insights] .insights-sections{grid-template-columns:minmax(0,1fr) minmax(240px,.8fr);gap:16px}body[data-app=insights] .panel{padding:18px}}
@media(max-width:900px){body[data-app=insights] .insights-sections{grid-template-columns:minmax(0,1fr)}.insights-tasks-section{grid-row:auto}}
@media(max-width:760px){
 body[data-app=insights] .shell{display:block}
 body[data-app=insights] #sidebar{position:fixed;inset:0 auto 0 0;width:88px;height:100dvh;padding:8px 6px max(10px,env(safe-area-inset-bottom));z-index:52;visibility:hidden;transform:translateX(-100%);box-shadow:8px 0 30px #27313f24;transition:transform .2s ease,visibility .2s ease}
 body[data-app=insights].menu-open{overflow:hidden}body[data-app=insights].menu-open #sidebar{visibility:visible;transform:translateX(0)}
 .insights-menu-backdrop{display:block;position:fixed;inset:0;z-index:51;border:0;border-radius:0;background:#27313f44}
 body[data-app=insights] .insights-side-brand{display:none}.insights-side-close{display:grid;place-items:center;align-self:center;width:44px;height:44px;min-height:44px;padding:0;border:0;background:transparent;margin:0 0 8px}.insights-side-close img{width:32px;height:32px}
 body[data-app=insights] .workspace>.insights-topbar{height:58px;min-height:58px;padding:0 10px;gap:6px}body[data-app=insights] #menu{display:grid;place-items:center;min-width:44px;width:44px;height:44px;padding:10px;border:0;margin:0;background:transparent;color:var(--insights-ink)}
 body[data-app=insights] #breadcrumb{display:none}.insights-mobile-brand{display:flex;align-items:center;flex:1;gap:7px;min-width:0;min-height:44px;color:var(--insights-ink);font:700 15px/1.2 Manrope,system-ui,sans-serif;letter-spacing:-.3px}.insights-mobile-brand img{width:28px;height:28px;flex:none}.insights-mobile-brand>span{white-space:nowrap;min-width:0}
 .insights-topbar-actions{gap:6px}body[data-app=insights] .account-button{width:44px;height:44px;max-width:44px;padding:4px;justify-content:center}.insights-user-name{display:none}
 body[data-app=insights] #main{padding:16px 14px calc(24px + env(safe-area-inset-bottom))}body[data-app=insights] .page-title{flex-direction:column;align-items:stretch;gap:16px;margin-bottom:20px}.insights-heading h1{font-size:1.5rem}.insights-heading .muted{font-size:.875rem}
 .insights-heading-actions{justify-content:space-between;flex-wrap:wrap;gap:8px}.insights-period-label{font-size:.875rem;gap:8px}body[data-app=insights] #insights-period{padding:8px 10px;max-width:140px}
 body[data-app=insights] .insights-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:20px}body[data-app=insights] .metric{padding:15px}.insights-metric-label{font-size:.875rem;gap:6px}.insights-metric-icon{width:16px;height:16px}body[data-app=insights] .metric>strong{font-size:1.75rem}.insights-sections{gap:16px}
 body[data-app=insights] .chart-track{height:145px}body[data-app=insights] .panel{padding:16px}body[data-app=insights] #notice{bottom:calc(16px + env(safe-area-inset-bottom))}
}
@media(max-width:380px){body[data-app=insights] .insights-metrics{grid-template-columns:minmax(0,1fr)}.insights-heading-actions{align-items:stretch}.insights-period-label{flex:1}body[data-app=insights] #insights-period{flex:1;max-width:none}.insights-mobile-brand{font-size:.875rem}}
@media(prefers-reduced-motion:reduce){body[data-app=insights] #sidebar{transition:none}}

/* Keep the brand bold and the search centred independently of the account name. */
body[data-app=insights] .insights-brand-name{font-weight:800;color:var(--insights-ink)}
body[data-app=insights] .insights-brand-app{color:var(--insights-coral)}
body[data-app=insights] .workspace>.insights-topbar{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,40%) minmax(0,1fr);column-gap:20px}
body[data-app=insights] #breadcrumb{grid-column:1;font:800 1.125rem/1.3 Manrope,system-ui,sans-serif;letter-spacing:-.35px;overflow:visible}
body[data-app=insights] .insights-topbar-actions{grid-column:3;justify-self:end;margin-left:0}
body[data-app=insights] .insights-header-search{display:flex;align-items:center;grid-column:2;grid-row:1;width:100%;max-width:520px;min-width:0;height:42px;justify-self:center;border:1px solid var(--border);border-radius:11px;background:#f6f5f3;padding:0 4px 0 13px;margin:0}
body[data-app=insights] .insights-header-search:focus-within{border-color:var(--insights-coral);box-shadow:0 0 0 3px #d96c581c}
body[data-app=insights] #insights-header-query{min-width:0;flex:1;width:100%;height:40px;padding:0;border:0;margin:0;outline:0;box-shadow:none;background:transparent;color:var(--insights-ink);font-size:1rem}
body[data-app=insights] #insights-header-query::placeholder{color:var(--muted);opacity:1}
body[data-app=insights] .insights-header-search>button{display:grid;place-items:center;flex:none;width:40px;height:40px;padding:9px;border:0;background:transparent;color:var(--green);border-radius:8px}
body[data-app=insights] .insights-header-search>button svg{width:21px;height:21px}
body[data-app=insights] .insights-header-search>button:hover{background:var(--insights-soft);filter:none}
.insights-search-label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
@media(min-width:761px) and (max-width:1100px){body[data-app=insights] .account-button{max-width:44px;padding:4px}body[data-app=insights] .insights-user-name{display:none}body[data-app=insights] .workspace>.insights-topbar{grid-template-columns:minmax(180px,1fr) minmax(180px,40%) minmax(180px,1fr);column-gap:12px}body[data-app=insights] #breadcrumb{font-size:1rem}}
@media(max-width:760px){
 body[data-app=insights] .workspace>.insights-topbar{grid-template-columns:44px minmax(0,1fr) auto;grid-template-rows:44px 44px;height:112px;min-height:112px;padding:8px 10px;gap:8px 6px}
 body[data-app=insights] #menu{grid-column:1;grid-row:1}body[data-app=insights] .insights-mobile-brand{grid-column:2;grid-row:1;gap:0}
 body[data-app=insights] .insights-mobile-brand>img{display:none}body[data-app=insights] .insights-mobile-brand>span{white-space:normal}
 body[data-app=insights] .insights-mobile-brand .insights-brand-name{font-size:.9375rem;line-height:1.3;letter-spacing:-.3px}
 body[data-app=insights] .insights-topbar-actions{grid-column:3;grid-row:1}
 body[data-app=insights] .insights-header-search{grid-column:1 / -1;grid-row:2;height:44px;width:100%;max-width:520px}
}
@media(max-width:360px){body[data-app=insights] .insights-mobile-brand .insights-brand-name{font-size:.875rem}}
