/* Shared layout constraints; data tables keep their own horizontal scroll. */
:root{--cc-header-offset:60px}
html{scroll-padding-top:calc(var(--cc-header-offset) + 60px)}
body{min-width:0;contain:none}
main,section,article,fieldset,.main-shell,.page-wrap,.app-nav,.cc-topnav{min-width:0}
img,video,canvas{max-width:100%}
input,select,textarea{max-width:100%;box-sizing:border-box}
main :is(h1,h2,h3,p,a,strong),.cc-account-menu{overflow-wrap:anywhere}
[data-app-header]{display:contents}
[data-cc-topbar], [data-app-header] .app-topbar{position:sticky;top:0;z-index:100}
.cc-topbar{position:relative;top:auto}
.main-shell>.topbar{position:sticky;top:0;z-index:100}
.cc-topbar{grid-template-columns:150px minmax(0,1fr) auto auto;gap:10px}
.cc-account-menu{position:fixed;z-index:100010;right:12px;top:calc(var(--cc-header-offset) + 8px);width:min(280px,calc(100vw - 24px));max-height:calc(100dvh - var(--cc-header-offset) - 24px);overflow:auto;padding:12px;background:#fff;color:#20213b;border:1px solid #e2e8f0;border-radius:14px;box-shadow:0 12px 38px #11182726;font:14px/1.5 Inter,system-ui,sans-serif}
.cc-account-menu>strong,.cc-account-menu>small{display:block;white-space:normal;margin:0 8px 6px}.cc-account-menu>small{color:#667085}
.cc-account-menu a,.cc-account-menu button{box-sizing:border-box;display:flex;align-items:center;min-height:44px;width:100%;padding:10px 12px;text-align:left;font:inherit;text-decoration:none;background:#fff;border:0;border-radius:8px;color:inherit;cursor:pointer}
.cc-account-menu :is(a,button):hover{background:#f0f2ff}.cc-account-menu .cc-signout{color:#b42318}
.cc-account-menu[hidden],[data-team-access][hidden]{display:none!important}
.app-topbar .cc-profile-toggle,.cc-topbar .cc-profile-toggle{display:flex!important;align-items:center;gap:8px;min-height:44px;flex-shrink:0;max-width:160px;padding:4px;border:0;background:transparent;color:#303642;cursor:pointer}
.cc-profile-toggle>span{display:grid;place-items:center;width:32px;height:32px;flex:0 0 32px;border-radius:50%;background:linear-gradient(135deg,#3035f1,#ef6a4f);color:white;font-size:11px;font-weight:700}
.cc-profile-toggle>b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
body.cc-ask-creature-open .cc-menu-ask{display:none!important}
.cc-profile-toggle:focus-visible,.cc-account-menu :is(a,button):focus-visible,.cc-menu-ask:focus-visible{outline:3px solid #8b80ff;outline-offset:2px}
:is(.table-wrap,.table-scroll,.trend-history-wrap,.trend-chart-wrap){max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
:is(.grid-2,.grid-4,.grid-5,.goals-layout)>*,.lead-meeting-row>*,.user-info{min-width:0}
@media(max-width:1180px){
 .app-topbar .cc-profile-toggle>b{display:none}
 .app-topbar .cc-profile-toggle{margin-left:0;max-width:44px}
 .app-topbar{gap:8px}
}
@media(max-width:860px){
 .cc-topbar{grid-template-columns:44px minmax(0,1fr) auto auto;padding-inline:8px;gap:4px}
 .cc-profile-toggle>b{display:none}.cc-topbar .cc-upgrade{display:none}
 .cc-mobile-panel{visibility:hidden;max-height:calc(100dvh - var(--cc-header-offset));overflow-y:auto;top:var(--cc-header-offset)}
 .cc-mobile-panel.open{visibility:visible}
 .mobile-nav-panel.open,.top-menu-panel.open{max-height:calc(100dvh - var(--cc-header-offset));overflow-y:auto}
 .grid-4,.grid-5{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:600px){
 .cc-shell{width:calc(100% - 24px)}
 .grid-2,.grid-4,.grid-5,.goals-layout{grid-template-columns:minmax(0,1fr)}
 .page-wrap{padding-inline:12px}.section-head,.card-titlebar{gap:10px;flex-wrap:wrap}
 .workspace-user-form{width:100%;max-height:calc(100dvh - 20px)}
 .lead-transcript-actions,.lead-modal-actions{flex-wrap:wrap}
 .lead-l10-source,.lead-meeting-stats{overflow-wrap:anywhere;min-width:0}
 .lead-l10-add{display:flex;flex-wrap:wrap}.lead-l10-add input,.lead-l10-add textarea{min-width:0;flex:1 1 180px}
 .app-topbar .cc-platform-logo{width:110px!important}.app-topbar .top-logo{min-width:0}
 :is(input,select,textarea){font-size:16px}
 .cc-account-menu{right:8px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important;animation-iteration-count:1!important}}

@media(max-width:780px){
 main table{display:block;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
 .department-goal-wrap,.portal-controls input{min-width:0}
 .history-row{grid-template-columns:minmax(0,1fr);gap:6px}
 .source-card{min-width:0;max-width:100%}
 .partner-modal-actions,.modal-actions,.finish-actions{flex-wrap:wrap}
 .card-titlebar{padding-block:10px}
}

/* Keep navigation above the chat layer and spanning the reserved chat column. */
body.cc-ask-creature-open [data-app-header]{display:contents!important}
body.cc-ask-creature-open :is([data-cc-topbar],[data-app-header] .app-topbar,.main-shell>.topbar){z-index:100005;background:#fff}
body.cc-ask-creature-open :is(.mobile-nav-panel.open,.top-menu-panel.open){z-index:100006}
@media(min-width:900px){
 body.cc-ask-creature-open [data-app-header] .app-topbar,
 body.cc-ask-creature-open [data-cc-topbar],
 body.cc-ask-creature-open .main-shell>.topbar{width:calc(100% + 420px)!important;max-width:none!important;box-sizing:border-box}
 body.cc-ask-creature-open .monitor-app{overflow-x:visible}
}
