/* Compact mobile count entry, dashboard, and navigation. */
@media (max-width:760px){
  body.cc-nav-open{overflow:hidden}
  body.cc-mobile-pad-open{overflow:hidden}
  .cc-entry-body{overflow-x:hidden}
  .cc-topbar{height:58px;padding:0 10px 0 12px}
  .cc-mobile-brand{gap:8px;font-size:17px}
  .cc-mobile-brand .cc-brand-mark{width:34px;height:34px}
  .cc-top-actions{display:none!important}
  .nav-toggle{display:flex;z-index:140;top:10px;right:10px;width:38px;height:38px;padding:9px;flex-direction:column;justify-content:center;gap:4px;background:#1e3a4c}
  .nav-toggle span{display:block;width:100%;height:2px;border-radius:2px;background:#fff;transition:transform .18s ease,opacity .18s ease}
  .nav-toggle[aria-expanded=true] span:nth-child(1){transform:translateY(6px) rotate(45deg)}
  .nav-toggle[aria-expanded=true] span:nth-child(2){opacity:0}
  .nav-toggle[aria-expanded=true] span:nth-child(3){transform:translateY(-6px) rotate(-45deg)}
  .cc-sidebar{z-index:130;width:min(250px,82vw)!important;padding:0 8px 12px;transform:translateX(-105%);box-shadow:12px 0 35px #0f172a35}
  .cc-sidebar.open{transform:translateX(0)}
  .cc-sidebar-brand{height:58px;min-height:58px;margin:0 -8px 7px;padding:0 12px;font-size:17px}
  .cc-sidebar-brand .cc-brand-mark{min-width:34px;width:34px;height:34px}
  .cc-nav-item{height:42px;min-height:42px;padding:0 11px;gap:12px;font-size:13px}
  .cc-nav-item svg{width:19px;height:19px;min-width:19px}
  .cc-sidebar-backdrop{position:fixed;z-index:120;inset:0;background:#0f172a80;opacity:0;pointer-events:none;transition:opacity .18s ease}
  .cc-nav-open .cc-sidebar-backdrop{opacity:1;pointer-events:auto}

  .page.cc-main,.page.cc-main.wide-page{width:100%;padding:66px 7px 16px}
  .cc-entry-heading,.cc-dashboard-heading{gap:7px;margin-bottom:8px;padding:0 3px 8px!important}
  .cc-entry-heading h1,.cc-dashboard-heading h1{font-size:21px}
  .cc-entry-heading p,.cc-dashboard-heading p{margin-top:2px;font-size:11px;line-height:1.35}
  .cc-entry-heading .cc-api-state{display:grid!important;grid-template-columns:minmax(0,1.45fr) minmax(58px,.65fr) minmax(74px,.8fr);gap:5px;width:100%}
  .cc-entry-heading .ims-refresh{display:block;width:100%;min-width:0}
  .cc-entry-heading .ims-status{display:none}
  .cc-entry-heading .ims-btn,.cc-entry-heading #theme-toggle,.cc-entry-heading .cc-heading-signout button{width:100%;min-width:0!important;height:34px;min-height:34px;padding:0 6px;font-size:10px;white-space:nowrap}
  .cc-entry-heading .ims-btn svg{width:14px;height:14px}
  .cc-entry-heading .cc-heading-signout{width:100%}

  .cc-entry-layout{display:flex!important;flex-direction:column;gap:7px}
  .cc-entry-card{width:100%;padding:7px!important;border-radius:10px}
  .cc-location-row{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:end;gap:5px!important;margin-bottom:7px!important}
  .cc-location-row label{width:auto;min-width:0;font-size:10px}
  .cc-location-row input{height:39px;min-height:39px;margin-top:3px;padding:6px 9px;font-size:16px}
  .cc-location-row .assignment-note{display:block;width:auto;max-width:43vw;min-height:39px!important;padding:0 8px;font-size:10px;line-height:37px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .cc-location-row .assignment-note strong{font-weight:800}
  .cc-entry-card .bulk-table-scroll{overflow:visible!important;border:0!important}
  .cc-entry-card .tagless-entry-table,.cc-entry-card .tagless-entry-table tbody{display:block!important;width:100%!important;min-width:0!important}
  .cc-entry-card .tagless-entry-table thead{display:none!important}
  .cc-entry-card .tagless-entry-table tbody{display:flex!important;flex-direction:column;gap:6px}
  .cc-entry-card .tagless-entry-table tr.bulk-row{position:relative!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;width:100%!important;padding:8px 7px!important;border:1px solid var(--cc-line)!important;border-radius:9px!important;background:var(--panel)!important;box-shadow:0 2px 7px #0f172a08}
  .cc-entry-card .tagless-entry-table tr.bulk-row[hidden]{display:none!important}
  .cc-entry-card .tagless-entry-table tr.bulk-row.group-component{background:#f0fdfa!important}
  .cc-entry-card .tagless-entry-table td{position:static!important;display:block!important;width:auto!important;height:auto!important;padding:0!important;border:0!important;grid-column:auto}
  .cc-entry-card .tagless-entry-table td::before{display:block!important;margin:0 0 2px!important;color:var(--muted)!important;font-size:9px!important;line-height:1.2!important;font-weight:800!important;letter-spacing:.05em!important;text-transform:uppercase!important}
  .cc-entry-card .tagless-entry-table td:nth-child(1),.cc-entry-card .tagless-entry-table td:nth-child(8){grid-column:1/-1!important}
  .cc-entry-card .tagless-entry-table td:nth-child(2){grid-column:span 2!important}
  .cc-entry-card .tagless-entry-table td:nth-child(1){padding-right:36px!important}
  .cc-entry-card .tagless-entry-table td:nth-child(1)::before{content:'SKU'}
  .cc-entry-card .tagless-entry-table td:nth-child(2)::before{content:'Color'}
  .cc-entry-card .tagless-entry-table td:nth-child(3)::before{content:'Group %'}
  .cc-entry-card .tagless-entry-table td:nth-child(4)::before{content:'# Sacks'}
  .cc-entry-card .tagless-entry-table td:nth-child(5)::before{content:'Butal'}
  .cc-entry-card .tagless-entry-table td:nth-child(6)::before{content:'KG / Sack'}
  .cc-entry-card .tagless-entry-table td:nth-child(7)::before{content:'Total KGS'}
  .cc-entry-card .tagless-entry-table td:nth-child(8)::before{content:'Remarks'}
  .cc-entry-card .tagless-entry-table td:nth-child(9){position:absolute!important;top:6px!important;right:6px!important;width:30px!important}
  .cc-entry-card .tagless-entry-table td:nth-child(9)::before{display:none!important;content:none!important}
  .cc-entry-card .tagless-entry-table input,.cc-entry-card .tagless-entry-table textarea{width:100%!important;height:38px!important;min-height:38px!important;margin:0!important;padding:5px 7px!important;font-size:16px!important}
  .cc-entry-card .tagless-entry-table input[data-mobile-pad="1"]{background:#fff;color:var(--ink);font-weight:400;border-left-color:var(--orange);cursor:pointer}
  .cc-entry-card .tagless-entry-table textarea{height:40px!important}
  .cc-entry-card .tagless-entry-table .remove-row{width:30px!important;height:30px!important;padding:0!important;font-size:19px}
  .cc-entry-card .tagless-entry-table .percentage-cell::after{font-size:16px}
  .cc-entry-card .tagless-entry-table .bulk-row:not(.group-component) .percentage-cell{display:none!important}
  .cc-entry-card .group-header{display:block!important;width:100%}
  .cc-entry-card .group-header td{display:block!important;width:100%!important;padding:7px!important;border-radius:9px}
  .cc-entry-card .group-header-inner{display:flex!important;align-items:stretch!important;flex-direction:column!important;gap:6px!important}
  .cc-entry-card .group-header-inner label{display:flex!important;align-items:center!important;justify-content:space-between!important}
  .cc-entry-card .group-header-inner input{width:55%!important;margin:0!important;font-size:16px}
  .cc-entry-card .group-header-inner .remove-group{margin:0!important}
  .cc-entry-card .bulk-actions{position:static!important;bottom:auto!important;z-index:auto!important;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.2fr)!important;gap:5px!important;margin-top:7px!important;padding:0!important;background:transparent!important;backdrop-filter:none!important;border:0!important;border-radius:0!important}
  .cc-entry-card .cc-row-actions{display:contents!important}
  .cc-entry-card .cc-row-actions button{width:100%;min-width:0;min-height:34px;padding:4px 2px;font-size:9px;white-space:nowrap}
  .cc-entry-card .cc-row-actions>span{grid-column:1/-1;grid-row:2;font-size:9px;line-height:1.2}
  .cc-entry-card .bulk-actions>.primary{grid-column:3;grid-row:1;width:100%!important;min-width:0!important;height:34px!important;min-height:34px!important;padding:4px 2px;font-size:9px;white-space:nowrap}
  .cc-entry-card .stage-note{margin:7px 0 0!important;padding:7px!important;font-size:9px;line-height:1.35}
  .cc-calculator{display:none!important}
  .cc-recent-card{margin-top:7px}
  .cc-recent-card .section-heading{padding:9px 10px}
  .cc-recent-card .section-heading{align-items:stretch;flex-direction:column;gap:7px}
  .cc-recent-card .recent-table-tools{display:grid;grid-template-columns:auto minmax(0,1fr);gap:7px}
  .cc-recent-card .recent-search{width:100%}
  .cc-recent-card .recent-search input{height:34px;min-height:34px;font-size:12px}
  .cc-recent-card .table-scroll{overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;touch-action:pan-x pan-y;-webkit-overflow-scrolling:touch}
  .cc-recent-card .recent-details-table{width:1600px;min-width:1600px}
  .cc-recent-card .recent-details-table th{height:36px;padding:0 9px;font-size:9px}
  .cc-recent-card .recent-sort-button{min-height:34px;font-size:9px}
  .cc-recent-card .recent-details-table td{height:auto;min-height:44px;padding:8px 9px;font-size:11px;line-height:1.35}
  .combo-popup{max-width:calc(100vw - 14px)!important;font-size:13px;overflow-y:scroll!important;overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch}
  .combo-option{min-height:42px;padding:6px 9px;touch-action:pan-y}
  .combo-option strong{font-size:13px}

  .cc-dashboard-heading .heading-actions{display:grid!important;grid-template-columns:1.25fr 1fr .65fr .85fr;gap:5px;width:100%}
  .cc-dashboard-heading .ims-refresh{display:block;width:100%;min-width:0}
  .cc-dashboard-heading .ims-status{display:none}
  .cc-dashboard-heading .ims-btn,.cc-dashboard-heading .button,.cc-dashboard-heading #theme-toggle,.cc-dashboard-heading .cc-heading-signout button{width:100%;min-width:0!important;height:34px;min-height:34px;padding:0 4px;font-size:9px;white-space:nowrap}
  .cc-dashboard-heading .ims-btn svg{width:13px;height:13px}
  .cc-dashboard-heading .cc-heading-signout{width:100%}
  .kpis.cc-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px;margin-bottom:8px}
  .cc-kpis article:last-child:nth-child(odd){grid-column:1/-1}
  .cc-kpis article{min-height:76px;padding:8px 9px;gap:8px;border-radius:10px}
  .cc-stat-icon{width:34px;height:34px;min-width:34px;border-radius:9px}
  .cc-stat-icon img{width:100%;height:100%}
  .cc-kpis small{font-size:8px;line-height:1.2}
  .cc-kpis strong{margin:2px 0 0;font-size:20px}
  .cc-kpis article span:not(.cc-stat-icon){font-size:9px;line-height:1.2}
  .cc-filter-card{padding:9px!important;margin-bottom:8px}
  .cc-filter-top{margin-bottom:7px;gap:6px}
  .cc-filter-top>span{font-size:8px;line-height:1.2}
  .cc-filter-chips{gap:5px}
  .cc-chip{height:30px;padding:0 10px;border-radius:15px;font-size:9px}
  .cc-filter-fields{gap:6px}
  .cc-summary-filter-fields{display:grid!important;grid-template-columns:1fr 1fr!important;align-items:end!important}
  .cc-summary-filter-fields .grow{grid-column:1/-1}
  .cc-filter-fields label{font-size:9px}
  .cc-filter-fields input,.cc-filter-fields select{height:38px;min-height:38px;margin-top:3px;padding:5px 8px;font-size:16px}
  .cc-filter-fields button{min-height:34px;padding:5px;font-size:11px}
  .cc-results-card .section-heading{min-height:54px;padding:9px 10px}
  .cc-results-card .section-heading h2{font-size:16px}
  .cc-results-card .section-heading p{margin-top:1px;font-size:10px}
  .cc-results-card .cc-live{gap:5px;font-size:9px}
  .cc-results-card th{height:36px;padding:0 9px;font-size:9px}
  .cc-results-card td{height:44px;padding:7px 9px;font-size:11px}
  .cc-results-card .empty{height:100px!important}
  .cc-results-card .sku-summary-table{min-width:1120px}
  [data-theme=dark] .cc-entry-card .tagless-entry-table tr.bulk-row.group-component{background:#123d39!important}
  [data-theme=dark] .cc-entry-card .tagless-entry-table input[data-mobile-pad="1"]{background:#1b2229;color:#f4f7fa;border-color:#39424c;border-left-color:var(--orange)}
  .mobile-number-pad-backdrop{position:fixed;z-index:3100;inset:0;background:#0f172a80}
  .mobile-number-pad{position:fixed;z-index:3110;right:0;bottom:0;left:0;padding:10px max(10px,env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));border:1px solid var(--cc-line);border-radius:16px 16px 0 0;background:var(--panel);box-shadow:0 -12px 38px #0f172a35;overscroll-behavior:contain;touch-action:manipulation;-webkit-user-select:none;user-select:none}
  .mobile-number-pad[hidden],.mobile-number-pad-backdrop[hidden]{display:none!important}
  .mobile-number-pad-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
  .mobile-number-pad-head>div{min-width:0;flex:1}
  .mobile-number-pad-label{display:block;color:var(--muted);font-size:10px;font-weight:800;letter-spacing:.05em;text-transform:uppercase}
  .mobile-number-pad-display{display:block;min-height:38px;overflow:hidden;color:var(--ink);font-size:25px;font-weight:800;line-height:38px;text-align:right;text-overflow:ellipsis;white-space:nowrap}
  .mobile-number-pad-result{display:block;min-height:18px;color:#94a3b8;font-size:13px;font-weight:700;line-height:18px;text-align:right}
  .mobile-number-pad-close{width:34px;height:34px;min-height:34px;padding:0;border-radius:50%;font-size:19px}
  .mobile-number-pad-keys{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}
  .mobile-number-pad button{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
  .mobile-number-pad-keys button{height:42px;min-height:42px;padding:0;font-size:17px}
  .mobile-number-pad-keys .operator{background:#e6fffb;color:#0f766e}
  .mobile-number-pad-keys .clear{grid-column:span 2;color:#b91c1c}
  .mobile-number-pad-keys .done{grid-column:span 2;background:var(--teal);border-color:var(--teal);color:#fff}
  .mobile-number-pad-error{min-height:15px;margin:4px 0 0;color:#dc2626;font-size:10px;text-align:center}
  [data-theme=dark] .mobile-number-pad{background:#1b2229}
  [data-theme=dark] .mobile-number-pad-display{color:#f4f7fa}
  [data-theme=dark] .mobile-number-pad-result{color:#94a3b8}
  [data-theme=dark] .mobile-number-pad-keys .operator{background:#123d39;color:#99f6e4}
}

@media (max-width:390px){
  .cc-entry-heading .cc-api-state{grid-template-columns:1.4fr .62fr .82fr}
  .cc-dashboard-heading .heading-actions{grid-template-columns:1fr 1fr}
  .cc-dashboard-heading .heading-actions>*{width:100%}
}
