/* v1.7 mobile-safe layout. Loaded last; does not alter desktop tracking or reporting. */
html,body{max-width:100%;overflow-x:clip}
.app-shell,.aff-shell,.main-column,.page,.aff-main,.aff-content{min-width:0}
.brand-upload-logo{display:block;object-fit:contain;object-position:left center;max-width:100%;height:auto}
.login-body .login-box .login-mark{width:100%;height:auto;max-height:none;max-width:100%;background:none;border-radius:0;justify-content:flex-start;margin-bottom:17px;box-shadow:none;overflow:hidden}
.login-body .login-box .login-mark .brand-upload-logo{width:auto;max-width:min(190px,65vw);max-height:46px;object-fit:contain;object-position:left center}
.login-body .login-box .login-mark .brand-mark{flex:none}
.login-body .login-box .eyebrow{overflow-wrap:anywhere;line-height:1.6}
.affiliate-auth .auth-brand{display:flex;align-items:center;gap:10px;width:100%;min-width:0;line-height:1.25}
.affiliate-auth .auth-brand .brand-upload-logo{flex:0 1 auto;object-position:left center;width:auto;max-width:min(180px,65vw);max-height:42px;min-width:0}
/* Prevent the full header or navigation sidebar from expanding the content viewport. */
.global-header,.aff-topbar{min-width:0;max-width:100vw}
.global-header .brand-logo,.aff-topbar .aff-brand{flex:0 1 auto;min-width:0;max-width:40vw;overflow:hidden}
.global-header .brand-logo img,.aff-topbar .aff-brand img{width:auto;max-width:100%;height:auto;max-height:38px}
.global-header .global-tools,.aff-topbar .aff-top-right{flex:0 0 auto;min-width:0}
.table-wrap{overscroll-behavior-x:contain;scrollbar-width:thin}
@media(max-width:900px){
 .app-shell>.sidebar,.aff-shell>.aff-context.sidebar{width:min(370px,calc(100vw - 44px))!important;max-width:100vw;overscroll-behavior:contain;overflow-y:auto;padding-bottom:env(safe-area-inset-bottom,0px);box-shadow:14px 0 38px rgba(7,21,46,.20);transition:transform .2s ease-out}
 .app-shell>.sidebar.shown,.aff-shell>.aff-context.sidebar.shown{visibility:visible!important;pointer-events:auto;transform:translateX(0)!important}
 .app-shell>.sidebar:not(.shown),.aff-shell>.aff-context.sidebar:not(.shown){visibility:hidden;pointer-events:none;transform:translateX(-110%)!important}
 .v17-close-menu{border:1px solid #d9e3ef;background:#f4f7fc;color:#1d355c;border-radius:8px;width:36px;height:36px;min-width:36px;display:grid;place-items:center;font-size:19px}
 .app-shell>.sidebar .v17-drawer-bar,.aff-context .v17-drawer-bar{position:sticky;top:0;z-index:3;background:#fff;display:flex;align-items:center;justify-content:space-between;padding:9px 12px;border-bottom:1px solid #e3eaf4;min-height:50px}
 .v17-drawer-bar strong{font-size:13px;color:#1b3764}
 .app-shell>.sidebar nav.context-menu{flex:none!important}
 .v16-mobile-modules{gap:1px!important}
 .v16-mobile-modules a{min-height:42px}
 body.v17-drawer-open{overflow:hidden;touch-action:pan-y}
}
@media(max-width:650px){
 .app-shell,.aff-shell{width:100%;max-width:100vw;overflow-x:clip}
 .global-header,.aff-topbar{padding:7px 11px!important;gap:7px!important;height:61px!important;min-height:61px!important;justify-content:space-between}
 .global-header .brand-logo span{display:none!important}
 .global-header .brand-logo{max-width:min(122px,28vw);margin-right:auto}
 .global-header .global-icon[title="Campaign drafts"],.global-header .global-icon[title="Workspace settings"]{display:none}
 .global-header .global-tools{gap:4px!important}
 .global-header .user-menu{margin:0!important;padding:0 0 0 4px!important}
 .global-header .user-menu-text{display:none!important}
 .global-header .global-icon,.v14-search-trigger{width:34px!important;min-width:34px!important;height:36px!important;padding:5px!important}
 .global-header .mobile-menu{padding:7px 9px!important;white-space:nowrap;font-size:12px}
 .global-header .mobile-menu span{display:none}
 .global-header .brand-upload-logo{max-height:33px!important}
 .topbar{gap:7px!important;min-width:0;overflow:hidden}
 .topbar .crumb{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;margin-left:0!important;font-size:11px}
 .topbar .top-actions{flex:0 0 auto}
 .page,.aff-content{padding:14px 11px 27px!important;width:100%!important;max-width:100vw}
 .page-intro{margin-bottom:14px!important}
 .page-intro h1{font-size:1.35rem!important}
 .panel{padding:14px 12px!important}
 .panel-head{gap:10px;align-items:flex-start}
 .panel-head h2{overflow-wrap:anywhere}
 .metrics,.metrics.small-metrics,.dashboard-kpis,.aff-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .filter-row,.form-grid{grid-template-columns:1fr!important}
 .aff-shell .aff-topbar .aff-brand{max-width:40vw;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}
 .aff-shell .aff-topbar .aff-brand .brand-upload-logo{max-width:105px;max-height:30px}
 .aff-shell .aff-topbar .aff-top-right{gap:4px}
 .aff-shell .aff-topbar .v14-search-trigger{min-width:35px!important}
 .aff-shell .aff-context.sidebar{top:61px!important;height:calc(100dvh - 61px)!important}
 .affiliate-auth-split{min-height:100dvh;display:block!important}
 .affiliate-auth-hero{min-height:0!important;padding:22px 19px 20px!important;display:block!important}
 .affiliate-auth-hero .auth-brand{font-size:14px!important;margin:0 0 18px!important}
 .affiliate-auth-hero .eyebrow{font-size:9px;letter-spacing:.10em}
 .affiliate-auth-hero h1{font-size:1.5rem!important;line-height:1.2}
 .affiliate-auth-hero .hero-feature{display:none!important}
 .affiliate-auth-hero>p{display:none!important}
 .affiliate-auth-hero .auth-footer{font-size:12px;margin-top:15px;padding-top:12px}
 .affiliate-auth-panel{padding:24px 19px 35px!important;display:block!important;overflow:visible}
 .affiliate-auth-form{margin:0 auto;max-width:100%!important}
 .affiliate-auth-form.login-only{max-width:480px!important}
 .auth-form-grid{grid-template-columns:1fr!important}
 .login-body{display:block;padding:12px!important;min-height:100dvh}
 .login-body .login-box{margin:clamp(34px,10vh,120px) auto 20px;width:100%;padding:24px 20px!important}
 .login-body .login-box .login-mark{width:100%;margin-bottom:14px}
 .login-body .login-box .brand-upload-logo{max-width:min(175px,62vw)!important;max-height:44px!important;object-fit:contain}
 .login-body .login-box input{font-size:16px}
 .v13-load{max-width:100vw;overflow:hidden}
 .v17-export-status{padding:12px!important}
}
@media(max-width:360px){
 .global-header .user-menu{display:none}
 .global-header .mobile-menu{padding:7px!important}
 .global-header .brand-logo{max-width:108px}
 .aff-shell .aff-topbar .aff-brand{max-width:34vw}
}
@media(prefers-reduced-motion:reduce){.app-shell>.sidebar,.aff-shell>.aff-context.sidebar{transition:none!important}}
.v17-export-status{margin:14px 0;padding:16px;border:1px solid #cfdcf2;background:#f4f8ff;border-radius:9px;max-width:600px}
.v17-export-status p{margin:0 0 8px;color:#254369;font-size:13px}
.v17-export-status progress{width:min(100%,460px);height:13px;accent-color:#275ce3;vertical-align:middle}
.v17-export-status strong{font-variant-numeric:tabular-nums;margin-left:10px;color:#123674}
.v17-export-status a{margin:12px 0 0;display:inline-flex}
.v17-export-status [hidden]{display:none!important}

.v17-nav-backdrop{position:fixed;inset:0;background:rgba(9,19,39,.55);z-index:29}
.v17-nav-backdrop[hidden]{display:none!important}
