/* Shared mobile layout; loaded after the legacy portal themes. */
.eva-row-toggle,.eva-filter-toggle,.eva-filter-reset{display:none}
.eva-table-scroll{max-width:100%;overflow:auto;overscroll-behavior-inline:contain}
.bea-drop{position:relative}
.bea-drop input[type=file]{inset:0;width:100%;max-width:100%;height:100%;box-sizing:border-box}
:is(.workspace,.bea-workspace,main,.card,.card-body){min-width:0}
/* Hidden overflow creates a separate scroll container and disables viewport sticky. */
:root body :is(.app-shell,.sales-shell,.bea-shell,.workspace,.bea-workspace){overflow-x:clip!important;overflow-y:visible!important}
[hidden]{display:none!important}
.eva-push-permission .eva-push-later{margin-top:12px;background:#f4f2fa;color:#544b70;border:1px solid #dcd7e8}
html{scroll-padding-top:calc(var(--eva-header-height,80px) + 12px)}
@media(min-width:992px){
  .eva-nav-backdrop,.eva-mobile-close,.mobile-menu,.bea-menu{display:none!important}
}
@media(max-width:1199.98px){
  :root body .klarfall-documents article{flex-wrap:wrap}
  :root body .klarfall-review-form{flex:1 1 100%;min-width:0;grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:991.98px){
  :root body:is(.eva-ui,.be-portal){touch-action:auto;background:var(--bs-body-bg,#f7f7fb)}
  :root body:is(.eva-ui,.be-portal).menu-open{overflow:hidden!important;touch-action:auto!important}
  :root body :is(.app-shell,.sales-shell,.bea-shell){display:block;min-height:100dvh}
  :root body :is(.workspace,.bea-workspace),:root body.sidebar-collapsed .workspace{margin-left:0!important;width:100%!important;max-width:100%;min-width:0;transition:none!important}
  :root body :is(.sidebar,.sales-sidebar,.eva-sidebar,.bea-sidebar){position:fixed!important;inset:0 auto 0 0!important;width:min(320px,calc(100vw - 48px))!important;height:100dvh!important;max-height:100dvh!important;transform:translateX(-102%)!important;transition:transform .2s ease!important;z-index:4000!important;overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior:contain;touch-action:pan-y!important;padding-top:max(16px,env(safe-area-inset-top));padding-bottom:max(16px,env(safe-area-inset-bottom));visibility:hidden;box-shadow:none!important}
  :root body.menu-open :is(.sidebar,.sales-sidebar,.eva-sidebar,.bea-sidebar){transform:translateX(0)!important;visibility:visible;box-shadow:12px 0 36px #15223826!important}
  :root body .eva-nav-backdrop{display:block;position:fixed;inset:0;width:100%;height:100dvh;border:0;border-radius:0;background:#14203673;z-index:3999;cursor:pointer}
  :root body .eva-mobile-close{display:grid!important;place-items:center;position:sticky!important;float:right;align-self:flex-end;top:0;right:0;flex:0 0 44px;width:44px;height:44px;min-height:44px;padding:0;margin:0 0 4px auto;border:1px solid #e0dff0;border-radius:10px;background:var(--bs-body-bg,#fff);color:var(--bs-body-color,#37344f);font-size:26px;z-index:3}
  :root body .eva-navigation{overflow:visible!important;flex:1 0 auto;min-height:0}
  :root body :is(.eva-navigation,.bea-sidebar nav) :is(a,summary){min-height:44px;line-height:1.4;white-space:normal}
  :root body .bea-sidebar .bea-role{clear:both}
  :root body :is(.topbar,.bea-top){position:sticky!important;top:0!important;z-index:80!important;height:auto!important;min-height:0!important;display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:8px!important;padding:8px max(12px,env(safe-area-inset-right)) 8px max(12px,env(safe-area-inset-left))!important;container-type:normal!important;background:var(--bs-body-bg,#fff)!important;overflow:visible!important}
  :root body :is(.topbar-left,.bea-top-title){display:flex!important;align-items:center;gap:8px;min-width:0!important;max-width:none!important;flex:1 1 calc(100% - 60px);order:0}
  :root body .bea-top-title{flex-direction:column;align-items:flex-start;flex-basis:calc(100% - 60px)}
  :root body :is(.top-title,.bea-top-title strong){font-size:16px!important;line-height:1.35;white-space:normal!important;overflow-wrap:anywhere;max-width:none!important}
  :root body :is(.topbar,.bea-top) :is(.breadcrumb,.bea-top-title small,.bea-global,.eva-global-search){display:none!important}
  :root body :is(.mobile-menu,.bea-menu){display:inline-grid!important;place-items:center;position:static!important;flex:0 0 44px;width:44px!important;height:44px!important;min-width:44px;min-height:44px;border:1px solid #dfddeb;border-radius:10px;background:#f4f2ff;color:#5951c5;font-size:22px;margin:0!important}
  :root body .topbar-right{display:flex!important;flex:1 1 100%;width:100%;min-width:0;order:1;align-items:center;justify-content:flex-start!important;flex-wrap:nowrap!important;gap:8px!important}
  :root body .eva-quick-actions{display:contents!important}
  :root body .eva-team-leaderboard{order:3!important;flex:1 1 100%;position:static!important;transform:none!important;width:100%!important;overflow-x:auto!important;justify-content:flex-start!important;scrollbar-width:thin}
  :root body .eva-team-rank{flex-shrink:0}
  :root body :is(.topbar,.bea-top) :is(.eva-search-action,.bea-lookup-quick,.bea-notify,.be-cancel-notification,.eva-icon-action){display:inline-flex!important;align-items:center;justify-content:center;min-width:44px!important;min-height:44px!important;height:44px!important;flex:0 0 44px!important;padding:0 10px!important;margin:0!important}
  :root body :is(.eva-search-action,.bea-lookup-quick)>span{display:none!important}
  :root body .bea-top>.bea-lookup-quick,:root body .bea-top>.bea-notify{order:1}
  :root body .eva-mobile-more{display:block!important;margin-left:auto;flex:0 0 auto;order:2}
  :root body .eva-mobile-more>summary{display:grid;place-items:center;min-width:44px;min-height:44px;padding:0 10px}
  :root body .eva-mobile-more>summary>span{display:none}
  :root body .eva-mobile-more-menu{max-height:calc(100dvh - 160px);overflow:auto;width:min(300px,calc(100vw - 24px));padding:12px;z-index:90}
  :root body .eva-mobile-more-menu :is(a,button,summary){min-height:44px!important;height:auto!important;white-space:normal!important}
  :root body .eva-mobile-more-menu :is(.eva-create-action,.bea-quick,.eva-header-event,.bea-closing-script-trigger,.user-block,.bea-user,.be-market-switch,.logout-btn){display:flex!important;width:100%!important;align-items:center;justify-content:flex-start;padding:10px!important;gap:8px;font-size:14px!important}
  :root body .eva-mobile-more-menu :is(.eva-create-action>span,.bea-user span){display:inline!important}
  :root body .eva-mobile-more-menu .bea-quick:before{content:none}
  :root body .eva-mobile-more-menu form{display:flex!important;flex-wrap:wrap;gap:8px;max-width:100%;margin:0}
  :root body :is(.main,.bea-main,.be-main){width:100%;max-width:100%;padding:20px 16px 32px!important}
  :root body :is(.sales-page-head,.bea-page-head,.ops-head){flex-wrap:wrap;gap:12px}
  :root body :is(.main,.bea-main) :is(h1,.page-title){font-size:24px;line-height:1.3}
  :root body :is(.main,.bea-main) :is(.table-responsive,.table-scroll,.be-table-wrap,.eva-table-scroll){max-width:100%;overflow:auto;overscroll-behavior-inline:contain}
  :root body :is(.main,.bea-main) .card{overflow:visible;max-width:100%}
  :root body :is(.main,.bea-main) :is(.card-body,.card-header){padding:16px}
  :root body :is(.main,.bea-main) :is(.btn,button,select,input:not([type=checkbox]):not([type=radio]):not([type=hidden])){min-height:44px}
  :root body :is(.main,.bea-main) :is(input,select,textarea){max-width:100%;font-size:16px!important}
  :root body :is(.main,.bea-main) :is(input[type=checkbox],input[type=radio]){width:20px;min-height:20px;height:20px;flex:0 0 20px}
  :root body :is(.main,.bea-main) :is(label,p,td){overflow-wrap:anywhere}
  :root body :is(dialog,.modal-dialog){max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 24px);overflow:auto}
  :root body .modal-content{max-height:calc(100dvh - 24px)}
  :root body .modal-body{overflow:auto;min-height:0}
  :root body audio{width:100%;max-width:100%}
  :root body :is(.eva-notification-panel,.eva-ops-panel,.eva-realtime-panel){left:12px!important;right:12px!important;width:auto!important;max-width:calc(100vw - 24px);max-height:calc(100dvh - 120px);overflow:auto}
  :root body .eva-push-permission{overflow:auto;padding:12px}
  :root body .eva-push-permission>section{padding:22px;max-height:calc(100dvh - 24px);overflow:auto}
}
@media(max-width:767.98px){
  :root body .klarfall-documents article{flex-wrap:nowrap}
  :root body .klarfall-review-form{flex:0 0 auto;width:100%}
  :root body :is(.main,.bea-main,.be-main){padding:16px 12px 28px!important;font-size:14px}
  :root body :is(.sales-form-grid,.form-grid,.bea-grid,.bea-inline-form,.bea-filter,.bea-customer-detail,.bea-correction form,.kf-grid,.kf-layout,.kf-workspace,.kf-detail-grid,.mail-settings-grid,.template-center-layout,.bea-inbox,.pre-sale-doc-layout){grid-template-columns:minmax(0,1fr)!important;gap:14px}
  :root body :is(.sales-form-grid,.form-grid,.bea-grid)>*{grid-column:auto!important;min-width:0}
  :root body :is(.bea-metrics,.sales-kpis,.kpi-grid){grid-template-columns:repeat(2,minmax(0,1fr))!important}
  :root body :is(.bea-task-board){grid-template-columns:minmax(0,1fr)!important;overflow:visible}
  :root body :is(.bea-agenda article,.bea-timeline article,.bea-list-rows>article){flex-wrap:wrap}
  :root body .bea-customer-list summary{grid-template-columns:32px minmax(0,1fr) 20px!important}
  :root body :is(.nav-tabs,.nxl-tabs,.tabs){max-width:100%;flex-wrap:nowrap;overflow-x:auto;white-space:nowrap}
  :root body :is(.nav-tabs,.nxl-tabs,.tabs)>*{flex-shrink:0}
  :root body :is(.main,.bea-main) :is(.eva-mobile-filter){display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:10px;align-items:end}
  :root body .eva-mobile-filter>.eva-filter-search{grid-column:1/-1}
  :root body .eva-mobile-filter>.eva-filter-extra{display:none!important}
  :root body .eva-mobile-filter.eva-filters-open>.eva-filter-extra{display:grid!important;grid-column:1/-1}
  :root body :is(.eva-filter-toggle,.eva-filter-reset){display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 12px;border:1px solid #dcd8f2;background:#f3f1ff;color:#5148b7;border-radius:8px;font-size:14px}
  :root body :is(.main,.bea-main) .eva-mobile-table{display:block!important;min-width:0!important;width:100%!important;table-layout:auto!important;border:0!important}
  :root body :is(.main,.bea-main) .eva-mobile-table>thead{display:none!important}
  :root body :is(.main,.bea-main) .eva-mobile-table>tbody{display:block!important;width:100%!important}
  :root body :is(.main,.bea-main) .eva-mobile-table>tbody>tr{display:block!important;position:static!important;width:100%!important;margin:0 0 12px;padding:12px;border:1px solid #e2deee;border-radius:12px;background:var(--bs-body-bg,#fff)}
  :root body :is(.main,.bea-main) .eva-mobile-table>tbody>tr:nth-child(even){background:var(--bs-tertiary-bg,#faf9fd)}
  :root body :is(.main,.bea-main) .eva-mobile-table>tbody>tr>td{display:block!important;width:100%!important;max-width:100%;min-width:0!important;padding:8px 0!important;border:0!important;white-space:normal!important;font-size:14px;overflow-wrap:anywhere}
  :root body :is(.main,.bea-main) .eva-mobile-table>tbody>tr>td::before{content:attr(data-mobile-label);display:block;margin-bottom:4px;font-size:12px;font-weight:600;color:var(--bs-secondary-color,#6c6681)}
  :root body :is(.main,.bea-main) .eva-mobile-table>tbody>tr:not(.eva-mobile-expanded)>.eva-mobile-detail{display:none!important}
  :root body .eva-row-toggle{display:flex;align-items:center;justify-content:center;min-height:44px;width:100%;margin-top:10px;padding:8px 12px;border:1px solid #dcd8f2;border-radius:8px;background:#f2efff;color:#5548bb;font-size:14px;font-weight:600}
  :root body .eva-mobile-table :is(form,.d-flex,.callback-row-actions){max-width:100%;flex-wrap:wrap!important;gap:8px}
  :root body .eva-mobile-table :is(input,select){width:100%!important;min-width:0!important}
  :root body .eva-mobile-table colgroup{display:none}
  :root body :is(.main,.bea-main) .eva-mobile-table>tbody>tr[hidden],:root body :is(.main,.bea-main) .eva-mobile-table>tbody>tr>td[hidden]{display:none!important}
  :root body :is(.kf-doc-row,.kf-channel-row,.kf-request-row){flex-wrap:wrap;gap:12px}
  :root body :is(.klarfall-workspace,.klarfall-columns,.klarfall-customer-grid,.klarfall-review-form,.klarfall-backoffice-form,.klarfall-type-grid,.template-grid,.sr-filter form){grid-template-columns:minmax(0,1fr)!important}
  :root body :is(.klarfall-kpis,.sr-summary){grid-template-columns:repeat(2,minmax(0,1fr))!important}
  :root body .klarfall-workspace :is(.card-body,.klarfall-panel-body){padding:16px!important}
  :root body .klarfall-workspace label{gap:10px;align-items:center}
  :root body .sr-call-list article{flex-wrap:wrap;min-width:0}
  :root body .eva-dashboard-widget-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  :root body .eva-dashboard-widget-grid>*{grid-column:1/-1!important;min-width:0}
  :root body .wrap{max-width:100%;padding-inline:12px}
  :root body .typed-slot-head{flex-wrap:wrap;gap:8px}
  :root body .upload-actions{flex-wrap:wrap;gap:10px}
  :root body .upload-choice{min-height:44px;max-width:100%;white-space:normal}
}
@media(prefers-reduced-motion:reduce){:root body :is(.sidebar,.bea-sidebar){transition:none!important}}
