/* Mobile-only application system. Desktop rules intentionally remain untouched. */
@media (max-width:760px){
  html{overflow-x:hidden;-webkit-text-size-adjust:100%;scroll-padding-top:72px}body{min-width:0!important;overflow-x:hidden!important}html.mobile-nav-open,body.mobile-nav-open{height:100%!important;overflow:hidden!important;overscroll-behavior:none!important}
  .main,.main-content,.content,main,.dashboard-main,.client-add-main,.creator-form-main{min-width:0!important;max-width:100%!important;margin-left:0!important}
  .main,.main-content,.content,.dashboard-main{padding-left:12px!important;padding-right:12px!important}
  img,video,canvas,svg{max-width:100%}input,select,textarea,button{max-width:100%;font-size:16px!important}textarea{min-height:112px}button,a{touch-action:manipulation}
  .mobile-header,.mobile{display:flex!important;position:sticky!important;top:0!important;z-index:1100!important;width:100%!important;min-height:60px!important;padding:0 14px!important;align-items:center!important;justify-content:space-between!important}
  .sidebar{position:fixed!important;inset:0 auto 0 0!important;width:min(86vw,310px)!important;height:100dvh!important;max-height:100dvh!important;z-index:1300!important;transform:translateX(-105%)!important;transition:transform .22s ease!important;overflow-x:hidden!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch!important;touch-action:pan-y!important;overscroll-behavior-y:contain!important;box-shadow:18px 0 45px rgba(10,14,34,.22)!important;padding-bottom:calc(28px + env(safe-area-inset-bottom))!important}
  .sidebar.open{transform:translateX(0)!important}.mobile-system-overlay{display:block;position:fixed;inset:0;z-index:1250;background:rgba(13,18,35,.48);opacity:0;visibility:hidden;transition:opacity .2s ease,visibility .2s ease}.mobile-system-overlay.active{opacity:1;visibility:visible}
  .tenant-unified-brand{position:sticky;top:0;z-index:2;background:#1a1a2e;padding-top:5px!important}
  .header,.top,.page-head,.hero,.client-add-hero,.creator-form-hero,.head{min-width:0!important}.header,.page-head,.client-add-hero,.creator-form-hero{padding:18px!important;border-radius:15px!important;align-items:flex-start!important}.header h1,.page-head h1,.hero h1,.head h1{font-size:24px!important;line-height:1.18!important}.header p,.page-head p,.hero p,.head p{font-size:13px!important;line-height:1.5!important}
  .head-actions,.header-actions,.actions,.action-row,.toolbar{width:100%!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}.head-actions>*:only-child,.header-actions>*:only-child{grid-column:1/-1}.actions a,.actions button,.head-actions a,.head-actions button{min-height:44px!important;justify-content:center!important;text-align:center!important}
  .grid,.form-grid,.field-grid,.profile-grid,.details-grid,.metrics-grid,.summary-grid,.stat-grid,.kpis,.cards,.people,.report-overview,.analysis-kpis,.team-grid,.billing-grid{grid-template-columns:1fr!important}.field,.form-group,label{min-width:0!important}.field.full,.full{grid-column:auto!important}
  .card,.panel,.form-section,.section-card,.profile-panel{max-width:100%!important;padding:16px!important;border-radius:15px!important}.card+.card,.panel+.panel{margin-top:12px}
  .section-jump,.tabs,.tab-nav,.report-tabs,.settings-tabs,.workspace-tabs{display:flex!important;max-width:100%!important;overflow-x:auto!important;scroll-snap-type:x proximity;gap:8px!important;padding-bottom:5px!important;scrollbar-width:none}.section-jump::-webkit-scrollbar,.tabs::-webkit-scrollbar,.tab-nav::-webkit-scrollbar{display:none}.section-jump>*,.tabs>*,.tab-nav>*,.workspace-tabs>*{flex:0 0 auto!important;scroll-snap-align:start;white-space:nowrap!important}
  .table-wrap,.table-wrapper,.table-responsive,.table-container{display:block!important;width:100%!important;max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch!important;border-radius:12px!important}table{min-width:720px}th,td{white-space:nowrap}.mobile-list{display:grid!important}
  .modal,.dialog,.drawer,.client-action-drawer{width:100%!important;max-width:100%!important;inset:auto 0 0!important;max-height:92dvh!important;border-radius:20px 20px 0 0!important;overflow-y:auto!important}.modal-card,.dialog-card{width:calc(100% - 20px)!important;max-height:90dvh!important;margin:10px!important;overflow-y:auto!important}
  .filters{grid-template-columns:1fr!important}.filters>*{grid-column:auto!important;grid-row:auto!important}.pf-select__menu{position:fixed!important;left:10px!important;right:10px!important;top:auto!important;bottom:10px!important;max-height:min(55dvh,420px)!important;border-radius:16px!important;box-shadow:0 22px 70px rgba(13,18,35,.28)!important}.pf-select.is-open:after{content:"";position:fixed;inset:0;z-index:2190;background:rgba(13,18,35,.32)}.pf-select__menu{z-index:2200!important}
  .notification-center,.nc-panel{position:fixed!important;left:10px!important;right:10px!important;top:68px!important;width:auto!important;max-height:calc(100dvh - 80px)!important}
  .tenant-chat-panel{left:8px!important;right:8px!important;bottom:8px!important;width:auto!important;height:min(680px,calc(100dvh - 16px))!important;max-height:none!important}.tenant-chat-launcher{right:14px!important;bottom:14px!important}
  .main,.main-content,.content,.dashboard-main{padding-bottom:calc(28px + env(safe-area-inset-bottom))!important}
  .top-bar,.page-head,.header,.head{min-height:0!important;gap:12px!important}
  .top-bar>div,.page-head>div,.header>div,.head>div{min-width:0!important}
  .top-bar h1,.page-head h1,.header h1,.head h1{overflow-wrap:anywhere}
  .btn,.button,.btn-primary,.btn-secondary,.btn-save,.btn-export{min-height:44px!important}
  .modal-card,.dialog-card,.drawer>*{overscroll-behavior:contain}
  [style*="grid-template-columns"]{min-width:0}
}
@media (max-width:420px){
  .main,.main-content,.content,.dashboard-main{padding-left:9px!important;padding-right:9px!important}.header,.page-head,.client-add-hero,.creator-form-hero,.card,.panel,.form-section{padding:14px!important}.head-actions,.header-actions,.actions{grid-template-columns:1fr!important}.analysis-kpis,.report-overview{grid-template-columns:1fr 1fr!important}.analysis-kpis article,.report-overview article{min-height:82px!important}.mobile-grid{grid-template-columns:1fr!important}
}

/* Creator and client portals */
@media (max-width:850px){
  body .app{display:block!important;min-width:0!important}body .app>main{margin-left:0!important;min-width:0!important}.wrap,.shell{width:100%!important;max-width:100%!important;padding:14px!important}.layout{grid-template-columns:1fr!important}.top{height:auto!important;min-height:64px!important;padding:10px 14px!important;gap:10px!important}.top>div:last-child{font-size:12px;text-align:right}.hero{display:block!important;padding:18px!important}.hero>.pill{display:inline-flex;margin-top:12px}.kpis,.people{grid-template-columns:1fr 1fr!important}.metrics{grid-template-columns:1fr 1fr!important}.portal-tabs,.campaign-tabs{overflow-x:auto!important;white-space:nowrap!important}.chat-shell{height:calc(100dvh - 92px)!important;min-height:0!important;grid-template-columns:1fr!important}.thread-list{max-height:34dvh!important}.conversation{min-height:55dvh!important}.message-list{padding:14px!important}.bubble{max-width:88%!important}.composer{padding:10px!important}.composer .btn{width:48px!important;font-size:0!important}.composer .btn i{font-size:16px!important}
}
@media (max-width:520px){body .kpis,body .people{grid-template-columns:1fr!important}.person,.kpi{min-width:0}.approve{display:grid!important;grid-template-columns:1fr!important}.approve button{min-height:42px}.brand small{display:none}.top>div:last-child{max-width:48%}}
