/* PDV — visual novo (js/pdv-ui.js). Tudo escopado em #pdvView porque a Ordem de Serviço reaproveita as classes .pdv-* antigas. */
#pdvView .pdv-layout { grid-template-columns: minmax(0, 1fr) 440px; gap: 22px; }
@media (max-width: 1100px) { #pdvView .pdv-layout { grid-template-columns: minmax(0, 1fr) 380px; } }
@media (max-width: 900px) { #pdvView .pdv-layout { grid-template-columns: 1fr; } }

/* Busca */
#pdvView .pdv-search-box { position: relative; display: flex; align-items: center; }
#pdvView .pdv-search-box > .material-icons-round { position: absolute; left: 14px; color: var(--muted); font-size: 22px; pointer-events: none; }
#pdvView .pdv-search-box input { padding: 13px 52px 13px 46px; font-size: 15px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--gp-surface, #fff); }
#pdvView .pdv-search-box input:focus { border-color: var(--gp-gold); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--gp-gold) 28%, transparent); }
#pdvView .pdv-kbd { font: 600 11px/1 inherit; padding: 3px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--bg); color: var(--muted); }
#pdvView .pdv-search-box .pdv-kbd { position: absolute; right: 12px; }

/* Filtros por grupo */
#pdvView .pdv-chips { display: flex; gap: 6px; flex-wrap: wrap; }
#pdvView .pdv-chips:empty { display: none; }
#pdvView .pdv-chips button { border: 1px solid var(--line); background: var(--gp-surface, #fff); color: var(--gp-text); border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 600; cursor: pointer; }
#pdvView .pdv-chips button:hover { border-color: var(--gp-navy); }
#pdvView .pdv-chips button.active { background: var(--gp-navy); border-color: var(--gp-navy); color: #fff; }

/* Produtos em cartões */
#pdvView .pdv-product-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; max-height: 560px; padding: 10px; border-radius: 12px; align-content: start; }
#pdvView .pdv-product-list > .pdv-empty-hint { grid-column: 1 / -1; }
#pdvView .pdv-card { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--gp-surface, #fff); cursor: pointer; text-align: left; transition: border-color .15s, box-shadow .15s, transform .1s; position: relative; }
#pdvView .pdv-card:hover { border-color: var(--gp-gold); box-shadow: var(--gp-shadow-soft); }
#pdvView .pdv-card:active { transform: scale(.98); }
#pdvView .pdv-card.is-out { background: color-mix(in srgb, var(--red) 4%, var(--gp-surface, #fff)); }
#pdvView .pdv-card-name { font-size: 13px; font-weight: 700; line-height: 1.3; color: var(--gp-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
#pdvView .pdv-card-sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#pdvView .pdv-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
#pdvView .pdv-card-price { font-size: 16px; font-weight: 800; color: var(--gp-navy); font-variant-numeric: tabular-nums; }
#pdvView .pdv-stock { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--gp-success) 14%, var(--gp-surface, #fff)); color: #047857; white-space: nowrap; }
#pdvView .pdv-stock.low { background: color-mix(in srgb, var(--gp-warning) 18%, var(--gp-surface, #fff)); color: #b45309; }
#pdvView .pdv-stock.out { background: color-mix(in srgb, var(--gp-danger) 14%, var(--gp-surface, #fff)); color: #b91c1c; }
#pdvView .pdv-card-hot { align-self: flex-start; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #92400e; background: color-mix(in srgb, var(--gp-gold) 35%, var(--gp-surface, #fff)); border-radius: 999px; padding: 2px 7px; }

/* Carrinho */
#pdvView .pdv-cart-col { padding: 18px; border-radius: 14px; gap: 14px; position: sticky; top: 12px; box-shadow: var(--gp-shadow-soft); }
@media (max-width: 900px) { #pdvView .pdv-cart-col { position: static; } }
#pdvView .pdv-cart-header h2 { display: flex; align-items: center; gap: 8px; }
#pdvView .pdv-count { min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--gp-navy); color: #fff; font-size: 12px; line-height: 22px; text-align: center; font-weight: 700; }
#pdvView .pdv-cart-lines { display: flex; flex-direction: column; max-height: 300px; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
#pdvView .pdv-cart-empty { text-align: center; color: var(--muted); padding: 26px 8px; font-size: 13px; margin: 0; border: 1.5px dashed var(--line); border-radius: 10px; }
#pdvView .pdv2-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto 28px; gap: 4px 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
#pdvView .pdv2-line:last-child { border-bottom: 0; }
#pdvView .pdv2-name strong { display: block; font-size: 13px; line-height: 1.3; }
#pdvView .pdv2-name small { font-size: 11px; color: var(--muted); }
#pdvView .pdv2-qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
#pdvView .pdv2-qty button { width: 28px; height: 30px; border: 0; background: var(--bg); color: var(--gp-text); font-size: 16px; font-weight: 700; cursor: pointer; line-height: 1; }
#pdvView .pdv2-qty button:hover { background: color-mix(in srgb, var(--gp-gold) 25%, var(--bg)); }
#pdvView .pdv2-qty input { width: 52px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-radius: 0; text-align: center; padding: 4px 2px; font-size: 13px; font-weight: 700; height: 30px; box-sizing: border-box; }
#pdvView .pdv2-total { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; min-width: 74px; }
#pdvView .pdv2-del { width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; padding: 0; }
#pdvView .pdv2-del:hover { background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); }
#pdvView .pdv2-del .material-icons-round { font-size: 18px; }
#pdvView .pdv2-disc { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
#pdvView .pdv2-disc summary { cursor: pointer; width: max-content; }
#pdvView .pdv2-disc label { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
#pdvView .pdv2-disc input { width: 90px; padding: 4px 6px; font-size: 12px; border: 1px solid var(--line); border-radius: 6px; text-align: right; }

/* Totais */
#pdvView .pdv-totals { gap: 5px; }
#pdvView .pdv-grand-total { display: flex; align-items: baseline; justify-content: space-between; margin-top: 6px; padding: 12px 14px; border-radius: 12px; background: var(--gp-navy); color: #fff; }
#pdvView .pdv-grand-total span { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
#pdvView .pdv-grand-total strong { font-size: 28px; font-weight: 800; color: var(--gp-gold); font-variant-numeric: tabular-nums; }

/* Pagamento */
#pdvView .pdv-payment { gap: 14px; }
#pdvView .pdv-block { display: flex; flex-direction: column; gap: 8px; }
#pdvView .pdv-block-title { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
#pdvView .pdv-pay-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
#pdvView .pdv-pay-grid button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--gp-surface, #fff); color: var(--gp-text); font-size: 12px; font-weight: 700; cursor: pointer; transition: border-color .15s, background .15s; }
#pdvView .pdv-pay-grid button .material-icons-round { font-size: 22px; color: var(--muted); }
#pdvView .pdv-pay-grid button:hover { border-color: var(--gp-navy); }
#pdvView .pdv-pay-grid button.active { border-color: var(--gp-gold); background: color-mix(in srgb, var(--gp-gold) 16%, var(--gp-surface, #fff)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gp-gold) 35%, transparent); }
#pdvView .pdv-pay-grid button.active .material-icons-round { color: var(--gp-navy); }
#pdvView .pdv-native-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; }
#pdvView .pdv-pay-extra { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#pdvView .pdv-pay-extra label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
#pdvView .pdv-pay-extra label:last-child:nth-child(odd) { grid-column: 1 / -1; }
#pdvView .pdv-seg { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
#pdvView .pdv-seg button { border: 0; background: transparent; padding: 8px; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; }
#pdvView .pdv-seg button.active { background: var(--gp-navy); color: #fff; }
#pdvView .pdv-nf > label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
#pdvView .pdv-more { border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; }
#pdvView .pdv-more summary { cursor: pointer; padding: 10px 0; font-size: 13px; font-weight: 700; }
#pdvView .pdv-more summary small { font-weight: 400; color: var(--muted); margin-left: 6px; }
#pdvView .pdv-more[open] { padding-bottom: 12px; display: flex; flex-direction: column; gap: 10px; }
#pdvView .pdv-more[open] > summary { padding-bottom: 0; }
#pdvView .pdv-more label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
#pdvView .pdv-more input, #pdvView .pdv-more select { font-size: 13px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg, #fff); }

/* Botão de confirmar */
#pdvView #pdvConfirmSale { font-size: 17px; font-weight: 800; padding: 16px; border-radius: 12px; margin-top: 2px; }
#pdvView .pdv-shortcuts { margin: 0; text-align: center; font-size: 11px; color: var(--muted); }

/* Venda concluída */
#pdvDoneDialog .pdv-done { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 8px 4px 2px; }
#pdvDoneDialog .pdv-done-icon { font-size: 64px; color: var(--gp-success); }
#pdvDoneDialog .pdv-done-icon.warn { color: var(--gp-warning); }
#pdvDoneDialog .pdv-done h2 { margin: 0; font-size: 20px; }
#pdvDoneDialog .pdv-done-total { font-size: 34px; font-weight: 800; color: var(--gp-navy); font-variant-numeric: tabular-nums; }
#pdvDoneDialog .pdv-done-info { width: 100%; margin: 6px 0 10px; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13px; text-align: left; border-top: 1px solid var(--line); padding-top: 12px; }
#pdvDoneDialog .pdv-done-info dt { color: var(--muted); }
#pdvDoneDialog .pdv-done-info dd { margin: 0; text-align: right; font-weight: 600; }

/* ── Ajuste de layout seguindo o modelo enviado pela usuária (2026-11-02) ── */
#pdvView .pdv-h1-icon { font-size: 30px; vertical-align: -5px; margin-right: 10px; color: var(--gp-navy); }

/* Faixa do caixa: uma linha só, sem caixa em volta */
#pdvView .cash-register-bar { border: 0; background: transparent; padding: 2px 2px 6px; margin-bottom: 8px; }
#pdvView .cash-register-bar-left { flex: 1 1 auto; max-width: none; gap: 10px; }
#pdvView .cash-register-bar-left .material-icons-round { font-size: 22px; color: var(--gp-success); }
#pdvView .cash-register-bar-left #cashRegisterStatus { font-weight: 800; }
#pdvView .cash-register-bar.is-open { background: transparent; }
#pdvView .cash-register-bar-actions .primary-button { background: var(--gp-navy); color: #fff; border-radius: 10px; padding-top: 10px; padding-bottom: 10px; }
#pdvView .cash-register-bar-actions .primary-button .material-icons-round { color: var(--gp-gold); font-size: 20px; margin-right: 4px; vertical-align: -5px; }

/* Busca + dica de atalho lado a lado */
#pdvView .pdv-search-row { display: flex; gap: 12px; align-items: stretch; }
#pdvView .pdv-search-row .pdv-search-box { flex: 1; min-width: 0; }
#pdvView .pdv-search-box input { padding-right: 56px; box-shadow: var(--gp-shadow-soft); }
#pdvView .pdv-search-box .pdv-barcode { position: absolute; right: 0; left: auto; top: 0; bottom: 0; width: 48px; display: grid; place-items: center; border-left: 1px solid var(--line); color: var(--gp-navy); font-size: 24px; }
#pdvView .pdv-hint-pill { display: flex; align-items: center; gap: 8px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--gp-surface, #fff); font-size: 13px; font-weight: 600; color: var(--gp-text); white-space: nowrap; box-shadow: var(--gp-shadow-soft); }
@media (max-width: 700px) { #pdvView .pdv-hint-pill { display: none; } }

/* Chips grandes com ícone */
#pdvView .pdv-chips { gap: 10px; margin: 2px 0 4px; }
#pdvView .pdv-chips button { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 12px; font-size: 14px; font-weight: 700; box-shadow: var(--gp-shadow-soft); }
#pdvView .pdv-chips button .material-icons-round { font-size: 22px; color: var(--gp-navy); }
#pdvView .pdv-chips button.active { background: var(--gp-gold); border-color: var(--gp-gold); color: var(--gp-navy); }

/* Lista em grade, sem caixa em volta, paginada */
#pdvView .pdv-product-list { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); max-height: none; overflow: visible; border: 0; background: transparent; padding: 0; gap: 12px; }
#pdvView .pdv-card { padding: 12px; gap: 10px; box-shadow: var(--gp-shadow-soft); }
#pdvView .pdv-card-top { display: flex; gap: 10px; align-items: flex-start; }
#pdvView .pdv-thumb { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 10px; background: var(--bg); display: grid; place-items: center; overflow: hidden; }
#pdvView .pdv-thumb .material-icons-round { font-size: 30px; color: color-mix(in srgb, var(--gp-navy) 55%, var(--gp-surface, #fff)); }
#pdvView .pdv-thumb img { width: 100%; height: 100%; object-fit: cover; }
#pdvView .pdv-card-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
#pdvView .pdv-card-name { min-height: 0; font-size: 13px; }
#pdvView .pdv-card-price { font-size: 15px; }
#pdvView .pdv-pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 6px; }
#pdvView .pdv-pager:empty { display: none; }
#pdvView .pdv-pager button { min-width: 34px; height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--gp-surface, #fff); color: var(--gp-text); font-weight: 700; font-size: 13px; cursor: pointer; display: inline-grid; place-items: center; }
#pdvView .pdv-pager button .material-icons-round { font-size: 20px; }
#pdvView .pdv-pager button:hover:not(:disabled) { border-color: var(--gp-navy); }
#pdvView .pdv-pager button.active { background: var(--gp-gold); border-color: var(--gp-gold); color: var(--gp-navy); }
#pdvView .pdv-pager button:disabled { opacity: .4; cursor: default; }
#pdvView .pdv-pager-gap { color: var(--muted); padding: 0 2px; }

/* Carrinho */
#pdvView .pdv-cart-header h2 { gap: 8px; }
#pdvView .pdv-cart-header h2 > .material-icons-round { color: var(--gp-gold); font-size: 24px; }
#pdvView .pdv-clear { display: inline-flex; align-items: center; gap: 4px; border: 1px solid color-mix(in srgb, var(--red) 40%, var(--line)); border-radius: 8px; padding: 6px 12px; color: var(--red); font-weight: 700; background: transparent; }
#pdvView .pdv-clear .material-icons-round { font-size: 18px; }
#pdvView .pdv-cart-empty { border: 0; padding: 22px 8px 26px; }
#pdvView .pdv-cart-empty::before { content: "shopping_cart"; display: block; font-family: "Material Icons Round"; font-size: 48px; line-height: 1.2; color: color-mix(in srgb, var(--gp-navy) 40%, var(--gp-surface, #fff)); }
#pdvView .pdv-grand-total { margin-top: 2px; padding: 12px 16px; }
#pdvView .pdv-grand-total span { font-size: 15px; font-weight: 800; letter-spacing: 0; text-transform: none; opacity: 1; }
#pdvView .pdv-grand-total strong { font-size: 26px; }
#pdvView .pdv-block-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; letter-spacing: 0; text-transform: none; color: var(--gp-text); }
#pdvView .pdv-block-title .material-icons-round, #pdvView .pdv-label-ic .material-icons-round { font-size: 18px; color: var(--gp-navy); }
#pdvView .pdv-label-ic { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; color: var(--gp-text); }
#pdvView .pdv-pay-extra label { font-weight: 600; }
#pdvView .pdv-seg button.active { background: var(--gp-navy); color: #fff; }

/* Confirmar: dourado com ícone */
#pdvView #pdvConfirmSale { background: var(--gp-gold); color: var(--gp-navy); border: 0; display: flex; align-items: center; justify-content: center; gap: 8px; }
#pdvView #pdvConfirmSale::before { content: "check"; font-family: "Material Icons Round"; font-size: 24px; font-weight: 400; }
#pdvView #pdvConfirmSale:hover:not(:disabled) { filter: brightness(1.05); }
#pdvView #pdvConfirmSale:disabled { opacity: .55; cursor: not-allowed; }

/* Últimas vendas */
#pdvView .pdv-sales-title { display: flex; align-items: center; gap: 12px; }
#pdvView .pdv-sales-title > .material-icons-round { font-size: 30px; color: var(--gp-navy); }
#pdvView .pdv-sales-empty { text-align: center; padding: 34px 8px; color: var(--muted); }
#pdvView .pdv-sales-empty .material-icons-round { display: block; font-size: 44px; margin: 0 auto 6px; color: color-mix(in srgb, var(--gp-navy) 35%, var(--gp-surface, #fff)); }
