/* Ajustes exclusivos de celular. Impressão e layout desktop não participam. */
.nazor-menu-mobile { display:none; }
@media screen and (max-width:767px) {
  body.p-4 { padding:12px !important; }
  body:not(.p-4) > .nazor-header { margin:12px; }
  .nazor-header { padding:10px 12px; gap:8px; min-height:64px; margin-bottom:16px; }
  .nazor-home { order:1; gap:10px; min-width:0; }
  .nazor-logo { width:96px; height:34px; }
  .nazor-home-label { padding-left:10px; font-size:.875rem; }
  .nazor-config { order:2; margin-left:auto; min-width:44px; height:44px; }
  .nazor-menu-mobile { display:inline-flex; order:3; align-items:center; justify-content:center; gap:5px; min-height:44px; padding:8px; border:1px solid #e9e1f2; border-radius:9px; background:white; color:#622b9f; font:inherit; font-size:.875rem; }
  .nazor-nav { order:4; width:100%; display:grid; grid-template-columns:1fr 1fr; border-top:1px solid #eee; padding-top:8px; gap:4px; }
  .nazor-header.mobile-menu-ready:not(.mobile-menu-open) .nazor-nav { display:none; }
  .nazor-nav-link { min-height:44px; padding:8px; font-size:.875rem; }
  .form-control,.form-select { font-size:16px !important; min-height:44px; min-width:0; }
  textarea.form-control { min-height:88px; }
  .btn { min-height:44px; }
  .form-check { min-height:36px; display:flex; align-items:center; gap:8px; }
  .form-check-input { flex-shrink:0; }
  .form-check-label { padding:6px 0; }
  .mobile-os-form > .container-fluid { padding:0; }
  .mobile-os-form .card-body { padding:14px; }
  .mobile-os-form .card-body .card-body { padding:10px; }
  .mobile-os-form .bg-primary.rounded-top { flex-wrap:wrap; gap:12px; }
  .mobile-os-form .bg-primary.rounded-top > h5 { width:100%; line-height:1.4; }
  .mobile-os-form .bg-primary .bg-white { width:100%; flex-wrap:wrap; gap:4px 16px !important; padding:8px 12px !important; }
  .mobile-os-form .bg-primary > .d-flex:not(.bg-white) { gap:8px !important; width:100%; }
  .mobile-os-form .bg-primary h5 { flex-basis:100%; }
  .mobile-os-form .row > * { min-width:0; }
  .mobile-os-form .previsao-saida-compacta { gap:12px; }
  .mobile-os-form .previsao-saida-compacta .form-control { height:44px; padding:8px; }
  .mobile-os-form .campo-data-previsao { flex:1.4 1 0; }
  .mobile-os-form .campo-hora-previsao { flex:1 1 0; }
  .mobile-os-form .campo-garantia { width:100%; }
  .mobile-os-form .campo-garantia .form-control { height:44px; padding:8px; }
  .fotos-os-atalho { min-height:44px; padding:8px; }
  .cliente-resultados,.mobile-os-form [role=listbox] { max-height:40vh !important; }
  [role=listbox] > *, .cliente-resultados > * { padding-top:12px; padding-bottom:12px; white-space:normal; overflow-wrap:anywhere; }
  .mobile-os-form .itens-scroll { display:grid; grid-template-columns:64px minmax(0,1fr) minmax(0,1fr); gap:8px; }
  .mobile-os-form .itens-grade { display:contents; }
  .mobile-os-form .itens-cabecalho h5 { grid-row:1; grid-column:1/-1; font-size:1.1rem; margin-bottom:4px !important; }
  .mobile-os-form .itens-cabecalho label { grid-row:3; margin:0; transform:none; font-size:.85rem; }
  .mobile-os-form .itens-cabecalho label[for=nova_qtd] { grid-column:1; }
  .mobile-os-form .itens-cabecalho label[for=novo_valor] { grid-column:2; }
  .mobile-os-form .itens-cabecalho label[for=novo_total] { grid-column:3; }
  .mobile-os-form .itens-cabecalho > span { display:none; }
  .mobile-os-form .itens-grade > .position-relative { grid-row:2; grid-column:1/-1; }
  .mobile-os-form #nova_qtd { grid-row:4; grid-column:1; }
  .mobile-os-form #novo_valor { grid-row:4; grid-column:2; }
  .mobile-os-form #novo_total { grid-row:4; grid-column:3; }
  .mobile-os-form #btnAdicionarItem { grid-row:5; grid-column:1/-1; margin-top:4px; }
  .mobile-os-form #btnAdicionarItem::after { content:' Adicionar item'; }
  .mobile-os-form .itens-tabela tr { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; border:1px solid #e9e1f2; border-radius:10px; padding:10px; margin-bottom:10px; }
  .mobile-os-form .itens-tabela td { padding:4px 0; background:transparent; box-shadow:none; }
  .mobile-os-form .itens-tabela td:first-child { grid-column:1/-1; font-weight:600; }
  .mobile-os-form .itens-tabela td:nth-child(2)::before { content:'Quant'; }
  .mobile-os-form .itens-tabela td:nth-child(3)::before { content:'Preço unt'; }
  .mobile-os-form .itens-tabela td:nth-child(4)::before { content:'Subtotal'; }
  .mobile-os-form .itens-tabela td:nth-child(n+2):nth-child(-n+4)::before { display:block; font-size:.75rem; color:#6c6474; margin-bottom:4px; }
  .mobile-os-form .itens-tabela td:last-child { grid-column:1/-1; }
  .mobile-os-form .acoes-item { gap:8px; }
  .mobile-os-form .acoes-item .btn,.mobile-os-form .acoes-item .espaco-editar { width:44px; min-width:44px; height:44px; flex-basis:44px; }
  .mobile-os-list .card-body { padding:12px; }
  .mobile-os-list .mobile-os-filtros { flex-wrap:wrap; gap:10px; }
  .mobile-os-list .mobile-os-filtros > input { width:100% !important; }
  .mobile-os-list .mobile-os-filtros > div { width:100%; }
  .mobile-os-list #filtroStatus { flex:1; width:0 !important; }
  .mobile-os-list .mobile-os-filtros .btn { display:flex; align-items:center; white-space:nowrap; }
  .mobile-os-list table,.mobile-os-list tbody { display:block; width:100%; }
  .mobile-os-list thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .mobile-os-list tbody tr { display:block; border:1px solid #e4dcec; border-radius:12px; margin-bottom:12px; padding:10px 12px; background:#fff; }
  .mobile-os-list tbody td { display:block; width:100%; padding:6px 0 !important; border:0; box-shadow:none !important; background:transparent !important; white-space:normal; overflow-wrap:anywhere; }
  .mobile-os-list tbody td[data-mobile-label]::before { content:attr(data-mobile-label); display:block; color:#706579; font-size:.75rem; margin-bottom:2px; font-weight:400; }
  .mobile-os-list tbody td:first-child { color:#7438b8; font-weight:700; font-size:1.05rem; }
  .mobile-os-list tbody td:first-child::before,.mobile-os-list tbody td:last-child::before { display:none; }
  .mobile-os-list .botoes-os { flex-wrap:wrap; padding-top:8px; border-top:1px solid #eee; }
  .mobile-os-list .botoes-os .btn { flex:1; min-height:44px; }
  .mobile-os-list .badge { white-space:normal; text-align:left; line-height:1.4; }
  .modal-dialog { margin:10px; }
  .modal-content { max-height:calc(100dvh - 20px); }
  .modal-body { overflow:auto; }
  dialog.fotos-os-dialog,dialog.pagamento-dialog,dialog.modal-desbloqueio { width:calc(100% - 20px); max-height:calc(100dvh - 24px); padding:16px; overflow:auto; overscroll-behavior:contain; }
  .fotos-os-lista { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .fotos-os-acoes,.fotos-os-rodape { width:100%; flex-wrap:wrap; }
  .fotos-os-acoes .btn,.fotos-os-rodape .btn { flex:1; }
  .fotos-os-fechar { width:44px; height:44px; }
  .pagamento-dialog > .d-flex { flex-wrap:wrap; }
  .pagamento-totais strong { overflow-wrap:anywhere; }
  .parcela-linha { gap:10px; }
  .os-print-opcoes { max-height:65dvh; overflow:auto; }
  .os-print-menu > button { min-width:44px; min-height:44px; }
}
@media screen and (max-width:359px) {
  .nazor-logo { width:76px; }
  .nazor-home { gap:6px; }
  .nazor-home-label { padding-left:6px; font-size:.8rem; }
  .nazor-menu-mobile { min-width:44px; font-size:0; }
  .nazor-menu-mobile::before { content:'☰'; font-size:20px; }
}

/* Restante do sistema: alterações somente em telas pequenas, nunca na impressão. */
@media screen and (max-width:767px) {
  .mobile-page > .container-fluid { padding:0; }
  .mobile-page main.container { padding:12px; }
  .mobile-page .card-body:not(.p-0),.mobile-page .modal-body { padding:14px !important; }
  .mobile-page .row > * { min-width:0; }
  .mobile-page h2 { font-size:1.5rem; }
  .mobile-page h3 { font-size:1.35rem; }
  .mobile-page main > .d-flex,.mobile-page .card-body > .d-flex,.mobile-page > .container-fluid > .d-flex { flex-wrap:wrap; gap:12px; }
  .mobile-page .btn-close { min-width:24px; min-height:24px; padding:10px; }
  .mobile-page .modal-header { gap:10px; }
  .mobile-page .modal-footer { gap:8px; }
  .mobile-page .modal-footer .btn { flex:1; margin:0; }
  .mobile-page .modal-dialog-scrollable { height:calc(100dvh - 20px); }
  .mobile-page .table-responsive { overflow:visible; }
  .mobile-cards,.mobile-cards tbody { display:block; width:100%; }
  .mobile-cards thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .mobile-cards tbody tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 12px; border:1px solid #e4dcec; border-radius:12px; margin:12px 0; padding:12px; background:#fff; }
  .mobile-cards tbody td { display:block; width:auto !important; min-width:0; padding:4px 0 !important; border:0; box-shadow:none !important; background:transparent !important; white-space:normal !important; overflow-wrap:anywhere; text-align:left !important; }
  .mobile-cards td[data-mobile-label]::before { content:attr(data-mobile-label); display:block; color:#706579; font-size:.75rem; margin-bottom:3px; font-weight:400; }
  .mobile-cards td:first-child { color:#7438b8; font-weight:600; }
  .mobile-cards td:first-child,.mobile-cards td:nth-child(2),.mobile-cards td:last-child,.mobile-cards td[colspan] { grid-column:1/-1; }
  .mobile-cards td:last-child::before { display:none; }
  .mobile-cards td:last-child { border-top:1px solid #eee; padding-top:10px !important; }
  .mobile-cards .acoes { flex-wrap:wrap; justify-content:flex-start; }
  .mobile-cards .btn { min-width:44px; }
  .mobile-clientes main > .d-flex { margin:8px 0 16px !important; }
  .mobile-clientes main > .d-flex > button { width:100%; }
  .mobile-clientes .mobile-cards td:nth-child(3),.mobile-orcamentos .mobile-cards td:nth-child(3) { grid-column:1/-1; }
  .mobile-orcamentos #busca { width:100%; flex-basis:100%; }
  .mobile-orcamentos #filtro { width:100% !important; }
  .mobile-orcamentos #pagina { order:3; width:100%; text-align:center; font-size:.85rem; }
  .mobile-index > .container-fluid > .row > .col-md-3 { width:50%; }
  .mobile-index .dashboard-card { height:100%; }
  .mobile-index .dashboard-card .card-body { padding:12px !important; }
  .mobile-index .dashboard-card h6 { font-size:.875rem; }
  .mobile-index .card-header { gap:12px; }
  .mobile-index #listaAlertas .d-flex { flex-wrap:wrap; gap:10px !important; }
  .mobile-index #listaAlertas .d-flex > div { width:100%; overflow-wrap:anywhere; }
  .mobile-index .badge { white-space:normal; line-height:1.4; }
  .mobile-index #btnSom { width:100%; }
  .mobile-editar_orcamento fieldset { min-width:0; }
  .mobile-editar_orcamento .item-grid { grid-template-columns:64px minmax(0,1fr) minmax(0,1fr); gap:8px; }
  .mobile-editar_orcamento .item-grid > div:first-child { grid-column:1/-1; }
  .mobile-editar_orcamento #adicionar { grid-column:1/-1; width:100%; }
  .mobile-editar_orcamento #adicionar::after { content:' Adicionar item'; }
  .mobile-editar_orcamento #itens { display:block; width:100%; }
  .mobile-editar_orcamento #itens tr { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; padding:10px; margin-bottom:12px; border:1px solid #e4dcec; border-radius:10px; }
  .mobile-editar_orcamento #itens td { display:block; min-width:0; width:auto !important; padding:4px 0; border:0; white-space:normal; overflow-wrap:anywhere; }
  .mobile-editar_orcamento #itens td:first-child { grid-column:1/-1; font-weight:600; }
  .mobile-editar_orcamento #itens td:nth-child(2)::before { content:'Quant'; }
  .mobile-editar_orcamento #itens td:nth-child(3)::before { content:'Preço unt'; }
  .mobile-editar_orcamento #itens td:nth-child(4)::before { content:'Subtotal'; }
  .mobile-editar_orcamento #itens td:nth-child(n+2):nth-child(-n+4)::before { display:block; font-size:.75rem; color:#706579; }
  .mobile-editar_orcamento #itens td:last-child { grid-column:1/-1; text-align:right; }
  .mobile-editar_orcamento #itens .btn { min-width:44px; }
  .mobile-editar_orcamento #form > .d-flex,.mobile-editar_orcamento #campos > .d-flex { flex-wrap:wrap; }
  .mobile-editar_orcamento #form > .d-flex .btn { flex:1 1 auto; }
  .mobile-editar_orcamento #total { overflow-wrap:anywhere; }
  .mobile-editar_orcamento #impressoes { flex-wrap:wrap; }
  .mobile-page dialog { max-height:calc(100dvh - 24px); overflow:auto; padding:16px; }
  .mobile-page dialog .d-flex { flex-wrap:wrap; }
  .mobile-configuracoes #formConfig > .d-flex { flex-wrap:wrap; }
  .mobile-configuracoes #salvarConfig { width:100%; }
  .mobile-configuracoes #catalogoLista > div { flex-wrap:wrap; }
  .mobile-configuracoes #catalogoLista > div > span { flex-basis:100%; }
  .mobile-configuracoes #catalogoNome { flex-basis:100% !important; min-width:0 !important; }
  .mobile-configuracoes summary { padding:8px 0; }
  .mobile-login { padding:16px; height:auto !important; min-height:100dvh; }
  .mobile-login > .card { width:100% !important; max-width:360px; }
}
