/* v16: full-width touch layout; desktop styles retain their existing layout. */
.mobile-topbar,.mobile-bottom-nav,.mobile-menu-toggle,.mobile-drawer-close,.mobile-return-chat,.mobile-conversation-more,.mobile-stage-change,.mobile-stage-navigation,.mobile-filter-tabs,.mobile-bot-tabs,.mobile-template-back{display:none}
.mobile-menu-backdrop{position:fixed;inset:0;z-index:150;border-radius:0;background:#102c45aa;border:0;padding:0}
.mobile-move-dialog{width:min(460px,calc(100vw - 24px));border:1px solid #dbe5ed;border-radius:16px;padding:20px;color:#18354b;max-height:calc(100dvh - 24px);overflow:auto}.mobile-move-dialog::backdrop{background:#102c4577}.mobile-dialog-heading,.mobile-dialog-actions{display:flex;align-items:center;justify-content:space-between;gap:12px}.mobile-dialog-heading h2{font-size:20px;margin:0}.mobile-move-dialog p{overflow-wrap:anywhere}.mobile-dialog-actions{margin-top:20px}.mobile-dialog-actions button{flex:1}
@media(max-width:900px){
 :root{--crm-top:calc(54px + env(safe-area-inset-top,0px));--crm-bottom:calc(62px + env(safe-area-inset-bottom,0px));--crm-vh:100dvh;--crm-vtop:0px}
 html{scroll-padding-top:calc(var(--crm-top) + 14px)}body.crm-app{min-width:0;padding:var(--crm-top) 0 var(--crm-bottom);background:#f4f7fa}body.crm-workspace{height:var(--crm-vh);overflow:hidden}
 body.crm-app main,body.crm-app.crm-workspace main{margin-left:0;width:100%;max-width:100%;padding:14px;min-width:0}
 body.crm-app.crm-workspace main{position:fixed;top:calc(var(--crm-vtop) + var(--crm-top));left:0;height:calc(var(--crm-vh) - var(--crm-top) - var(--crm-bottom));padding:0;overflow:hidden;display:flex;flex-direction:column}
 .mobile-topbar{position:fixed;top:var(--crm-vtop);left:0;right:0;z-index:100;height:var(--crm-top);padding:env(safe-area-inset-top,0px) max(12px,env(safe-area-inset-right,0px)) 0 max(14px,env(safe-area-inset-left,0px));display:flex;align-items:center;gap:10px;background:#17384c;color:#fff;box-shadow:0 2px 12px #17384c15}
 .mobile-brand{display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:#d8f0fa;color:#13526d;font-size:22px;font-weight:800}.mobile-topbar>strong{font-size:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1}.mobile-menu-toggle{display:grid;place-items:center;width:44px;height:44px;background:transparent;color:#fff;padding:10px}.mobile-menu-toggle svg{width:24px;height:24px}
 .mobile-bottom-nav{position:fixed;left:0;right:0;top:calc(var(--crm-vtop) + var(--crm-vh) - var(--crm-bottom));height:var(--crm-bottom);z-index:100;margin:0;padding:3px max(6px,env(safe-area-inset-right,0px)) env(safe-area-inset-bottom,0px) max(6px,env(safe-area-inset-left,0px));display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;background:#fff;border-top:1px solid #dce5ed;box-shadow:0 -3px 14px #16364c08}
 .mobile-bottom-nav a,.mobile-bottom-nav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:54px;padding:5px 3px;color:#637b8b;background:none;border:0;border-radius:9px;font:600 11px system-ui,sans-serif}.mobile-bottom-nav svg{width:23px;height:23px}.mobile-bottom-nav [aria-current=page]{background:#e8f5fb;color:#006f96}.mobile-bottom-nav [aria-expanded=true]{background:#eef3f7;color:#123e58}
 body.crm-app>aside#crm-navigation{display:none;position:fixed;inset:0 auto 0 0;width:min(320px,calc(100vw - 40px));height:var(--crm-vh);padding:calc(18px + env(safe-area-inset-top,0px)) 16px calc(18px + env(safe-area-inset-bottom,0px));z-index:151;overflow-y:auto;background:#17384c;flex-direction:column;align-items:stretch;text-align:left;transform:none}
 body.mobile-menu-open>aside#crm-navigation{display:flex}.mobile-drawer-close{display:block;position:absolute;top:calc(12px + env(safe-area-inset-top,0px));right:12px;width:44px;height:44px;padding:0;background:#284a60;color:white;font-size:28px}
 body.crm-app #crm-navigation h2{display:flex;flex-direction:row;align-items:center;gap:12px;font-size:17px;padding:5px 50px 8px 0;margin:0}body.crm-app #crm-navigation>small{display:block;font-size:11px;color:#b9cfdb}body.crm-app #crm-navigation .brand-symbol{margin:0;width:36px;height:36px;font-size:27px}
 body.crm-app #crm-navigation nav{display:flex;flex-direction:column;margin:24px 0 14px;gap:6px;overflow:visible;flex:1}body.crm-app #crm-navigation nav a{display:flex;flex-direction:row;align-items:center;gap:13px;justify-content:flex-start;text-align:left;min-height:46px;padding:10px 14px;font-size:15px}body.crm-app #crm-navigation nav a span{display:block}body.crm-app #crm-navigation .nav-icon svg{width:23px;height:23px}body.crm-app #crm-navigation .rail-account{margin:12px 0 0;padding-top:14px;display:flex;flex-direction:row;justify-content:space-between;gap:14px}body.crm-app #crm-navigation .rail-account button{min-height:44px;padding:10px 20px}
 body.crm-app main>.app-header{margin:0 0 16px;padding:12px 14px;min-height:0;border:1px solid #dce5ed;border-radius:12px;gap:10px}body.crm-app .app-header h1{font-size:21px}.app-header .muted{font-size:10px}.app-header .header-account{gap:8px;flex-wrap:wrap;justify-content:flex-end}.app-header .header-account>span,.app-header .header-account>div{display:none}.app-header .notification-sound{white-space:nowrap;font-size:12px}
 body.crm-app input:not([type=checkbox]):not([type=radio]):not([type=hidden]),body.crm-app select,body.crm-app textarea{font-size:16px!important;max-width:100%;min-width:0;min-height:44px}body.crm-app input[type=file]{font-size:13px!important}body.crm-app textarea{line-height:1.45}body.crm-app input[type=checkbox],body.crm-app input[type=radio]{width:20px;height:20px;min-height:20px;flex-shrink:0}body.crm-app button,body.crm-app .toolbar-link,body.crm-app .outline-button,body.crm-app .icon-button{min-height:44px;touch-action:manipulation}body.crm-app button{white-space:normal}body.crm-app [hidden]{display:none!important}
 .page-tools,.section-heading{flex-wrap:wrap;gap:12px}.page-tools .inline{flex-wrap:wrap;width:100%}.page-tools .inline>*{flex:1}.search-box{width:100%;min-width:0!important}.search-box input{width:100%}.card{padding:16px;border-radius:12px}.grid,.directory-grid,.dashboard-grid,.settings-layout,.integrations-layout{grid-template-columns:minmax(0,1fr)!important}.entry-form{position:static}.form-two{grid-template-columns:1fr;gap:0}.inline{max-width:100%;flex-wrap:wrap}.inline input,.inline select{min-width:0}.form-actions{flex-wrap:wrap}.form-actions button{min-width:150px}.metrics.dashboard-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.dashboard-metrics .metric-card{padding:14px}.dashboard-metrics b{font-size:27px}.preview-banner{flex:none;margin:8px!important;flex-wrap:wrap;font-size:12px}.error,.notice{overflow-wrap:anywhere}.entity-tools{flex-wrap:wrap;gap:8px}
 /* Directory rows become labelled touch cards, preserving every action. */
 .mobile-card-table,.mobile-card-table tbody{display:block;min-width:0!important;width:100%}.mobile-card-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.mobile-card-table tbody tr{display:block;padding:14px 4px;border-bottom:1px solid #dce5ed}.mobile-card-table tbody td{display:grid;grid-template-columns:96px minmax(0,1fr);gap:12px;padding:7px 10px;border:0;min-width:0;font-size:14px;overflow-wrap:anywhere;align-items:start}.mobile-card-table td::before{content:attr(data-mobile-label);font-size:12px;font-weight:600;color:#6a7f8f;padding-top:2px}.mobile-card-table td>*{min-width:0}.mobile-card-table td .person-cell{align-items:flex-start}.mobile-card-table td .contact-avatar{width:30px;height:30px;min-width:30px;font-size:13px}.mobile-card-table td .toolbar-link{white-space:normal}.mobile-card-table td[colspan]{display:block}.mobile-card-table td[colspan]::before{display:none}.scroll{max-width:100%;overscroll-behavior-x:contain}
 /* Inbox / conversation / record are separate full-width mobile screens. */
 body.crm-workspace .conversation-workspace.with-inbox,body.crm-workspace .conversation-workspace.single-record{display:flex!important;flex:1;flex-direction:column;min-height:0;width:100%;height:100%;overflow:hidden;grid-template-columns:1fr}
 body.crm-workspace .conversation-workspace .inbox-panel,body.crm-workspace .conversation-workspace .conversation-panel,body.crm-workspace .conversation-workspace .record-panel{display:none!important;flex:1;min-height:0;width:100%;height:100%;max-width:none;position:relative;inset:auto;transform:none;box-shadow:none;border:0}
 body.crm-workspace .conversation-workspace[data-mobile-pane=inbox]>.inbox-panel,body.crm-workspace .conversation-workspace[data-mobile-pane=conversation]>.conversation-panel,body.crm-workspace .conversation-workspace[data-mobile-pane=record]>.record-panel{display:flex!important;flex-direction:column}
 body.crm-workspace .conversation-workspace[data-mobile-pane=inbox]>.workspace-empty{display:none}.conversation-workspace[data-mobile-pane=conversation]>.workspace-empty{display:flex;width:100%;min-height:0;padding:24px}
 body.crm-workspace .inbox-heading{padding:17px 16px 10px}.inbox-heading h1{font-size:25px}.inbox-sound{padding:0 16px}.inbox-panel>.filter-launch{justify-content:space-between}.filter-launch button{padding:10px 14px}.inbox-caption{padding:9px 16px}.thread-list{flex:1;min-height:0;overscroll-behavior-y:contain}.thread-row .thread-item{padding:15px 52px 15px 16px;gap:12px}.thread-copy{min-width:0}.thread-title{font-size:16px;line-height:1.4}.thread-client,.thread-preview{font-size:13px;line-height:1.45}.thread-row>.crm-favorite{right:4px;top:8px;width:44px;height:44px}.thread-item .contact-avatar{width:42px;height:42px;min-width:42px}.mobile-return-chat{display:block;margin:0 16px 8px;text-align:left;font-size:13px}.inbox-bottom{padding:10px 16px;font-size:11px}
 body.crm-workspace .conversation-top{display:flex;flex:none;min-height:64px;height:auto;gap:6px 10px;padding:9px 12px;flex-wrap:wrap}.conversation-top .chat-list-back{display:inline-flex!important;min-height:36px;align-items:center;font-size:13px}.conversation-top .conversation-contact{min-width:0;flex:1}.conversation-top .conversation-contact strong{display:block;max-width:100%;font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-top .conversation-contact .contact-avatar,.conversation-top .conversation-contact small{display:none}.conversation-top .conversation-tools{display:flex;flex-wrap:wrap;gap:6px;margin-left:0;width:100%;justify-content:flex-end}.conversation-top .record-toggle,.mobile-conversation-more{display:inline-flex!important;align-items:center;justify-content:center;font-size:13px}.conversation-top .record-toggle{margin-right:auto}.conversation-top .communication-call,.conversation-top [data-channels-toggle],.conversation-top [data-chat-refresh]{display:none!important}.conversation-panel.mobile-tools-open .conversation-top .communication-call{display:flex!important;flex-wrap:wrap;flex:1 1 100%;align-items:center;gap:6px}.conversation-panel.mobile-tools-open .communication-call select{flex:1;min-width:130px}.conversation-panel.mobile-tools-open .conversation-top [data-channels-toggle],.conversation-panel.mobile-tools-open .conversation-top [data-chat-refresh]{display:inline-flex!important;align-items:center}.conversation-panel .thread-actions{display:none}.conversation-panel.mobile-tools-open .thread-actions{display:flex;flex-wrap:wrap;flex:none;max-height:110px;overflow:auto;padding:6px 12px}.thread-actions form{flex-wrap:wrap;gap:5px;max-width:100%}.thread-actions form>span{flex:1 1 100%;font-size:12px}.thread-actions button{font-size:12px}
 body.crm-workspace .history-toolbar{flex:none;display:flex;flex-wrap:wrap;align-items:center;gap:5px;padding:6px 12px;min-height:44px}.history-heading{order:3;width:100%}.history-heading>.selected{display:none}.history-heading .chat-sync-status{font-size:10px}.history-toolbar .notification-sound{font-size:12px;padding:7px 9px;min-height:36px}.history-toolbar label{flex:1;max-width:none!important;min-width:120px;margin:0}.history-toolbar label input{min-height:36px!important;font-size:14px!important}.conversation-timeline{flex:1;min-height:80px!important;overscroll-behavior-y:contain;scrollbar-gutter:stable;padding:12px!important}.conversation-timeline .message-bubble{max-width:94%;padding:11px 13px;font-size:15px}.message-bubble p,.note-bubble p{font-size:15px;line-height:1.5;overflow-wrap:anywhere}.chat-location{max-width:100%}.message-bubble audio,.message-bubble video{max-width:100%}.channel-panel{top:115px!important;left:10px!important;right:10px!important;max-height:50%;overflow:auto;z-index:20}
 body.crm-workspace .composer-wrap{flex:none;min-height:0;max-height:40%;overflow-y:auto;overscroll-behavior:contain;padding:8px 12px 10px}.composer-top{padding:0 0 6px!important}.composer-top select{min-height:36px!important;font-size:14px!important;max-width:220px}.composer-top>span{font-size:11px}.composer-notice{font-size:11px!important;line-height:1.4}.message-composer>label{margin:3px 0 7px}.message-composer select{min-height:36px!important;font-size:14px!important}.message-composer textarea,.note-composer textarea{min-height:56px!important;max-height:104px;resize:none;padding:10px!important;font-size:16px!important}.message-footer{margin-top:7px!important;gap:8px!important}.message-footer button,.composer-bottom button{min-height:44px!important;font-size:14px!important;padding:9px 16px!important}.message-footer small{max-width:55%;font-size:10px!important;line-height:1.4}.template-composer-tools{gap:8px;flex-wrap:wrap;padding-top:6px}.template-composer-tools button{min-height:40px!important;font-size:13px}.template-composer-tools>a{font-size:11px}.audio-tools{gap:8px;flex-wrap:wrap}.audio-controls{flex-wrap:wrap}.audio-composer button{min-height:44px}.new-messages-bar{flex:none}
 body.crm-workspace .record-panel .record-heading{padding:14px 16px 0}.record-heading h1{font-size:22px}.record-close{display:inline-flex!important;align-items:center;justify-content:center;min-width:44px}.record-topline{gap:8px}.record-tabs{flex:none}.record-tabs button{min-height:44px}.record-panel #record-form{display:flex;flex:1;min-height:0;flex-direction:column}.record-scroll{padding:12px 16px!important;overflow:auto;overscroll-behavior:contain}.record-field{grid-template-columns:1fr!important;gap:6px;padding:8px 0;min-height:0}.record-field>span:first-child{font-size:12px;color:#5a7282}.record-panel .record-save{position:relative;flex:none;padding:10px 16px;margin:0;min-height:60px}.record-save>span{font-size:11px;max-width:48%}.record-save button{flex:1;max-width:160px}.record-field .amount-field{width:100%}.stage-picker [role=listbox]{max-height:35dvh}.stage-picker small{font-size:11px}.field-file-link{display:inline-flex;align-items:center;min-height:44px}.custom-field input::file-selector-button{min-height:36px}
 /* Touch kanban and full-screen editors. */
 .board-toolbar{gap:9px;margin-bottom:12px}.pipeline-switch{flex:1 1 100%;width:100%}.pipeline-switch label{flex:1;min-width:0}.pipeline-switch select{min-width:0;max-width:none}.board-toolbar>.filter-launch{flex:1;margin:0}.board-toolbar>.notification-sound{display:none}.board-toolbar>.toolbar-link{white-space:normal;font-size:12px;min-width:0;flex:1 1 42%;padding:10px}.board-summary{font-size:12px;margin:10px 0}.board-summary>.muted{display:none}.mobile-stage-navigation{display:flex;align-items:end;justify-content:space-between;gap:10px;margin:12px 0}.mobile-stage-navigation label{margin:0;flex:1;min-width:0}.mobile-stage-navigation small{max-width:100px;line-height:1.4;color:#6a7f8f;font-size:11px}.kanban{gap:12px;min-height:0;overflow-x:auto;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;padding-bottom:12px}.kanban-column{flex:0 0 calc(100% - 18px);width:calc(100% - 18px);min-width:0;min-height:300px;max-height:65dvh;display:flex;flex-direction:column;scroll-snap-align:start}.column-heading{flex:none;padding:14px}.column-heading h2{font-size:16px}.column-add{flex:none;min-height:44px;display:grid;place-items:center}.column-cards{min-height:160px;overflow-y:auto;overscroll-behavior-y:contain;flex:1;padding-bottom:6px}.deal-card{cursor:default;padding:14px}.deal-card .deal-title{font-size:16px;min-height:28px;line-height:1.4;margin-bottom:10px}.deal-card>.crm-favorite{width:44px;height:44px;top:2px;right:4px}.deal-card .deal-title{padding-right:34px}.deal-card .deal-contact{font-size:14px}.mobile-stage-change{display:block;width:100%;margin-top:12px;font-size:13px;text-align:left}.deal-owner{font-size:12px}.crm-filter-pagination a{display:flex;min-height:44px;align-items:center}
 .deal-editor,.rights-drawer{inset:var(--crm-vtop) 0 auto 0;width:100%!important;max-width:none;height:var(--crm-vh);padding:16px 16px calc(16px + env(safe-area-inset-bottom,0px));z-index:130;overflow-y:auto}.drawer-backdrop,.rights-backdrop{z-index:129}.editor-header,.rights-drawer>.section-heading{position:sticky;top:-16px;background:#fff;z-index:3;padding:12px 0;margin-bottom:14px}.editor-header h2,.rights-drawer h2{font-size:21px}.close-editor{min-width:44px;text-align:center}.editor-actions,.rights-save{position:sticky;bottom:calc(-16px - env(safe-area-inset-bottom,0px));z-index:4;background:#fff;padding:12px 0 calc(12px + env(safe-area-inset-bottom,0px));margin-top:16px;gap:10px}.rights-save{flex-wrap:wrap}.rights-save>span{font-size:11px;flex-basis:100%}.rights-save button{flex:1}.rules-table{min-width:440px}.permission-pipeline{overflow:auto}.rights-matrix{overflow:auto;max-width:100%}.fields-catalog{max-height:260px;overflow:auto}.field-catalog-item{padding:12px}.settings-intro{gap:12px}.settings-intro h2{font-size:21px}.group-settings .inline{margin:10px 0}.group-settings .inline input{flex-basis:100%}
 /* Filters: three compact tabs instead of a very long narrow sidebar. */
 .crm-filter-dialog{position:fixed;inset:var(--crm-vtop) 0 auto 0;margin:0;width:100vw;max-width:100vw;height:var(--crm-vh);max-height:var(--crm-vh);border-radius:0;border:0}.crm-filter-dialog>form{height:100%;max-height:none;min-height:0}.crm-filter-dialog header{padding:14px 16px;margin:0;min-height:64px}.crm-filter-dialog h2{font-size:20px}.crm-filter-dialog footer{margin:0;flex:none;padding:10px 16px calc(10px + env(safe-area-inset-bottom,0px))}.crm-filter-dialog footer button{min-height:44px}.mobile-filter-tabs{display:flex;gap:6px;flex:none;padding:0 12px 10px;border-bottom:1px solid #e2eaf0}.mobile-filter-tabs button{flex:1;font-size:12px;padding:10px 5px;background:#edf4f8;color:#466477}.mobile-filter-tabs button[aria-selected=true]{background:#087fa5;color:#fff}.filter-layout{display:block;flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain}.crm-filter-dialog .filter-fields,.crm-filter-dialog .filter-tags,.crm-filter-dialog .filter-presets{display:none!important;width:100%;min-width:0;border:0;padding:16px}.crm-filter-dialog[data-mobile-filter=fields] .filter-fields,.crm-filter-dialog[data-mobile-filter=tags] .filter-tags{display:block!important}.crm-filter-dialog[data-mobile-filter=presets] .filter-presets{display:flex!important;gap:12px}.filter-presets>button{padding:10px;border-radius:8px;background:#eaf2f8}.filter-presets>strong{margin:5px 0}.filter-two{gap:8px}.crm-filter-dialog .filter-check{min-height:44px}.filter-checks{max-height:240px}.filter-tags .filter-checks{max-height:none}.filter-select-actions button{padding:8px}.filter-custom-row{padding-top:14px}.filter-saved-row button{min-height:44px}
 /* Template library, editor and message picker. */
 .template-layout,.template-explainer{grid-template-columns:1fr}.template-heading{margin-bottom:16px;gap:12px}.template-heading h2{font-size:21px;line-height:1.25}.template-heading p{font-size:13px}.template-heading-actions{width:100%;gap:8px}.template-heading-actions a{flex:1;min-height:44px;display:grid;place-items:center;text-align:center;padding:10px;font-size:12px}.template-summary{gap:7px}.template-summary>div{padding:12px 8px;gap:5px;flex-direction:column;align-items:flex-start}.template-summary strong{font-size:24px}.template-summary span{font-size:10px}.template-sync{padding:14px;gap:10px;flex-direction:column}.template-sync button{width:100%}.template-explainer{padding:14px;gap:12px}.template-list{max-height:none}.template-list-item{padding:15px}.template-detail{padding:16px}.template-form-row,.template-examples,.template-params{grid-template-columns:1fr}.template-form-footer{align-items:stretch;flex-direction:column}.template-form-footer button{width:100%}.template-detail-title{gap:8px}.template-detail h3{font-size:20px}.mobile-template-back{display:flex;align-items:center;min-height:44px;padding:8px 0;margin-bottom:8px;color:#087fa5;font-size:14px}.templates-page.mobile-template-edit>.template-heading,.templates-page.mobile-template-edit>.template-summary,.templates-page.mobile-template-edit>.template-explainer,.templates-page.mobile-template-edit>.template-sync,.templates-page.mobile-template-edit .template-library{display:none}.template-dialog{position:fixed;inset:var(--crm-vtop) 0 auto 0;margin:0;width:100vw;max-width:none;max-height:var(--crm-vh);height:var(--crm-vh);border:0;border-radius:0;padding:16px 16px calc(20px + env(safe-area-inset-bottom,0px));overscroll-behavior:contain}.template-dialog-heading{position:sticky;top:-16px;background:#fff;z-index:5;padding-top:10px;margin-top:-10px}.template-dialog-heading h2{font-size:21px}.template-dialog-tabs{gap:8px}.template-dialog-tabs button{flex:1;font-size:12px;padding:10px 6px;min-width:0;white-space:normal}.template-dialog .template-consent{font-size:13px}.template-quick-list article button{width:100%}.template-dialog #send-template{min-height:48px}.template-composer-tools button svg{width:17px;height:17px}
 /* Pipelines and bots retain the same forms and permissions. */
 .pipeline-workspace-heading{gap:12px;align-items:stretch;flex-direction:column}.pipeline-workspace-heading h2{font-size:22px}.pipeline-settings-bar{padding:14px;gap:14px}.pipeline-workspace-switch,.pipeline-name-form{flex:1 1 100%;min-width:0;flex-wrap:wrap}.pipeline-settings-bar label{flex:1 1 100%}.pipeline-create-form{grid-template-columns:1fr;gap:8px}.pipeline-automation-board{scroll-snap-type:x mandatory;overscroll-behavior-x:contain;gap:12px}.pipeline-automation-board .automation-column{width:calc(100vw - 46px);min-width:calc(100vw - 46px);flex-basis:calc(100vw - 46px);scroll-snap-align:start}.pipeline-stage-name button{font-size:12px}.pipeline-stage-order button{min-width:44px}.pipeline-stage-order span{font-size:12px}.automation-triggers{padding:10px}.automation-add{min-height:48px}.rule-condition{grid-template-columns:1fr!important;gap:8px}.weekday-options{flex-wrap:wrap;gap:5px}.weekday-options label{min-height:44px}.bot-editor-top{align-items:stretch;flex-direction:column;gap:14px}.bot-editor-top h2{font-size:21px}.bot-editor-top .inline{display:flex;flex-wrap:wrap}.bot-editor-top .inline button{flex:1;font-size:12px}.bot-builder{display:flex;flex-direction:column;min-height:0}.mobile-bot-tabs{display:flex;gap:7px;margin:12px 0}.mobile-bot-tabs button{flex:1;padding:10px 5px;font-size:12px;background:#e7f0f5;color:#456579}.mobile-bot-tabs button[aria-selected=true]{background:#087fa5;color:white}.bot-builder[data-mobile-bot]>.bot-palette,.bot-builder[data-mobile-bot]>.bot-canvas-wrap,.bot-builder[data-mobile-bot]>.bot-properties{display:none}.bot-builder[data-mobile-bot=canvas]>.bot-canvas-wrap,.bot-builder[data-mobile-bot=palette]>.bot-palette,.bot-builder[data-mobile-bot=properties]>.bot-properties{display:block;width:100%;min-width:0;max-height:none}.bot-canvas-wrap{height:62dvh;min-height:320px;overflow:auto}.bot-canvas{min-width:650px;min-height:650px;touch-action:pan-x pan-y}.bot-canvas-tools{position:sticky;left:0;top:0;z-index:4}.bot-node{touch-action:pan-x pan-y}.bot-palette,.bot-properties{padding:16px!important}.bot-add{min-height:46px;font-size:14px}.bot-property-content input{min-width:0}.integration-account{min-width:0}.integration-layout,.integration-grid{grid-template-columns:1fr!important}.integration-heading{flex-wrap:wrap}.integration-form{max-width:100%}.integration-account-actions{flex-wrap:wrap}.run-entry summary{flex-wrap:wrap;gap:10px}
 body.mobile-keyboard{--crm-bottom:0px}.mobile-keyboard .mobile-bottom-nav{display:none}.mobile-keyboard.crm-workspace .conversation-top{min-height:46px;padding:5px 10px}.mobile-keyboard.crm-workspace .conversation-tools{width:auto;margin-left:auto}.mobile-keyboard.crm-workspace .conversation-tools .mobile-conversation-more,.mobile-keyboard.crm-workspace .history-toolbar{display:none!important}.mobile-keyboard.crm-workspace .composer-wrap{max-height:60%}.mobile-keyboard .template-composer-tools>a{display:none}.mobile-keyboard .conversation-timeline{min-height:45px!important}
}
@media(max-width:360px){.mobile-card-table tbody td{grid-template-columns:78px minmax(0,1fr);gap:8px}.template-summary>div{padding:10px 7px}.filter-two{grid-template-columns:1fr}.conversation-top .conversation-contact strong{max-width:200px}}
@media(prefers-reduced-motion:reduce){.kanban,.pipeline-automation-board{scroll-behavior:auto!important}}
@media(max-width:900px){body.mobile-menu-open{overflow:hidden}.templates-page.mobile-template-list .template-detail{display:none}.conversation-workspace:not([data-mobile-pane])[data-record="0"]>.inbox-panel{display:flex!important}.conversation-workspace:not([data-mobile-pane]):not([data-record="0"])>.conversation-panel{display:flex!important}}

.mobile-attachments-toggle{display:none}
@media(max-width:900px){
 .board-toolbar>.filter-launch{flex:1 1 100%;justify-content:space-between;flex-wrap:nowrap}.board-toolbar>.filter-launch button{min-width:190px;white-space:nowrap;font-size:14px}
 .board-toolbar>.toolbar-link{font-size:12px;padding:10px 8px}.board-toolbar{padding:14px!important}
 .mobile-attachments-toggle{display:block;font-size:12px;padding:7px 8px;min-width:125px;color:#006f96}
 .crm-workspace .composer-top select{max-width:190px;font-size:13px!important}
 .crm-workspace .mobile-attachments-ready:not(.mobile-attachments-open)>.audio-composer:not([data-has-draft="1"]),.crm-workspace .mobile-attachments-ready:not(.mobile-attachments-open)>.template-composer-tools{display:none}
 body.crm-workspace .conversation-panel .composer-wrap{max-height:45%!important}
 body.crm-workspace.mobile-keyboard .conversation-panel .composer-wrap{max-height:65%!important}
 .crm-workspace .message-composer>label{display:flex;font-size:11px;gap:8px}.crm-workspace .message-composer select{width:0;flex:1}
 .crm-workspace .template-composer-tools{margin-top:10px}.crm-workspace .audio-tools button{flex:1;white-space:nowrap;font-size:12px}
 .crm-workspace .composer-wrap.mobile-attachments-open,.crm-workspace .composer-wrap:has(.audio-composer[data-has-draft="1"]:not([hidden])){max-height:55%!important}
}

@media(min-width:600px) and (max-width:900px) and (max-height:540px){
 body.crm-workspace .conversation-top{flex-wrap:nowrap;min-height:46px;padding:4px 12px}.conversation-top .conversation-tools{width:auto;flex-wrap:nowrap}.conversation-top .record-toggle{margin:0}.crm-workspace .history-toolbar{display:none!important}
 body.crm-workspace .conversation-panel .composer-wrap{max-height:65%!important;padding:5px 12px 8px}.crm-workspace .composer-top{padding-bottom:4px!important;min-height:36px}.crm-workspace .composer-top .mobile-attachments-toggle{min-height:36px}
 .crm-workspace .message-composer{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 10px}.crm-workspace .message-composer>label{grid-column:1/-1;margin:0}.crm-workspace .message-composer>label select{min-height:30px!important}.crm-workspace .message-footer{margin:0!important;align-items:stretch}.crm-workspace .message-footer small{display:none}.crm-workspace .message-footer button{min-height:56px!important}.crm-workspace .message-composer textarea{max-height:72px!important}
 .crm-workspace .note-composer{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px}.crm-workspace .composer-bottom{padding:0}.crm-workspace .composer-bottom>span{display:none}.crm-workspace .composer-bottom button{min-height:56px!important}.crm-workspace .composer-notice{margin:2px 0!important}
}

/* v16.1: compact mobile chat spacing with unchanged touch targets. */
@media(max-width:900px){
 body.crm-workspace .thread-row{margin:4px 6px}.crm-workspace .thread-row .thread-item{padding:10px 46px 10px 12px;gap:9px;border-radius:8px}
 .crm-workspace .thread-item .contact-avatar{width:36px;height:36px;min-width:36px;font-size:14px}
 .crm-workspace .thread-preview{-webkit-line-clamp:1;line-height:1.35;font-size:13px}.crm-workspace .thread-meta{gap:3px}
 .crm-workspace .thread-row>.crm-favorite{right:0;top:3px;width:44px;height:44px}
 body.crm-workspace .conversation-timeline .message-bubble,body.crm-workspace .conversation-timeline .note-bubble{min-width:130px;max-width:min(88%,560px);padding:8px 10px;margin-top:8px;margin-bottom:8px}
 .crm-workspace .message-bubble p,.crm-workspace .note-bubble p{margin:4px 0 6px;line-height:1.45;font-size:15px}
 .crm-workspace .timeline-event{max-width:90%;margin-bottom:14px}.crm-workspace .timeline-day{margin-bottom:14px}
 .crm-workspace .new-messages-bar button{min-height:44px;padding:8px 12px;max-width:88%}
 body.crm-workspace main>.notice,body.crm-workspace main>.error{max-width:calc(100% - 16px);margin:6px 8px;padding:9px 12px;flex:none}
}
@media(max-width:900px){
 .crm-app .deal-card{padding:11px 12px}.crm-app .deal-card .deal-title{font-size:15px;margin-bottom:7px;line-height:1.35}.crm-app .mobile-stage-change{min-height:44px;margin-top:8px;padding:7px 10px}
 .crm-app .deal-editor .editor-header{margin-bottom:10px;padding:8px 0}.crm-app .deal-editor .editor-header h2{font-size:21px}.crm-app .deal-editor .client-mode-buttons button{font-size:12px;padding:8px 6px}.crm-app .deal-editor .editor-actions{margin-top:12px}
}
/* v16.2: compact Chats rows; preserve mobile panes and 44px touch targets. */
@media(max-width:900px){
 body.crm-workspace .with-inbox .thread-row{margin:2px 6px}
 body.crm-workspace .with-inbox .thread-row .thread-item{min-height:66px;padding:7px 46px 7px 12px;gap:9px}
 body.crm-workspace .with-inbox .thread-copy{gap:1px}
 body.crm-workspace .with-inbox .thread-title{font-size:14px;line-height:17px}
 body.crm-workspace .with-inbox .thread-client{font-size:12px;line-height:15px}
 body.crm-workspace .with-inbox .thread-preview{font-size:13px;line-height:17px;margin-top:0}
 body.crm-workspace .with-inbox .thread-row > .crm-favorite{top:50%;right:0;transform:translateY(-50%);width:44px;height:44px}
}
