/* Klix — ajustes exclusivos da apresentação em smartphone, 28/10/2026.
   Nenhuma regra fora deste media query modifica a apresentação do computador. */
@media (max-width:600px), (max-width:960px) and (pointer:coarse) and (max-height:600px){
 html,body{min-width:0;width:100%;max-width:100%}
 body{font-size:14px}
 .app-shell,.main-content,.page-wrap,.page,.panel,.mg-panel,.modal,.portal-shell{min-width:0;max-width:100%}
 /* A altura acompanha todas as linhas: os controles nunca invadem o conteúdo. */
 body .topbar,body.control-panel-active .topbar{height:auto;min-height:62px;position:relative;display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:14px}
 .topbar .breadcrumb{min-width:0;flex:1;overflow-wrap:anywhere}
 body .topbar .top-actions{display:grid;grid-template-columns:44px minmax(0,1fr);width:100%;min-width:0;gap:12px;align-items:center}
 .topbar .top-actions .global-search-box,.topbar .top-actions .global-search-box.searching{grid-column:1/-1;position:relative;inset:auto;display:flex;justify-content:flex-start;width:100%;max-width:100%;min-width:0;background:#fff;border:1px solid #dce2ef;z-index:21}
 .topbar .top-actions .search-box input{display:block;width:100%;min-width:0}
 .topbar .global-search-results{position:absolute;top:calc(100% + 8px);left:0;right:0;width:100%;max-height:60dvh}
 .topbar .notification{display:grid;place-items:center;border:1px solid #e0e5ef;border-radius:12px;background:#fff;grid-column:1;grid-row:2;justify-self:start}
 .topbar .top-account{grid-column:2;grid-row:2;justify-self:end;min-width:0;gap:10px;max-width:100%}
 .topbar .top-account-name{max-width:130px;font-size:12px}
 .topbar .top-date{display:none}
 .topbar #controlPanelAccount{grid-column:1/-1;min-width:0;width:100%}
 #controlPanelAccount summary{min-height:44px;box-sizing:border-box}
 #controlPanelAccount .cp-account-content{top:calc(100% + 8px);right:0;width:100%;max-width:100%;box-sizing:border-box}
 #controlPanelAccount .profile-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 .global-search-results{right:0;left:0;width:100%;max-width:100%}
 .notification-panel{position:relative;inset:auto;margin:12px 14px;width:auto;max-width:calc(100% - 28px);box-sizing:border-box}
 .notification-panel-head{flex-wrap:wrap;gap:12px}
 #trainingNotice,.training-notice,.offline-notice,.app-update-notice{position:relative;inset:auto;line-height:1.6;overflow-wrap:anywhere}
 /* Espaço para tocar sem acionar o controle vizinho. */
 body button:not(.cp-card):not(.pos-catalog-item),body a.button{min-height:44px!important;min-width:44px!important}
 body summary{min-height:44px!important;padding-top:12px;padding-bottom:12px;box-sizing:border-box;line-height:1.5}
 button,a.button,.button,.catalog-action,.user-toggle,.icon-button,.calendar-nav,.calendar-today,.top-logout-button,.mg-panel button,.mg-dialog button{min-height:44px;min-width:44px;height:auto;max-width:100%;white-space:normal;overflow-wrap:anywhere;box-sizing:border-box;touch-action:manipulation}
 button,.button{line-height:1.45}
 input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]),select,textarea{min-width:0;max-width:100%;min-height:44px!important;font-size:16px!important;box-sizing:border-box}
 textarea{min-height:96px;resize:vertical}
 input[type=checkbox],input[type=radio]{width:20px;height:20px;min-width:20px;flex-shrink:0}
 label:has(>input[type=checkbox]),label:has(>input[type=radio]){min-height:44px;align-items:center;line-height:1.5}
 input[type=file]{height:auto!important;padding:8px!important;overflow:hidden}
 input[type=file]::file-selector-button{min-height:44px;margin-right:8px;white-space:normal}
 body .search-box,body .local-search,body .directory-tools>.search-box,body .catalog-toolbar .search-box{width:100%;max-width:100%;min-width:0;height:auto!important;min-height:48px!important;padding:10px 12px}
 body .search-box input{min-width:0;width:100%;font-size:16px!important;line-height:1.4}
 body .cp-search input{font-size:16px!important}
 .section-title,.welcome-row,.panel-heading,.placeholder-head,.catalog-toolbar,.directory-tools,.filter-row,.calendar-toolbar,.calendar-date-controls,.supplier-panel-actions,.supplier-purchase-items-heading,.mg-heading,.mg-dialog-head{flex-wrap:wrap;gap:12px;min-width:0}
 .section-title>div,.welcome-row>div,.panel-heading>div,.placeholder-head>div,.mg-heading>div,.mg-dialog-head>div{min-width:0;max-width:100%}
 .section-title>.button,.welcome-actions,.panel-actions,.supplier-panel-actions{width:100%}
 .panel-actions,.welcome-actions,.form-buttons,.modal-actions,.contact-actions,.gallery-share-row,.portal-share-actions,.mg-actions,.mg-toolbar,.mg-tabs{display:flex;flex-wrap:wrap;gap:12px;align-items:stretch;min-width:0}
 .form-buttons .button,.modal-actions .button,.contact-actions .button,.welcome-actions .button,.panel-actions>.button,.mg-actions button{flex:1 1 140px;min-width:0;justify-content:center}
 .form-buttons [role=status],.form-buttons>span,.modal-actions>span{flex-basis:100%;line-height:1.6;overflow-wrap:anywhere}
 .catalog-form,.user-form,.report-filters,.form-row,.mg-form,.contact-form,.checkout-request-form,.linked-document-form,.client-support-reply,.order-task-form,.supplier-purchase-line{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;min-width:0}
 form>label,.catalog-form>label,.user-form>label,.mg-form>label{min-width:0;max-width:100%;line-height:1.5}
 .wide-field,.contact-wide,.mg-wide{grid-column:1/-1}
 .report-filters>label,.report-filters>.button{width:100%;min-width:0;flex-basis:100%}
 .panel p,.phase-note,.mg-note,.portal-message{overflow-wrap:anywhere;line-height:1.6}
 .table-wrap{max-width:100%;min-width:0;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
 .table-wrap th,.table-wrap td{padding:12px 10px;line-height:1.5}
 .table-wrap td .button,.table-wrap td button{margin:4px}
 .segmented{display:flex;flex-wrap:wrap;gap:8px;max-width:100%;height:auto}
 .segmented button{flex:1 1 80px;min-width:0}
 .calendar-date-controls{width:100%}
 .calendar-date-controls h2{flex-basis:100%;margin:0;font-size:18px}
 .calendar-views{width:100%}
 .calendar-export{width:100%;justify-content:center}
 .calendar-grid.calendar-month{grid-template-columns:repeat(7,minmax(48px,1fr));overflow-x:auto}
 .calendar-grid.calendar-week{overflow-x:auto}
 .calendar-day{min-width:0;padding:3px}
 .calendar-day-number{min-height:44px;min-width:44px;max-width:100%;font-size:13px}
 .calendar-weekday{font-size:12px}
 .calendar-day-item{min-width:0;white-space:normal}
 .calendar-day-item span{min-width:0;overflow-wrap:anywhere}
 .modal-backdrop{padding:12px;align-items:flex-start;overflow-y:auto}
 .modal{width:100%;margin:auto;max-height:calc(100dvh - 24px);overflow-y:auto;box-sizing:border-box;padding:18px}
 dialog,.mg-dialog,.sale-receipt-dialog{max-width:calc(100vw - 20px);max-height:calc(100dvh - 24px);box-sizing:border-box;overflow:auto}
 .mg-dialog-head{position:relative;top:auto}
 .mg-tabs button{flex:1 1 120px;min-width:0;font-size:13px}
 .mg-actions button{min-width:0}
 .mg-list-row,.mg-payment{gap:14px;flex-wrap:wrap}
 .mg-metrics{grid-template-columns:minmax(0,1fr)}
 .mg-metric{padding:16px}
 .mg-heading label{width:100%}
 .client-actions{min-width:44px}
 .linked-document{row-gap:12px}
 .linked-document .catalog-action{grid-row:auto!important;grid-column:2;justify-self:stretch!important}
 #paymentTerminalList>div,#financialAccountList>div,#cpBalancesList>div{gap:12px;flex-wrap:wrap;min-width:0}
 #paymentTerminalList p,#financialAccountList p,#cpBalancesList p{flex:1 1 150px;min-width:0;overflow-wrap:anywhere}
 #paymentTerminalList .user-toggle,#financialAccountList .user-toggle{margin-left:auto}
 body.control-panel-active #page-configuracoes:not([data-cp-settings-selected="equipe"]) #studioInvitationPanel,body.control-panel-active #page-configuracoes:not([data-cp-settings-selected="equipe"]) #studioCreatePanel{display:none!important}
 #cashierPanel:has(.cashier-progress) .pos-mobile-nav{display:none!important}
 /* PDV: cabeçalho, quantidade horizontal e rodapé utilizáveis com o polegar. */
 #cashierPanel:not([hidden]){inset:6px;width:auto;max-width:calc(100% - 12px);max-height:calc(100dvh - 12px);padding:14px;box-sizing:border-box}
 #cashierPanel>.panel-heading{display:flex;flex-wrap:wrap;gap:12px}
 #cashierPanel>.panel-heading>div{flex:1 0 100%}
 #cashierPanel>.panel-heading>button{flex:1 1 100px;justify-content:center}
 #cashierPanel .cashier-progress{gap:8px}
 #cashierPanel .cashier-progress button{padding:8px 4px;font-size:12px;min-width:0;min-height:48px;flex-wrap:wrap}
 #cashierPanel .pos-item-entry{grid-template-columns:minmax(0,1fr);gap:16px}
 #cashierPanel .pos-step-heading{flex-wrap:wrap;gap:12px;align-items:flex-start}
 #cashierPanel .cashier-cart-line{grid-template-columns:minmax(0,1fr) auto;gap:14px;padding:14px}
 #cashierPanel .cashier-cart-description{grid-column:1/-1}
 #cashierPanel .cashier-cart-description b{white-space:normal;overflow-wrap:anywhere;font-size:14px;line-height:1.5}
 #cashierPanel .cashier-cart-line .cashier-quantity-controls{grid-column:1;grid-row:auto;display:inline-flex;flex-direction:row;gap:12px;min-width:0;justify-self:start}
 #cashierPanel .cashier-cart-line .cashier-quantity-controls>button{width:44px;height:44px;min-height:44px;flex-basis:44px;font-size:18px}
 #cashierPanel .cashier-cart-line>strong{grid-column:2;grid-row:auto;font-size:14px}
 #cashierPanel .cashier-cart-line>.catalog-action{grid-column:1/-1;min-height:44px;height:auto;justify-self:stretch;font-size:13px}
 #cashierPanel .cashier-flow-footer{position:static;bottom:auto;gap:16px;padding-bottom:max(12px,env(safe-area-inset-bottom))}
 #cashierPanel .cashier-flow-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
 .sale-receipt-actions{position:static;gap:12px;padding-bottom:env(safe-area-inset-bottom)}
 .sale-receipt-actions .button{flex:1 1 140px;min-width:0}
 .sale-receipt-row{gap:12px;flex-wrap:wrap}
 body.control-panel-active .cp-heading h1{font-size:26px;overflow-wrap:anywhere}
 #controlPanelNavigation{gap:12px}
 .cp-nav-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;width:100%}
 .cp-nav-buttons button{justify-content:center;min-width:0}
 .cp-card{gap:14px}
 .cp-card strong{font-size:18px}
 .cp-card-icon{width:48px;height:48px;flex-basis:48px}
 .cp-settings-tabs{grid-template-columns:minmax(0,1fr);gap:12px}
 .cp-settings-tabs button{text-align:left;min-height:48px}
 .portal-header,.section-heading,.portal-contract-card{flex-wrap:wrap;gap:14px}
 .portal-navigation{gap:12px}
 .portal-navigation a{display:flex;align-items:center;justify-content:center;min-height:44px;flex:1 1 130px}
 .contact-actions>*{max-width:100%}

 /* Painel compacto: títulos limpos e atalhos em duas colunas no smartphone. */
 #controlPanel .cp-heading .eyebrow{display:none}
 #controlPanel #controlPanelTitle,#controlPanel #controlPanelTitle:focus,#controlPanel #controlPanelTitle:focus-visible{font-size:23px;outline:none!important;border:0!important;box-shadow:none!important;margin:0 0 8px;line-height:1.3}
 #controlPanel .cp-heading{gap:14px;margin:0 0 16px}
 #controlPanel .cp-heading p{font-size:13px;line-height:1.5}
 #controlPanel .cp-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 #controlPanel .cp-card{flex-direction:column;align-items:flex-start;gap:10px;min-height:144px;padding:14px;border-radius:16px}
 #controlPanel .cp-card-icon{width:36px;height:36px;flex:0 0 36px;border-radius:11px}
 #controlPanel .cp-card-icon svg{width:22px;height:22px}
 #controlPanel .cp-card-copy{gap:7px;padding-right:0;width:100%}
 #controlPanel .cp-card strong{font-size:15px;line-height:1.35;overflow-wrap:normal;word-break:normal}
 #controlPanel .cp-card small{font-size:12px;line-height:1.5;overflow-wrap:anywhere}
 #controlPanel .cp-card em{font-size:11px}
 #controlPanel .cp-card-arrow{display:none}
 #controlPanel .cp-help{font-size:11px;line-height:1.5;margin-top:16px}

}
