/* Fiozato Logistics — layout de celular (até 760px).
   Carregado por último; tudo fica dentro do @media, então o computador não muda.
   Objetivo: nada passa da largura da tela (sem arrastar para o lado) e o menu vira lista suspensa. */
.mobile-menu-button, .mobile-menu-backdrop { display: none; }
.pr-colon { display: none; }

@media (max-width: 760px) {
  html, body { overflow-x: clip; }
  .main { padding: 0 12px 28px; min-width: 0; }
  .view { min-width: 0; }

  /* ---------- menu suspenso no lugar da barra de baixo ---------- */
  .mobile-menu-button { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-left: -8px; padding: 0; border: 0; background: transparent; color: #000; cursor: pointer; flex: 0 0 auto; }
  .sidebar { display: none; }
  body.mobile-menu-open .sidebar { display: flex; position: fixed; inset: 0 auto auto 0; z-index: 400; width: min(320px, 86vw); height: 100dvh; max-height: 100dvh; flex-direction: column; padding: 18px 14px 18px; overflow-y: auto; box-shadow: 8px 0 30px rgba(0,0,0,.35); }
  body.mobile-menu-open .mobile-menu-backdrop { display: block; position: fixed; inset: 0; z-index: 399; background: rgba(0,0,0,.45); }
  body.mobile-menu-open { overflow: hidden; }
  body.mobile-menu-open .brand { display: block; margin-bottom: 14px; }
  body.mobile-menu-open .brand small { display: block; font-size: 7px; letter-spacing: 2.5px; }
  body.mobile-menu-open .brand { display: grid; justify-items: start; gap: 8px; padding-inline: 12px; padding-top: 18px; }
  body.mobile-menu-open .brand-logo { width: 124px; }
  body.mobile-menu-open .nav { display: grid; grid-auto-flow: row; grid-auto-columns: auto; gap: 4px; overflow: visible; }
  body.mobile-menu-open .nav-section { display: block; margin: 12px 0 4px; }
  body.mobile-menu-open .nav-item { display: grid; grid-template-columns: 24px 1fr auto; flex-direction: row; justify-items: start; gap: 10px; padding: 12px; font-size: 15px; text-align: left; }
  body.mobile-menu-open .nav-item > span { display: block; }
  body.mobile-menu-open .nav-count { display: inline-block; }
  body.mobile-menu-open .sidebar-foot { display: block; }

  /* topo: [≡] Título ............ [lupa] [atualizar] — só ícones, sem caixa */
  .topbar { height: auto; min-height: 0; padding: 12px 0; display: flex; align-items: center; gap: 8px; }
  .topbar > div:not(.topbar-actions) { flex: 1 1 auto; min-width: 0; }
  .topbar .eyebrow { display: none; }
  .topbar h1 { font-size: 20px; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 2px; margin-right: -8px; }
  .topbar-actions .mobile-logout { display: none !important; } /* "Sair" fica no rodapé do Menu */
  .topbar-actions .quick-search-button, .topbar-actions #refreshButton { position: relative; width: 40px; height: 40px; min-width: 0; padding: 0; border: 0; background: transparent; box-shadow: none; color: #000; font-size: 0; }
  .topbar-actions .quick-search-button > *, .topbar-actions #refreshButton > * { display: none; }
  .topbar-actions .quick-search-button::before, .topbar-actions #refreshButton::before { content: ""; position: absolute; inset: 9px; background: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
  .topbar-actions .quick-search-button { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'><circle cx='10.5' cy='10.5' r='6.5'/><path d='M15.5 15.5 21 21'/></svg>"); }
  .topbar-actions #refreshButton { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M20 12a8 8 0 1 1-2.34-5.66'/><path d='M20 4v5h-5'/></svg>"); }

  /* barras fixas que ficavam acima da antiga barra de baixo */
  #productionQueueView.has-production-selection .production-selection-bar,
  #labelsView.has-label-selection .label-bulk-actions:not([hidden]) { bottom: 12px; }

  /* ---------- Prioridades do dia ---------- */
  .operation-lead { gap: 10px; }
  .operation-lead .secondary-button { width: 100%; }
  .pr-bar { flex-direction: column; align-items: stretch; }
  .pr-toggle { display: grid; grid-template-columns: 1fr 1fr; }
  .pr-toggle button { height: auto; min-height: 42px; padding: 6px 8px; font-size: 13px; line-height: 1.2; }
  .pr-filters .pz-chip { justify-content: space-between; }
  .pr-head { flex-direction: column; gap: 2px; }
  .pr-row { grid-template-columns: 30px minmax(0, 1fr) auto; grid-template-areas: "pos . value" "order order value" "name name name" "marks marks marks" "thumbs thumbs thumbs" "missing missing missing" "action action action"; row-gap: 8px; column-gap: 10px; padding: 12px; }
  .pr-pos { grid-area: pos; align-self: start; font-size: 22px; line-height: 1.1; }
  .pr-value { grid-area: value; align-self: start; text-align: right; }
  .pr-value strong { font-size: 22px; line-height: 1.1; }
  .pr-value small { display: block; margin-top: 3px; }
  .pr-who { display: contents; }
  .pr-who > div:first-child { grid-area: order; display: flex; align-items: center; gap: 8px; min-width: 0; }
  .pr-who > div:first-child > b { font-size: 15px; line-height: 1.2; }
  .pr-who > span { grid-area: name; align-self: start; min-width: 0; margin-top: -6px; }
  .pr-who > .pr-marks { grid-area: marks; align-self: start; display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
  .pr-who > .pr-marks:empty { display: none; }
  .pr-thumbs { grid-area: thumbs; }
  .pr-missing { grid-area: missing; }
  .pr-action { grid-area: action; justify-self: stretch; }
  .pr-btn { width: 100%; justify-content: center; height: 42px; }

  .priority-period-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .priority-periods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .priority-periods button { padding: 0 6px; }
  .priority-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .priority-metrics article { border-right: 0; border-bottom: 1px solid #e5e5e5; }
  .priority-metrics article:nth-child(odd) { border-right: 1px solid #e5e5e5; }
  .priority-metrics article:last-child { grid-column: 1 / -1; border-right: 0; }
  .priority-metrics small { white-space: normal; }
  .priority-board { grid-template-columns: 1fr; padding: 10px; }

  /* ---------- Pedidos: lista ---------- */
  .orders-approved-workspace { display: block; }
  .pz-toolbar { padding: 12px; gap: 10px; }
  .pz-toolbar-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .pz-toolbar-actions > * { width: 100%; justify-content: center; }
  .pz-search { height: 44px; padding: 0 12px; }
  .pz-filters { flex-direction: column; align-items: stretch; padding: 0 12px 12px; }
  .pz-chips { display: grid; grid-template-columns: 1fr 1fr; }
  .pz-chips .pz-chip { justify-content: space-between; height: auto; min-height: 38px; padding: 6px 10px; line-height: 1.2; text-align: left; }
  .pz-modfilter { flex-direction: column; align-items: stretch; }
  .pz-seg { display: flex; flex-wrap: wrap; }
  .pz-seg button { flex: 1 1 30%; justify-content: center; border-left: 0; border-top: 1px solid #d4d4d4; margin-top: -1px; }
  .pz-pagination { padding: 12px; }
  .pz-pagination-controls { width: 100%; }

  /* cada pedido vira um cartão em coluna */
  .pz-row, .pz-row.has-bulk-selection { grid-template-columns: 6px minmax(0, 1fr); grid-auto-rows: auto; padding-right: 0; }
  .pz-row > .pz-bar { grid-column: 1; grid-row: 1 / span 5; }
  .pz-row > :not(.pz-bar) { grid-column: 2; }
  .pz-row > .pz-bulk-selection { justify-self: start; padding: 10px 12px 0; }
  .pz-strip { justify-content: flex-start; padding: 6px 12px; }
  .pz-strip:not(:has(span)) { display: none; }
  .pz-strip span { writing-mode: horizontal-tb; transform: none; letter-spacing: .12em; }
  .pz-who { padding: 12px 12px 4px; }
  .pz-who small { overflow-wrap: anywhere; }
  .pz-pieces { padding: 4px 12px; }
  .pz-piece { grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "photo name tag"; align-items: center; column-gap: 10px; padding: 6px 0; }
  .pz-piece > :first-child { grid-area: photo; align-self: center; }
  .pz-piece > .pz-piece-name { grid-area: name; min-width: 0; line-height: 1.3; }
  .pz-piece > .pz-piece-name .pz-muted { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; }
  .pz-piece > div { grid-area: tag; min-width: 0; justify-self: end; }
  .pz-piece .pz-tag { max-width: 100%; }
  .pz-right { padding: 6px 12px 12px; }
  .pz-block-head { flex-wrap: wrap; }
  .pz-code { flex-wrap: wrap; }
  .pz-code b { overflow-wrap: anywhere; }
  .pz-order-production-actions .pz-btn { flex: 1 1 140px; justify-content: center; }

  /* ---------- Pedidos: detalhe (tela cheia) ---------- */
  .pz-panel { width: 100%; }
  .pz-panel-head { flex-wrap: wrap; gap: 10px; padding: 16px 14px 12px; }
  .pz-panel-head b { font-size: 22px; }
  .pz-card { margin: 0 14px; padding: 14px; }
  .pz-card-code { flex-wrap: wrap; }
  .pz-card-code b { font-size: 20px; overflow-wrap: anywhere; }
  .pz-copy-big { width: 100%; justify-content: center; }
  .pz-manual-order-status, .pz-marks-row, .pz-section, .pz-legend { margin-left: 14px; margin-right: 14px; }
  .pz-contacts { grid-template-columns: 1fr; margin: 14px 14px 0; }
  .pz-ppiece { grid-template-columns: 48px minmax(0, 1fr); row-gap: 6px; }
  .pz-ppiece > :nth-child(3) { grid-column: 2; }
  .pz-event { grid-template-columns: 14px minmax(0, 1fr); }
  .pz-event > :nth-child(3) { grid-column: 2; }
  .pz-note-form { flex-direction: column; }

  /* ---------- Fila de peças ---------- */
  .fz-tabs { padding: 0 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .fz-tabs::-webkit-scrollbar { display: none; }
  .fz-tabs button { flex: 0 0 auto; justify-content: center; height: 44px; padding: 0 12px; white-space: nowrap; }
  .fz-toolbar { padding: 12px; }
  .fz-toolbar > * { max-width: 100%; }
  .fz-search { width: 100%; height: 42px; }
  .fz-legends { padding: 0 12px 12px; }
  .fz-summary { margin: 0 12px 12px; }
  .fz-tiles { flex-direction: column; }
  .fz-tile strong { font-size: 30px; }
  .fz-tile small { white-space: normal; }
  .fz-tile-actions, .fz-selection-actions { display: grid; grid-template-columns: 1fr; }
  .fz-tile-actions .fz-btn, .fz-selection-actions .fz-btn { width: 100%; }
  .fz-bulk-status { flex-wrap: wrap; }
  .fz-bulk-status select { min-width: 0; width: 100%; }
  .fz-cards { flex-direction: column; overflow-x: visible; }
  .fz-card { flex: 0 0 auto; }
  .fz-body { padding: 0 8px; }
  .fz-head { display: none; }

  .fz-phead { display: grid; grid-template-columns: 22px 50px minmax(0, 1fr); grid-template-areas: "check photo info" "counts counts counts" "blocks blocks blocks"; gap: 10px; padding: 12px; }
  .fz-phead > input { grid-area: check; }
  .fz-phead > :nth-child(2) { grid-area: photo; }
  .fz-pinfo { grid-area: info; }
  .fz-counts { grid-area: counts; flex-wrap: wrap; justify-content: flex-start; gap: 12px; padding: 10px 0 0; border: 0; border-top: 1px solid #333; }
  .fz-num { min-width: 64px; }
  .fz-num strong { font-size: 28px; }
  .fz-blocks { grid-area: blocks; align-items: stretch; white-space: normal; }
  .fz-blocks .fz-seg { display: grid; grid-auto-flow: column; }
  .fz-grid { flex-wrap: wrap; }
  .fz-product-actions { padding: 10px 12px; }
  .fz-product-actions > * { width: 100%; }
  .fz-color { flex-wrap: wrap; padding: 10px 12px; }
  .fz-color .fz-grid { margin-left: 0; width: 100%; }

  /* cada peça vira um cartão de 3 linhas */
  .fz-row { grid-template-columns: 22px 40px minmax(0, 1fr) auto; grid-template-areas: "check photo order size" "check photo cust cust" ". . svc days" ". . print print" ". . state state"; gap: 4px 10px; min-height: 0; padding: 10px 12px; }
  .fz-row > input { grid-area: check; align-self: start; margin-top: 4px; }
  .fz-row > :nth-child(2) { grid-area: photo; align-self: start; }
  .fz-row > .fz-order { grid-area: order; }
  .fz-row > .fz-cust { grid-area: cust; }
  .fz-row > :nth-child(5) { grid-area: size; justify-self: end; }
  .fz-row > :nth-child(6) { grid-area: svc; justify-self: start; }
  .fz-row > .fz-days { grid-area: days; justify-self: end; white-space: nowrap; }
  .fz-row > :nth-child(8) { grid-area: print; }
  .fz-row > .fz-state { grid-area: state; justify-self: stretch; }
  .fz-state .fz-picker, .fz-state .fz-status { width: 100%; }
  .fz-state .fz-status { justify-content: center; height: 36px; }
  .fz-locked { align-items: flex-start; }
  .fz-menu { left: 0; right: 0; width: auto; }

  /* ---------- visual de app: topo preto, resto branco, sem margem lateral nem moldura ---------- */
  body, .app-shell, .main, .view { background: #fff; }
  .main { padding: 0 0 28px; }
  .topbar { padding: 12px; background: #fafafa; } /* topo igual ao anterior (fundo branco, ícones pretos); só o respiro lateral, já que a página não tem mais margem */
  .mobile-menu-button { margin-left: -6px; }
  .topbar-actions { margin-right: -6px; }

  /* caixas de cada tela viram parte da página (sem contorno) */
  .panel, .pz-list, .fz-fila, .priority-metrics, .priorities-workspace { border: 0; border-radius: 0; box-shadow: none; background: #fff; }
  .orders-approved-workspace { margin-inline: 0; }
  .orders-approved-list { padding: 0; }
  .pz-pagination { background: #fff; }
  .priority-board { background: #fff; padding: 0 12px 12px; }

  /* Prioridades: textos com respiro, cartões de ponta a ponta */
  .operation-lead, #priorityApprovedToggle, .pr-head, .priority-period-row, .production-no-status-alert { padding-inline: 12px; }
  .pr-list { gap: 0; }
  .pr-row { border: 0; border-top: 1px solid #e5e5e5; border-left: 6px solid #000; border-radius: 0; }
  .pr-row.is-late { border-left-color: #b52f3e; }
  .pr-empty { border: 0; }

  /* Pedidos mais limpo: busca e filtros em cinza claro, compactos */
  .pz-toolbar { padding: 10px 12px 8px; gap: 8px; }
  .pz-search { height: 40px; padding: 0 12px; gap: 8px; border: 1px solid #e2e2e2; border-radius: 8px; background: #fafafa; }
  .pz-search .pz-ic, .pz-search svg { color: #9a9a9a; }
  .pz-search input { font-size: 15px; }
  .pz-search input::placeholder { color: #a3a3a3; }
  .pz-search:focus-within { border-color: #bdbdbd; background: #fff; }
  .pz-toggle { font-size: 12.5px; font-weight: 500; color: #5f5f5f; }
  .pz-filters { gap: 8px; padding: 0 12px 10px; border-bottom: 1px solid #f0f0f0; }
  .pz-chips { gap: 6px; }
  .pz-chips .pz-chip { min-height: 32px; padding: 4px 10px; border: 1px solid #ececec; border-radius: 8px; background: #fff; color: #5f5f5f; font-size: 12.5px; font-weight: 500; }
  .pz-chips .pz-chip small { font-size: 11px; color: #9a9a9a; opacity: 1; }
  .pz-chips .pz-chip.is-on { border-color: #d6d6d6; background: #f2f2f2; color: #111; font-weight: 600; }
  .pz-chips .pz-chip.is-on small { color: #5f5f5f; }
  .pz-modfilter { gap: 6px; }
  .pz-modfilter > small { font-size: 10px; font-weight: 600; letter-spacing: .08em; color: #9a9a9a; }
  .pz-seg { flex-wrap: nowrap; border: 1px solid #ececec; border-radius: 8px; overflow: hidden; }
  .pz-seg button { flex: 1 1 0; min-width: 0; height: 30px; margin: 0; padding: 0 4px; border: 0; border-left: 1px solid #ececec; background: #fff; color: #5f5f5f; font-size: 12px; font-weight: 500; white-space: nowrap; }
  .pz-seg button:first-child { border-left: 0; }
  .pz-seg button small { font-size: 10.5px; color: #9a9a9a; opacity: 1; }
  .pz-seg button.is-on { background: #f2f2f2; color: #111; font-weight: 600; }
  .pz-seg button.is-on .pz-ic { color: inherit; }

  /* Fila de peças: produtos de ponta a ponta */
  .fz-body { padding: 0; }
  .fz-product { border-left: 0; border-right: 0; }
  .fz-summary { margin-inline: 12px; }
  #productionQueueEmpty { margin-inline: 12px; }

  /* Pedidos: funil ao lado da busca; filtros (abas + modalidade) numa janela que sobe de baixo */
  .pz-filters-backdrop { display: none; }
  .pz-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) 40px; align-items: center; }
  .pz-toolbar .pz-search { grid-column: 1; min-width: 0; }
  .pz-toolbar-actions { grid-column: 1 / -1; }
  .pz-filter-open { position: relative; display: grid; place-items: center; grid-column: 2; grid-row: 1; width: 40px; height: 40px; padding: 0; border: 1px solid #e2e2e2; border-radius: 8px; background: #fafafa; color: #111; }
  .pz-filter-open b { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #111; color: #fff; font-size: 10.5px; line-height: 17px; text-align: center; }
  .pz-filters { display: none; }
  .pz-filters-head, .pz-filters-done { display: none; }
  body.pz-filters-open { overflow: hidden; }
  body.pz-filters-open .pz-filters-backdrop { display: block; position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .32); }
  body.pz-filters-open .pz-filters { display: flex; flex-direction: column; gap: 16px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 91; max-height: 85vh; overflow-y: auto; padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); border: 0; border-radius: 16px 16px 0 0; background: #fff; box-shadow: 0 -8px 30px rgba(0, 0, 0, .12); }
  body.pz-filters-open .pz-filters-head { display: flex; align-items: center; justify-content: space-between; }
  .pz-filters-head b { font-size: 16px; font-weight: 600; color: #111; }
  .pz-filters-close { width: 32px; height: 32px; padding: 0; border: 0; background: transparent; color: #5f5f5f; font-size: 26px; line-height: 1; }
  body.pz-filters-open .pz-filters-done { display: block; width: 100%; height: 44px; border: 0; border-radius: 10px; background: #111; color: #fff; font-size: 15px; font-weight: 600; }
  body.pz-filters-open .pz-chips { grid-template-columns: 1fr 1fr; gap: 8px; }
  body.pz-filters-open .pz-chips .pz-chip { min-height: 40px; }
  body.pz-filters-open .pz-seg button { height: 38px; }

  /* Situação das peças: fundo claro (cor bem fraca), borda fina da mesma cor; ícones de tecido, tesoura e agulha */
  .pz-tag.pz-p-nao_informado, .production-status-menu button[data-production-tone="nao_informado"], .production-status-trigger[data-production-tone="nao_informado"] { --st: #6b6b6b; }
  .pz-tag.pz-p-so_tecido, .production-status-menu button[data-production-tone="so_tecido"], .production-status-trigger[data-production-tone="so_tecido"] { --st: #8a6a3e; }
  .pz-tag.pz-p-separado, .production-status-menu button[data-production-tone="separado"], .production-status-trigger[data-production-tone="separado"] { --st: #5b4bb2; }
  .pz-tag.pz-p-cortada, .production-status-menu button[data-production-tone="cortada"], .production-status-trigger[data-production-tone="cortada"] { --st: #c2560c; }
  .pz-tag.pz-p-na_costura, .production-status-menu button[data-production-tone="na_costura"], .production-status-trigger[data-production-tone="na_costura"] { --st: #1d7a8c; }
  .pz-tag.pz-p-pronta, .production-status-menu button[data-production-tone="pronta"], .production-status-trigger[data-production-tone="pronta"] { --st: #137549; }
  .pz-tag.pz-p-enviada, .production-status-menu button[data-production-tone="enviada"], .production-status-trigger[data-production-tone="enviada"] { --st: #7a7a7a; }
  .pz-tag.pz-p-falta_molde, .production-status-menu button[data-production-tone="falta_molde"], .production-status-trigger[data-production-tone="falta_molde"] { --st: #9b1c48; }
  .pz-tag.pz-p-esperando_estamparia, .production-status-menu button[data-production-tone="esperando_estamparia"], .production-status-trigger[data-production-tone="esperando_estamparia"] { --st: #c2410c; }
  .pz-tag.pz-p-falta_tecido, .production-status-menu button[data-production-tone="falta_tecido"], .production-status-trigger[data-production-tone="falta_tecido"] { --st: #b52f3e; }
  .pz-tag.pz-p-falta_aviamento, .production-status-menu button[data-production-tone="falta_aviamento"], .production-status-trigger[data-production-tone="falta_aviamento"] { --st: #7c2d12; }
  .pz-tag.pz-p-cancelada, .production-status-menu button[data-production-tone="cancelada"], .production-status-trigger[data-production-tone="cancelada"] { --st: #3a3a3a; }
  .pz-tag[class*="pz-p-"], .production-status-menu button[data-production-tone], .production-status-trigger[data-production-tone] { background: color-mix(in srgb, var(--st, #6b6b6b) 5%, #fff) !important; color: color-mix(in srgb, var(--st, #6b6b6b) 88%, #000) !important; border: 1px solid var(--st, #6b6b6b) !important; }
  .production-status-menu button[data-production-tone] { margin-bottom: 6px; }
  .pz-tag[class*="pz-p-"], .production-status-menu button[data-production-tone], .production-status-trigger[data-production-tone] { border-radius: 999px !important; font-weight: 500 !important; }
  .production-status-menu button.current { box-shadow: inset 0 0 0 1px var(--st); font-weight: 600 !important; }
  .pz-p-so_tecido, [data-production-tone="so_tecido"] { --ic: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cellipse%20cx%3D%224.5%22%20cy%3D%228%22%20rx%3D%222.2%22%20ry%3D%225%22/%3E%3Cpath%20d%3D%22M4.5%203H12c-1%201.7%201%203.3%200%205s1%203.3%200%205H4.5%22/%3E%3Cpath%20d%3D%22M4.5%206.5h1%22/%3E%3C/svg%3E"); }
  .pz-p-cortada, [data-production-tone="cortada"] { --ic: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%224%22%20cy%3D%224.5%22%20r%3D%222%22/%3E%3Ccircle%20cx%3D%224%22%20cy%3D%2211.5%22%20r%3D%222%22/%3E%3Cpath%20d%3D%22M5.7%205.6L14%2012.6M5.7%2010.4L14%203.4%22/%3E%3C/svg%3E"); }
  .pz-p-na_costura, [data-production-tone="na_costura"] { --ic: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M2.5%2013.5L11.2%204.8%22/%3E%3Cpath%20d%3D%22M11.2%204.8l1.6-1.6a1%201%200%200%201%201.4%201.4l-1.6%201.6z%22/%3E%3Cpath%20d%3D%22M13.5%204.5c1.8%202.5-.5%204.5-2.5%205.3s-3.5%202.4-1.8%204.2%22/%3E%3C/svg%3E"); }
  .pz-tag:is(.pz-p-so_tecido, .pz-p-cortada, .pz-p-na_costura) > .pz-ic:first-child { display: none; }
  .pz-tag:is(.pz-p-so_tecido, .pz-p-cortada, .pz-p-na_costura)::before { content: ""; flex: none; width: 13px; height: 13px; background: currentColor; -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; }
  .production-status-menu button:is([data-production-tone="so_tecido"], [data-production-tone="cortada"], [data-production-tone="na_costura"]) > i, .production-status-trigger:is([data-production-tone="so_tecido"], [data-production-tone="cortada"], [data-production-tone="na_costura"]) span > i { display: inline-block; width: 13px; height: 13px; font-size: 0; vertical-align: -2px; background: currentColor; -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; }

  /* Fotos dos produtos na proporção 4:5 (mesma largura, altura 25% maior) */
  .pz-photo, .fz-photo { object-fit: cover; max-height: none !important; }
  :is(.pz-photo, .fz-photo)[style*="width:36px"] { height: 45px !important; }
  :is(.pz-photo, .fz-photo)[style*="width:40px"] { height: 50px !important; }
  :is(.pz-photo, .fz-photo)[style*="width:42px"] { height: 53px !important; }
  :is(.pz-photo, .fz-photo)[style*="width:54px"] { width: 48px !important; height: 60px !important; }

  /* Prioridades: escolha (Por pedido / Por ação e filtros) no mesmo visual dos filtros de Pedidos */
  .pr-toggle { display: flex; border: 1px solid #ececec; border-radius: 8px; overflow: hidden; }
  .pr-toggle button { flex: 1 1 0; min-width: 0; min-height: 38px; padding: 6px 8px; border: 0; border-left: 1px solid #ececec; background: #fff; color: #5f5f5f; font-size: 12.5px; font-weight: 500; line-height: 1.2; }
  .pr-toggle button:first-child { border-left: 0; }
  .pr-toggle button.is-on { background: #f2f2f2; color: #111; font-weight: 600; }
  .pr-filters { gap: 8px; }
  .pr-filters .pz-chip { min-height: 40px; padding: 4px 10px; border: 1px solid #ececec; border-radius: 8px; background: #fff; color: #5f5f5f; font-size: 12.5px; font-weight: 500; }
  .pr-filters .pz-chip small { font-size: 11px; color: #9a9a9a; opacity: 1; }
  .pr-filters .pz-chip.is-on { border-color: #d6d6d6; background: #f2f2f2; color: #111; font-weight: 600; }
  .pr-filters .pz-chip.is-on small { color: #5f5f5f; }

  /* Prioridades: botão "Ver resumo diário" no visual cinza dos filtros; toggle + funil na mesma linha; filtros na janela */
  .priorities-lead #openDailyReport { height: 40px; border: 1px solid #e2e2e2; border-radius: 8px; background: #fafafa; color: #5f5f5f; font-size: 13px; font-weight: 500; box-shadow: none; }
  .pr-bar { display: grid; grid-template-columns: minmax(0, 1fr) 40px; gap: 8px; align-items: center; }
  .pr-bar .pz-filter-open { grid-column: 2; grid-row: 1; height: 40px; }
  .pr-bar .pr-toggle { grid-column: 1; grid-row: 1; min-height: 40px; }
  .pr-bar .pr-filters { display: none; }
  .pr-filters-backdrop { display: none; }
  body:is(.pr-filters-open, .pr-period-open) { overflow: hidden; }
  body:is(.pr-filters-open, .pr-period-open) .pr-filters-backdrop { display: block; position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .32); }
  body.pr-filters-open .pr-bar .pr-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 91; max-height: 85vh; overflow-y: auto; padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 16px 16px 0 0; background: #fff; box-shadow: 0 -8px 30px rgba(0, 0, 0, .12); }
  body.pr-filters-open .pr-filters .pz-filters-head { display: flex; grid-column: 1 / -1; align-items: center; justify-content: space-between; margin-bottom: 8px; }
  body.pr-filters-open .pr-filters .pz-filters-done { display: block; grid-column: 1 / -1; width: 100%; height: 44px; margin-top: 8px; border: 0; border-radius: 10px; background: #111; color: #fff; font-size: 15px; font-weight: 600; }

  .pr-toggle button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
  .pr-toggle .pr-tg-main { font-size: 14px; font-weight: 600; color: #111; }
  .pr-toggle .pr-tg-sub { font-size: 11px; font-weight: 400; color: #7a7a7a; }
  .pr-toggle button:not(.is-on) .pr-tg-main { color: #5f5f5f; }
  .pr-bar .pr-toggle button { min-height: 46px; }
  .pr-bar .pz-filter-open { height: 46px; }
  .pz-sep, .pr-tg-p { display: none; }

  /* Prioridades: título da lista no tamanho do texto, com ":" e o valor dos 5 primeiros em negrito */
  .pr-colon { display: inline; }
  .pr-head { display: block; }
  .pr-head > b, .pr-head > span { display: inline; font-size: 13px; font-weight: 400; color: #5f5f5f; }
  .pr-head > b { display: block; margin-bottom: 2px; }
  .pr-head .pr-top { font-size: 15px; font-weight: 700; color: #111; white-space: nowrap; }

  /* Por pedido / Por ação: dois botões separados, igual aos filtros (selecionado = fundo cinza-claro e borda um pouco mais escura) */
  .pr-toggle { gap: 8px; border: 0; border-radius: 0; overflow: visible; }
  .pr-toggle button, .pr-toggle button:first-child { border: 1px solid #ececec; border-radius: 8px; background: #fff; }
  .pr-toggle button.is-on { border-color: #d6d6d6; background: #f2f2f2; }

  /* Período (Hoje / Ontem / Últimos 7 dias) só pelo calendário, na mesma janela dos filtros */
  .pr-bar .pr-period-open { grid-column: 2; grid-row: 1; }
  #prioritiesView .priority-period-row { display: none; }
  body.pr-period-open #prioritiesView .priority-period-row { display: flex; flex-direction: column; gap: 12px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 91; margin: 0; max-height: 85vh; overflow-y: auto; padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 16px 16px 0 0; background: #fff; box-shadow: 0 -8px 30px rgba(0, 0, 0, .12); }
  body.pr-period-open .priority-period-row .pz-filters-head { display: flex; align-items: center; justify-content: space-between; }
  body.pr-period-open .priority-period-row .pz-filters-done { display: block; width: 100%; height: 44px; border: 0; border-radius: 10px; background: #111; color: #fff; font-size: 15px; font-weight: 600; }
  .priority-period-row .priority-periods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border: 0; }
  .priority-period-row .priority-periods button { min-height: 40px; border: 1px solid #ececec; border-radius: 8px; background: #fff; color: #5f5f5f; font-size: 12.5px; font-weight: 500; }
  .priority-period-row .priority-periods button.active { border-color: #d6d6d6; background: #f2f2f2; color: #111; font-weight: 600; }
  .priority-period-row > small { font-size: 12px; color: #9a9a9a; }

  /* Fila: "Selecionadas" sai do topo e vira a barra de baixo do app da Gabi (vidro branco), só quando há peça marcada */
  .fz-tile.fz-tile-now.is-empty { display: none; }
  .fz-tile.fz-tile-now { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "clear count all" "status status print"; align-items: center; gap: 8px 10px; margin: 0; padding: 8px 16px calc(10px + env(safe-area-inset-bottom)); border: 0; border-top: .5px solid rgba(255, 255, 255, .7); border-radius: 0; background: rgba(255, 255, 255, .72); -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px); box-shadow: 0 -6px 24px rgba(0, 0, 0, .08), inset 0 1px 0 rgba(255, 255, 255, .8); color: #141010; }
  .fz-tile-now > div:first-child { grid-area: count; display: block; text-align: center; padding-bottom: 8px; border-bottom: .5px solid rgba(0, 0, 0, .08); }
  .fz-tile-now > div:first-child small, .fz-tile-now > div:first-child span { display: none; }
  .fz-tile-now > div:first-child strong { font-size: 12px; font-weight: 500; color: rgba(0, 0, 0, .5); }
  .fz-tile-now .fz-bulk-actions, .fz-tile-now .fz-selection-actions { display: contents; }
  .fz-tile-now .fz-selection-actions .fz-btn { width: auto; height: auto; min-height: 0; padding: 0 0 8px; border: 0; border-bottom: .5px solid rgba(0, 0, 0, .08); border-radius: 0; background: transparent; color: #141010; font-size: 13px; font-weight: 600; box-shadow: none; }
  .fz-tile-now [data-fz-clear-selection] { grid-area: clear; text-align: left; }
  .fz-tile-now [data-fz-select-all-visible] { grid-area: all; text-align: right; }
  .fz-tile-now [data-fz-select-all-visible] { font-size: 0 !important; }
  .fz-tile-now [data-fz-select-all-visible]::after { content: "Selecionar todas"; font-size: 13px; }
  .fz-tile-now .fz-bulk-status { grid-area: status; display: flex; flex-direction: column; gap: 3px; min-width: 0; margin: 0; padding: 0; border: 0; background: transparent; }
  .fz-tile-now .fz-bulk-status > span { font-size: 11px; font-weight: 500; color: rgba(0, 0, 0, .5); }
  .fz-tile-now .fz-bulk-status select { width: 100%; height: 40px; padding: 0 10px; border: 1px solid #e2e2e2; border-radius: 8px; background: #fff; color: #141010; font-size: 14px; }
  .fz-tile-now [data-fz-print] { grid-area: print; align-self: end; width: auto; max-width: 150px; min-height: 40px; height: auto; padding: 4px 12px; border-radius: 8px; font-size: 13px; line-height: 1.15; white-space: normal; }
  body:has(.fz-tile-now:not(.is-empty)) .main { padding-bottom: 150px; }

  /* Fila: busca + funil; filtros (Não impressas/Todas e situações) na janela de baixo */
  .fz-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) 40px; gap: 8px; align-items: center; }
  .fz-toolbar .fz-search { grid-column: 1; min-width: 0; height: 40px; border: 1px solid #e2e2e2; border-radius: 8px; background: #fafafa; }
  .fz-toolbar .pz-filter-open { grid-column: 2; grid-row: 1; }
  .fz-filters-sheet, .fz-filters-backdrop { display: none; }
  body.fz-filters-open { overflow: hidden; }
  body.fz-filters-open .fz-filters-backdrop { display: block; position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .32); }
  body.fz-filters-open .fz-filters-sheet { display: flex; flex-direction: column; gap: 12px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 91; max-height: 85vh; overflow-y: auto; padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 16px 16px 0 0; background: #fff; box-shadow: 0 -8px 30px rgba(0, 0, 0, .12); }
  .fz-filters-sheet .pz-filters-head { display: flex; align-items: center; justify-content: space-between; }
  .fz-filters-sheet .pz-filters-done { display: block; width: 100%; height: 44px; margin-top: 4px; border: 0; border-radius: 10px; background: #111; color: #fff; font-size: 15px; font-weight: 600; }
  .fz-sheet-print { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .fz-sheet-print .pz-chip { justify-content: space-between; min-height: 40px; padding: 4px 10px; border: 1px solid #ececec; border-radius: 8px; background: #fff; color: #5f5f5f; font-size: 12.5px; font-weight: 500; }
  .fz-sheet-print .pz-chip small { font-size: 11px; color: #9a9a9a; opacity: 1; }
  .fz-sheet-print .pz-chip.is-on { border-color: #d6d6d6; background: #f2f2f2; color: #111; font-weight: 600; }
  .fz-sheet-label { font-size: 10px; font-weight: 600; letter-spacing: .08em; color: #9a9a9a; }
  .fz-sheet-status .fz-legends { display: flex; flex-wrap: wrap; gap: 8px 12px; padding: 0; }
  .fz-sheet-status .fz-legend.is-on { outline: 0; }
  .fz-sheet-status .fz-legend.is-on .pz-tag { box-shadow: 0 0 0 2px var(--st, #111); }

  /* Topo sempre fixo ao rolar */
  .topbar { position: sticky; top: 0; z-index: 70; padding-top: calc(12px + env(safe-area-inset-top)); }

  /* Prioridades: peças que faltam no mesmo layout de Pedidos (nome, variante embaixo, situação à direita) */
  .pr-missing > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 10px; padding: 4px 0; }
  .pr-missing > div > span:not(.pr-thumb):not(.pz-tag) { min-width: 0; line-height: 1.3; }
  .pr-missing .pr-name { display: block; font-size: 13px; font-weight: 600; color: #111; }
  .pr-missing .pr-var { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: #7a7a7a; }
  .pr-missing > div > .pz-tag { justify-self: end; }

  /* Prioridades: foto ao lado do nome da peça que falta (borda e ícone mantidos); fileira de cima só com as prontas */
  .pr-missing > div.has-thumb { grid-template-columns: 62px minmax(0, 1fr) auto; }
  .pr-thumb { display: inline-flex !important; flex-direction: column; align-items: center; gap: 4px; }
  .pr-missing .pr-thumb { flex-direction: row !important; }
  .pr-missing .pr-thumb > .pz-ic { order: -1; flex: none; }
  .pr-thumb > .pr-photo { flex: none; box-sizing: border-box; }
  .pr-missing > div.has-thumb > .pr-thumb .pr-photo { width: 44px !important; height: 55px !important; }
  .pr-photo { object-fit: cover; max-height: none !important; max-width: none !important; }
  .pr-photo[style*="width:32px"] { width: 36px !important; height: 45px !important; }

  /* Fila: resumo compacto e claro (total a cortar + ações numa caixa só; "ficam na fila" numa linha) */
  .fz-tiles { gap: 6px; }
  .fz-tile.fz-tile-total { display: grid; grid-template-columns: 1fr; gap: 8px; min-height: 0; padding: 10px 12px; border: 1px solid #ececec; border-radius: 10px; background: #fafafa; color: #111; }
  .fz-tile-total > div:first-child { display: block; margin: 0; }
  .fz-tile-total > div:first-child small { display: block; margin-bottom: 2px; font-size: 10px; font-weight: 600; letter-spacing: .08em; color: #9a9a9a; }
  .fz-tile-total > div:first-child strong { display: inline; font-size: 18px; line-height: 1.2; color: #111; }
  .fz-tile-total > div:first-child span { display: inline; margin-left: 6px; font-size: 12px; color: #7a7a7a; }
  .fz-tile-total .fz-tile-actions { grid-template-columns: 1fr 1fr; gap: 6px; }
  .fz-tile-total .fz-tile-actions .fz-btn { height: 36px; min-height: 0; padding: 0 8px; border: 1px solid #e2e2e2; border-radius: 8px; background: #fff; color: #111; font-size: 12.5px; font-weight: 600; box-shadow: none; }
  .fz-tile-total .fz-tile-actions .fz-btn:first-child { border-color: #111; background: #111; color: #fff; }
  .fz-tile.fz-tile-rest { display: block; padding: 0 2px; border: 0; background: transparent; }
  .fz-tile.fz-tile-rest > div:first-child { display: block; margin: 0; }
  .fz-tile-rest small, .fz-tile-rest strong { display: inline !important; margin: 0 4px 0 0; }
  .fz-tile-rest small { font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; color: #7a7a7a; }
  .fz-tile-rest small::after { content: ":"; }
  .fz-tile-rest strong { font-size: 12px; font-weight: 700; color: #111; }
  .fz-tile-rest span { display: none; }
}

/* ---------- Fila de peças: abas Cortadas, Na costura e Costureiras (só celular) ---------- */
@media (max-width: 760px) {
  #productionQueue .production-legacy-actions { padding: 12px; gap: 8px; }
  #productionQueue .production-legacy-actions > .fz-btn { flex: 1 1 calc(50% - 4px); justify-content: center; }
  #productionQueue .production-manual-selection { flex: 1 1 100%; min-width: 0; }
  #productionQueue .production-manual-sewing-actions > .fz-btn-primary { flex: 1 1 100%; }
  #productionQueue .production-piece-line {
    grid-template-columns: 22px 45px minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto;
    column-gap: 12px; row-gap: 4px; align-items: center;
    padding: 12px; min-height: 0; font-size: 13px;
  }
  #productionQueue .production-piece-line > :nth-child(1) { grid-column: 1; grid-row: 1 / span 3; }
  #productionQueue .production-piece-line > .production-thumb { grid-column: 2; grid-row: 1 / span 3; width: 45px; height: 56px; align-self: start; }
  #productionQueue .production-piece-line > b { grid-column: 3; grid-row: 1; font-size: 14px; }
  #productionQueue .production-piece-line > strong { grid-column: 4; grid-row: 1; justify-self: end; }
  #productionQueue .production-piece-line > span:not(.production-thumb) { grid-column: 3 / -1; grid-row: 2; color: #555; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #productionQueue .production-piece-line > .production-status-trigger { display: inline-flex; align-items: center; gap: 8px; grid-column: 3; grid-row: 3; justify-self: start; width: auto; max-width: 100%; height: 30px; min-height: 0; padding: 0 12px; line-height: 1; font-size: 12px; text-decoration: none; text-transform: none; }
  #productionQueue .production-piece-line > .production-status-trigger > span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; text-decoration: none; }
  #productionQueue .production-piece-line > .production-status-trigger > span > i { margin: 0 !important; vertical-align: 0 !important; }
  #productionQueue .production-piece-line > .production-status-trigger > i { font-size: 8px; opacity: .7; }
  #productionQueue .production-piece-line > button:not(.production-status-trigger) { display: inline-block; grid-row: 3; grid-column: 4; justify-self: end; font-size: 12px; padding: 0; }
  #productionQueue .production-piece-line > button[data-return-piece] { grid-row: 4; grid-column: 3 / -1; justify-self: start; }
  #productionQueue .seamstress-card, #productionQueue .production-loose-card { padding: 12px; gap: 10px; }
  #productionQueue .production-manual-sewing-actions > .fz-btn { flex: 1 1 100%; }
  #productionQueue .fz-legacy-now.is-empty { display: none; }
  #productionQueue .fz-legacy-now { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "clear count all" "print print print"; align-items: center; gap: 8px 10px; padding: 8px 16px calc(10px + env(safe-area-inset-bottom)); border-top: .5px solid rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .72); -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px); box-shadow: 0 -6px 24px rgba(0, 0, 0, .08), inset 0 1px 0 rgba(255, 255, 255, .8); color: #141010; }
  #productionQueue .fz-legacy-now .production-manual-selection { grid-area: count; display: block; min-width: 0; flex: none; text-align: center; padding-bottom: 8px; border-bottom: .5px solid rgba(0, 0, 0, .08); }
  #productionQueue .fz-legacy-now .production-manual-selection small { display: none; }
  #productionQueue .fz-legacy-now .production-manual-selection b { font-size: 12px; font-weight: 500; color: rgba(0, 0, 0, .5); }
  #productionQueue .fz-legacy-now :is([data-clear-cut-selection], [data-select-all-cut-pieces]) { width: auto; height: auto; min-height: 0; padding: 0 0 8px; border: 0; border-bottom: .5px solid rgba(0, 0, 0, .08); border-radius: 0; background: transparent; color: #141010; font-size: 13px; font-weight: 600; box-shadow: none; }
  #productionQueue .fz-legacy-now [data-clear-cut-selection] { grid-area: clear; text-align: left; }
  #productionQueue .fz-legacy-now [data-select-all-cut-pieces] { grid-area: all; text-align: right; font-size: 0; }
  #productionQueue .fz-legacy-now [data-select-all-cut-pieces]::after { content: "Selecionar todas"; font-size: 13px; }
  #productionQueue .fz-legacy-now [data-create-sewing-order] { grid-area: print; width: 100%; height: 44px; border-radius: 8px; font-size: 14px; }
  body:has(.fz-legacy-now:not(.is-empty)) .main { padding-bottom: 130px; }
}

/* ---------- Fila de peças: Plano recomendado e Minha lista (A cortar e Cortadas) — só celular ---------- */
@media (max-width: 760px) {
  #productionQueue .ct-bar { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px; }
  #productionQueue .ct-modes { display: flex; width: 100%; }
  #productionQueue .ct-modes button { flex: 1 1 0; justify-content: center; height: auto; min-height: 40px; padding: 6px 8px; font-size: 12.5px; line-height: 1.15; white-space: normal; text-align: center; }
  #productionQueue .ct-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  #productionQueue .ct-actions:empty { display: none; }
  #productionQueue .ct-actions > * { width: 100%; height: auto; min-height: 40px; padding: 6px 10px; justify-content: center; font-size: 12.5px; line-height: 1.15; white-space: normal; text-align: center; }
  #productionQueue .ct-actions > .ct-link { min-height: 0; }
  #productionQueue .ct-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 12px 12px; }
  #productionQueue .ct-tile { padding: 12px 14px; }
  #productionQueue .ct-tile:first-child { grid-column: 1 / -1; }
  #productionQueue .ct-tile small { font-size: 10px; }
  #productionQueue .ct-tile strong { font-size: 24px; white-space: normal; }
  #productionQueue .ct-tile span { font-size: 12px; }
  #productionQueue .ct-cols { flex-direction: column; align-items: stretch; gap: 12px; padding: 0 12px 16px; }
  #productionQueue .ct-main, #productionQueue .ct-side { flex: none; width: 100%; min-width: 0; }

  /* lote da costura */
  #productionQueue .cs-lhead { flex-wrap: wrap; gap: 10px 12px; padding: 12px; }
  #productionQueue .cs-lhead > strong { font-size: 22px; min-width: 0; }
  #productionQueue .cs-linfo { flex: 1 1 0; }
  #productionQueue .cs-linfo > span:not(.cs-thread) { white-space: normal; }
  #productionQueue .cs-lstat { order: 3; min-width: 0; padding-left: 10px; }
  #productionQueue .cs-lstat strong { font-size: 18px; }
  #productionQueue .cs-seam { order: 4; flex-basis: 100%; }
  #productionQueue .cs-model { flex-wrap: wrap; gap: 6px 10px; padding: 10px 12px; }
  #productionQueue .cs-model > i { display: none; }
  #productionQueue .cs-model > b:last-child { margin-left: auto; }
  #productionQueue .cs-row { grid-template-columns: minmax(0, 1fr) auto; grid-auto-rows: auto; row-gap: 6px; padding: 10px 12px; }
  #productionQueue .cs-row > b { grid-column: 1; grid-row: 1; }
  #productionQueue .cs-row > .fz-size { grid-column: 2; grid-row: 1; justify-self: end; }
  #productionQueue .cs-row > span:not(.fz-size):not(.ct-fate):not(.cs-loose) { grid-column: 1 / -1; grid-row: 2; color: #555; }
  #productionQueue .cs-row > div { grid-column: 1; grid-row: 3; }
  #productionQueue .cs-row > :last-child:is(.ct-fate, .cs-loose) { grid-column: 2; grid-row: 3; justify-self: end; text-align: right; }
  #productionQueue .cs-row-mm { grid-template-columns: minmax(0, 1fr) auto; }
  #productionQueue .cs-row-mm > .ct-mmsizes { grid-column: 1 / -1; grid-row: 2; }
  #productionQueue .cs-row-mm > b { grid-column: 2; grid-row: 1; }
  #productionQueue .cs-lfoot { flex-direction: column; padding: 10px 12px; }
  #productionQueue .cs-lfoot .fz-btn { width: 100%; height: auto; min-height: 40px; justify-content: center; white-space: normal; }

  /* corte (A cortar) */
  #productionQueue .ct-chead { flex-wrap: wrap; gap: 10px 12px; padding: 12px; }
  #productionQueue .ct-ord { font-size: 22px; min-width: 0; }
  #productionQueue .ct-cinfo { flex: 1 1 0; }
  #productionQueue .ct-pulled { white-space: normal; }
  #productionQueue .ct-chead > .ct-grid { order: 4; flex: 1 1 100%; max-width: 100%; overflow-x: auto; }
  #productionQueue .ct-cinfo { flex: 1 1 0 !important; min-width: 0; }
  #productionQueue .ct-reason:empty { display: none; }
  #productionQueue .ct-cstat { order: 5; flex-basis: 100%; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; padding: 8px 0 0; border-left: 0; border-top: 1px solid #333; }
  #productionQueue .ct-cstat strong { font-size: 18px; }
  #productionQueue .ct-row { grid-template-columns: 22px 34px minmax(0, 1fr) auto; row-gap: 6px; padding: 10px 12px; }
  #productionQueue .ct-row > :nth-child(1) { grid-column: 1; grid-row: 1; }
  #productionQueue .ct-row > :nth-child(2) { grid-column: 2; grid-row: 1 / span 3; align-self: start; }
  #productionQueue .ct-row > :nth-child(3) { grid-column: 3; grid-row: 1; justify-self: start; }
  #productionQueue .ct-row > :nth-child(4) { grid-column: 3 / -1; grid-row: 2; color: #555; }
  #productionQueue .ct-row > :nth-child(5) { grid-column: 4; grid-row: 1; justify-self: end; }
  #productionQueue .ct-row > :nth-child(6) { grid-column: 3; grid-row: 3; }
  #productionQueue .ct-row > :nth-child(7) { grid-column: 4; grid-row: 3; justify-self: end; }
  #productionQueue .ct-row > :nth-child(8) { grid-column: 3 / -1; grid-row: 4; }
  #productionQueue .ct-mmrow { grid-template-columns: 24px minmax(0, 1fr) auto; row-gap: 6px; padding: 10px 12px; }
  #productionQueue .ct-mmrow > .ct-mmsizes, #productionQueue .ct-mmrow > .ct-mmreach { grid-column: 1 / -1; white-space: normal; }
  #productionQueue .ct-out { padding: 9px 12px; }
  #productionQueue .ct-rest-head { flex-wrap: wrap; padding: 12px; }
  #productionQueue .ct-rest-row, #productionQueue .ct-rest-mm { grid-template-columns: 40px minmax(0, 1fr) auto; row-gap: 6px; padding: 8px 12px; }
  #productionQueue .ct-rest-row > :nth-child(n+4) { grid-column: 2 / -1; }

  /* listas (Minha lista) */
  #productionQueue .ct-list { margin: 0 12px 12px; }
  #productionQueue .ct-lhead { flex-wrap: wrap; gap: 8px; padding: 12px; }
  #productionQueue .ct-lhead > div { flex: 1 1 100%; }
  #productionQueue .ct-lhead .ct-field { flex: 1 1 100%; }
  #productionQueue .ct-lhead > .fz-btn { flex: 1 1 auto; justify-content: center; height: auto; min-height: 40px; white-space: normal; }
  #productionQueue .ct-lhead > .ct-grow { display: none; }
  #productionQueue .ct-lth { display: none; }
  #productionQueue .ct-lrow { grid-template-columns: 14px 28px minmax(0, 1fr) 20px; row-gap: 6px; padding: 10px 12px; }
  #productionQueue .ct-lrow > :nth-child(1) { grid-column: 1; grid-row: 1; }
  #productionQueue .ct-lrow > :nth-child(2) { grid-column: 2; grid-row: 1; }
  #productionQueue .ct-lrow > :nth-child(3) { grid-column: 3; grid-row: 1; }
  #productionQueue .ct-lrow > :nth-child(n+4):not(:last-child) { grid-column: 3 / -1; }
  #productionQueue .ct-lrow > :last-child { grid-column: 4; grid-row: 1; }
  #productionQueue .cs-lrow { grid-template-columns: 14px minmax(0, 1fr) auto 20px; row-gap: 6px; padding: 10px 12px; }
  #productionQueue .cs-lrow > :nth-child(1) { grid-column: 1; grid-row: 1; }
  #productionQueue .cs-lrow > :nth-child(2) { grid-column: 2 / 4; grid-row: 1; }
  #productionQueue .cs-lrow > :nth-child(3) { grid-column: 2; grid-row: 2; justify-self: start; }
  #productionQueue .cs-lrow > :nth-child(4) { grid-column: 3 / -1; grid-row: 2; justify-self: end; }
  #productionQueue .cs-lrow > :nth-child(5), #productionQueue .cs-lrow > :nth-child(6) { grid-column: 2 / -1; }
  #productionQueue .cs-lrow > :last-child { grid-column: 4; grid-row: 1; }
  #productionQueue .ct-lfoot { flex-direction: column; align-items: stretch; padding: 12px; }
  #productionQueue .ct-lfoot > div { flex-direction: column; align-items: stretch; gap: 8px; }
  #productionQueue .ct-seg { display: flex; }
  #productionQueue .ct-seg button { flex: 1 1 0; height: auto; min-height: 36px; padding: 6px 8px; white-space: normal; }

  /* corte inteligente (pedido / peça) */
  #productionQueue .ct-lookup { flex-wrap: wrap; margin: 0 12px 12px; padding: 12px; }
  #productionQueue .ct-lookup > * { flex: 1 1 100%; }
  #productionQueue .ct-lookup > .ct-grow { display: none; }
  #productionQueue .ct-lookup > .fz-btn { height: auto; min-height: 40px; justify-content: center; white-space: normal; }
  #productionQueue .ct-result { margin: 0 12px; }
  #productionQueue .ct-rhead { flex-wrap: wrap; padding: 12px; }
  #productionQueue .ct-pth { display: none; }
  #productionQueue .ct-pcols, #productionQueue .ct-prow { grid-template-columns: minmax(0, 1fr); row-gap: 10px; }
  #productionQueue .ct-prow { padding: 12px; }
  #productionQueue .ct-todo, #productionQueue .ct-todo-cut { flex-wrap: wrap; }
}

/* ---------- Envios — só celular ---------- */
@media (max-width: 760px) {
  #shipmentsView .shipments-lead { display: none; }
  #shipmentsView .shipments-workspace { margin: 0; border-left: 0; border-right: 0; }
  #shipmentsView .shipments-toolbar { gap: 10px; padding: 12px; }
  #shipmentsView .shipments-toolbar > div:first-child { display: flex; align-items: baseline; gap: 8px; }
  #shipmentsView .shipments-toolbar > .shipments-toolbar-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  #shipmentsView .shipments-toolbar-actions > .search-box { grid-column: 1 / -1; grid-row: 1; width: 100%; height: 42px; }
  #shipmentsView .shipments-toolbar-actions > button { width: 100%; min-height: 38px; padding: 0 8px; font-size: 12.5px; justify-content: center; }
  #shipmentsView .shipments-toolbar-actions > #syncAllShopifyButton { grid-column: 1 / -1; }
  #shipmentsView .shipment-tabs { scrollbar-width: none; }
  #shipmentsView .shipment-tabs::-webkit-scrollbar { display: none; }
  #shipmentsView .shipment-tabs button { min-height: 46px; padding: 0 14px; font-size: 13px; }
  #shipmentsView .shipment-tabs b { min-width: 20px; height: 20px; margin-left: 6px; font-size: 11px; }

  #shipmentsView .shipments-grid.is-ready-list { overflow-x: visible; }
  #shipmentsView .shipment-ready-list { min-width: 0; }
  #shipmentsView .shipment-ready-toolbar { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px; }
  #shipmentsView .shipment-ready-tabs, #shipmentsView .shipment-ready-modalities { overflow-x: auto; scrollbar-width: none; }
  #shipmentsView .shipment-ready-tabs::-webkit-scrollbar, #shipmentsView .shipment-ready-modalities::-webkit-scrollbar { display: none; }
  #shipmentsView .shipment-ready-tabs button, #shipmentsView .shipment-ready-modalities button { flex: 0 0 auto; min-height: 36px; padding: 0 12px; white-space: nowrap; }
  #shipmentsView .shipment-ready-group > header { padding: 0 12px; }

  /* seleção: barra de baixo, só com pedido marcado (igual à Fila de peças) */
  #shipmentsView .shipment-bulk-bar:not(.is-active) { display: none; }
  #shipmentsView .shipment-bulk-bar.is-active { position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 80; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "all clear" "gen gen"; align-items: center; gap: 8px 10px; min-height: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border: 0; border-top: .5px solid rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .72); -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px); box-shadow: 0 -6px 24px rgba(0, 0, 0, .08), inset 0 1px 0 rgba(255, 255, 255, .8); color: #141010; }
  #shipmentsView .shipment-bulk-bar.is-active > div { display: contents; }
  #shipmentsView .shipment-bulk-bar.is-active .shipment-bulk-all { grid-area: all; min-width: 0; }
  #shipmentsView .shipment-bulk-bar.is-active .shipment-bulk-all > input:checked + span { border-color: #111; background: #111; color: #fff; }
  #shipmentsView .shipment-bulk-bar.is-active .shipment-bulk-all b { font-size: 13px; }
  #shipmentsView .shipment-bulk-bar.is-active .shipment-bulk-all small { color: rgba(0, 0, 0, .5); font-size: 11px; }
  #shipmentsView .shipment-bulk-bar.is-active .shipment-bulk-clear { grid-area: clear; min-height: 0; padding: 0; border: 0; color: #141010; font-size: 13px; font-weight: 600; }
  #shipmentsView .shipment-bulk-bar.is-active .shipment-bulk-generate { grid-area: gen; width: 100%; min-height: 44px; border-radius: 8px; border-color: #111; background: #111; color: #fff; font-size: 14px; }
  body:has(#shipmentsView.active .shipment-bulk-bar.is-active) .main { padding-bottom: 130px; }
  #shipmentsView .shipment-bulk-result { padding: 12px; }
  #shipmentsView .shipment-bulk-result > div:last-child { flex-wrap: wrap; }

  /* caixa de seleção do pedido ao lado do número, sem linha só para ela */
  #shipmentsView .pz-row.has-bulk-selection { position: relative; }
  #shipmentsView .pz-row.has-bulk-selection > .pz-bulk-selection { position: absolute; top: 40px; right: 14px; z-index: 2; margin: 0; padding: 0; }

  /* bloco da direita de cada pedido */
  #shipmentsView .shipment-ready-block, #shipmentsView .shipment-line-block { width: auto; }
  #shipmentsView .shipment-ready-block .primary-button, #shipmentsView .shipment-ready-block .secondary-button,
  #shipmentsView .shipment-line-block .primary-button, #shipmentsView .shipment-line-block .secondary-button { width: 100%; min-height: 40px; justify-content: center; white-space: normal; }

  /* Etiqueta emitida (cartões) */
  #shipmentsView .shipments-grid:not(.is-ready-list) { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 12px; }
  #shipmentsView .shipment-card { padding: 14px; gap: 12px; }
  #shipmentsView .shipment-issued-toolbar { padding: 12px; gap: 10px; }
  #shipmentsView .shipment-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  #shipmentsView .shipment-actions > * { flex: 1 1 calc(50% - 4px); min-height: 40px; justify-content: center; text-align: center; white-space: normal; }
  #shipmentsView .shipment-daily-close { padding: 12px; }
  #shipmentsView .shipment-actions.shipment-shopify-actions { flex-direction: column; align-items: stretch; }
  #shipmentsView .shipment-shopify-actions > * { flex: none; width: 100%; min-height: 40px; box-sizing: border-box; }
  #shipmentsView .shipment-shopify-actions > small { min-height: 0; text-align: left; }
  #shipmentsView .et-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  #shipmentsView .et-filters::-webkit-scrollbar { display: none; }
  #shipmentsView .et-filters > * { flex: 0 0 auto; white-space: nowrap; }
}
