/* ControlPDV v0.2.4 — contrato visual de checkout profissional */
body.pdv-operator-mode .page-head{margin-bottom:10px}
body.pdv-operator-mode .page-head h1{font-size:21px}
body.pdv-operator-mode .page-head p{margin-top:2px}
body.pdv-operator-mode .scan-card{padding:12px 14px;grid-template-columns:46px 1fr 126px auto;gap:11px}
body.pdv-operator-mode .scan-icon{width:46px;height:46px}
body.pdv-operator-mode .quick-wrap{padding:10px 14px}
body.pdv-operator-mode .quick-head{margin-bottom:7px}
body.pdv-operator-mode .quick-grid{gap:7px}
body.pdv-operator-mode .quick{min-height:58px;padding:9px 11px}
body.pdv-operator-mode .quick strong{margin-bottom:4px}
body.pdv-operator-mode .cart{margin-top:10px;display:flex;flex-direction:column;min-height:260px;max-height:calc(100vh - 405px)}
body.pdv-operator-mode .cart-body,body.pdv-operator-mode .cart .cart-rows{overflow:auto;min-height:0}
body.pdv-operator-mode .cart-row{padding-top:9px;padding-bottom:9px}
body.pdv-operator-mode .cart-row.pdv-last-item{animation:pdvLastItem 1.8s ease-out}
@keyframes pdvLastItem{0%,45%{box-shadow:inset 5px 0 0 #00c9d8;background:color-mix(in srgb,var(--panel) 84%,#00c9d8 16%)}100%{box-shadow:none}}
body.pdv-operator-mode .bottom-actions{margin-top:10px}
body.pdv-operator-mode .action-tile{min-height:56px;position:relative}
body.pdv-operator-mode .pdv-key{display:inline-flex;align-items:center;justify-content:center;margin-left:5px;padding:2px 5px;border-radius:5px;border:1px solid currentColor;font-size:9px;font-weight:950;opacity:.72;line-height:1}
body.pdv-operator-mode .total-card{padding:16px;top:88px}
body.pdv-operator-mode .summary-title{margin:4px 0 8px}
body.pdv-operator-mode .total-line{padding:5px 0}
body.pdv-operator-mode .grand{margin-top:7px;padding-top:11px}
body.pdv-operator-mode .grand .money{font-size:44px;line-height:1}
body.pdv-operator-mode .payment-panel{margin:13px -16px -16px;padding:13px 16px 15px}
body.pdv-operator-mode .pay-shortcut{min-height:72px}
body.pdv-operator-mode .pay-free{min-height:48px}
body.pdv-operator-mode .pdv-ready{min-height:250px;display:grid;place-items:center;text-align:center;padding:26px}
body.pdv-operator-mode .pdv-ready-main{font-size:24px;font-weight:950;letter-spacing:.03em}
body.pdv-operator-mode .pdv-ready-sub{margin-top:6px;color:var(--muted);font-size:14px}
body.pdv-operator-mode .pdv-health{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:18px}
body.pdv-operator-mode .pdv-health-chip{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:999px;padding:6px 9px;font-size:10px;font-weight:850;background:var(--panel)}
body.pdv-operator-mode .pdv-health-dot{width:7px;height:7px;border-radius:50%;background:#0bbf78}
body.pdv-operator-mode .pdv-health-chip.warn .pdv-health-dot{background:#e5a000}
body.pdv-operator-mode .pdv-health-chip.off .pdv-health-dot{background:#e04b4b}
body.pdv-operator-mode .pdv-status-strip{display:flex;gap:7px;flex-wrap:wrap;margin-top:8px;padding:7px 9px;border:1px solid var(--line);border-radius:11px;background:var(--panel2)}
body.pdv-operator-mode .pdv-status-strip span{font-size:9px;font-weight:850;color:var(--muted)}
body.pdv-operator-mode .pdv-status-strip b{color:var(--text)}
body.pdv-operator-mode .pay-shortcut:disabled{filter:grayscale(.8);opacity:.42}
@media (min-width:1200px){body.pdv-operator-mode .content{padding-top:12px;padding-bottom:12px}body.pdv-operator-mode .pdv-grid{gap:11px}}


/* Operação completa da Frente de Caixa */
body.pdv-operator-mode{overflow:hidden}
body.pdv-operator-mode .layout{height:calc(100vh - 66px);overflow:hidden}
body.pdv-operator-mode .content{height:100%;overflow:hidden}
body.pdv-operator-mode #content{display:flex;flex-direction:column;min-height:0}
body.pdv-operator-mode .pdv-grid{flex:1;min-height:0;overflow:hidden}
body.pdv-operator-mode .pdv-main{display:flex;flex-direction:column;min-height:0;overflow:hidden}
body.pdv-operator-mode .cart{flex:1;min-height:180px;max-height:none;overflow:hidden}
body.pdv-operator-mode .cart-header,body.pdv-operator-mode .cart-foot{flex:0 0 auto}
body.pdv-operator-mode .cart-row{flex:0 0 auto}
body.pdv-operator-mode .cart-header~.cart-row{overflow:visible}
body.pdv-operator-mode .cart:has(.cart-row){overflow-y:auto;overscroll-behavior:contain}
body.pdv-operator-mode .quick{min-height:46px;padding:7px 10px}
body.pdv-operator-mode .quick strong{font-size:12px;margin-bottom:2px}
body.pdv-operator-mode .quick span{font-size:10px}
body.pdv-operator-mode .grand .label{font-size:12px;letter-spacing:.12em}
body.pdv-operator-mode .grand .money{font-size:clamp(42px,4vw,58px);font-weight:950}
body.pdv-operator-mode .total-line{font-size:12px;opacity:.78}
body.pdv-operator-mode .pay-shortcut.operational-ready{box-shadow:0 0 0 2px color-mix(in srgb,var(--primary) 25%,transparent)}
body.pdv-operator-mode .pay-shortcut:disabled{cursor:not-allowed;opacity:.34;box-shadow:none}
.pdv-operational-health{display:flex;gap:6px;align-items:center;overflow-x:auto;margin:-2px 0 8px;padding:5px 7px;border:1px solid var(--line);border-radius:10px;background:var(--panel2)}
.pdv-operational-health .pdv-health-chip{padding:4px 7px;white-space:nowrap}
.pdv-operational-health .pdv-health-chip span{color:var(--muted)}
.pdv-operational-health .pdv-health-chip b{color:var(--text);font-size:10px}
.pdv-scanner-feedback{display:flex;align-items:center;gap:12px;margin-top:7px;padding:9px 12px;border-radius:10px;border:1px solid #18a66e;background:color-mix(in srgb,var(--panel) 88%,#18a66e 12%);animation:pdvFeedbackIn .18s ease-out}
.pdv-scanner-feedback strong{font-size:10px;letter-spacing:.08em;color:#18a66e}
.pdv-scanner-feedback span{font-size:13px;font-weight:800}
.pdv-scanner-feedback.error{border-color:#e04b4b;background:color-mix(in srgb,var(--panel) 88%,#e04b4b 12%)}
.pdv-scanner-feedback.error strong{color:#e04b4b}
.pdv-scanner-feedback.leaving{opacity:0;transition:opacity .3s}
@keyframes pdvFeedbackIn{from{transform:translateY(-4px);opacity:0}}
.pdv-scale-context{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:16px;margin-top:7px;padding:10px 13px;border:2px solid #e5a000;background:color-mix(in srgb,var(--panel) 90%,#e5a000 10%)}
.pdv-scale-context>div:first-child{display:flex;flex-direction:column;gap:2px}
.pdv-scale-context small,.pdv-scale-live span{font-size:9px;font-weight:950;letter-spacing:.08em;color:#b77c00}
.pdv-scale-context strong{font-size:14px}.pdv-scale-context span{font-size:11px;color:var(--muted)}
.pdv-scale-live{display:grid;grid-template-columns:auto auto;gap:1px 10px;align-items:center;text-align:right}
.pdv-scale-live span{grid-column:1/-1}.pdv-scale-live strong{font-size:20px}.pdv-scale-live b{font-size:16px;color:var(--primary)}
.pdv-scale-actions{display:flex;gap:7px}
.scan-main.awaiting-weight{border-color:#e5a000!important;box-shadow:0 0 0 3px color-mix(in srgb,#e5a000 22%,transparent)!important}
body.pdv-operator-mode .modal h2:has(+.muted){display:flex;align-items:center;gap:8px}
body.pdv-operator-mode .modal:has(input[id*="Auth"],input[id*="auth"],input[id*="Supervisor"]){border-top:4px solid #e5a000}
@media(max-height:760px){
 body.pdv-operator-mode .page-head p{display:none}
 body.pdv-operator-mode .quick-wrap{padding:7px 10px}
 body.pdv-operator-mode .quick{min-height:40px}
 body.pdv-operator-mode .bottom-actions{margin-top:6px}
 body.pdv-operator-mode .action-tile{min-height:48px}
 body.pdv-operator-mode .total-card{padding:12px}
}
@media(max-width:1050px){
 body.pdv-operator-mode{overflow:auto}
 body.pdv-operator-mode .layout,body.pdv-operator-mode .content{height:auto;overflow:visible}
 body.pdv-operator-mode .pdv-grid,body.pdv-operator-mode .pdv-main{overflow:visible}
 .pdv-scale-context{grid-template-columns:1fr}
}


/* Aurora Pulse — homologação visual aprovada em 04/09/2026.
   Reduz o branco no tema claro e mantém contraste forte no tema escuro. */
body.pdv-operator-mode{
  --pdv-page:#dbeaf3;
  --pdv-surface:#eaf4f9;
  --pdv-surface-strong:#f3f8fb;
  --pdv-surface-soft:#e2eff6;
  --pdv-row:#eef6fa;
  --pdv-row-alt:#e6f0f6;
  --pdv-border:#b7cfdb;
  --pdv-readable:#10283b;
}
body.pdv-operator-mode .content{
  background:linear-gradient(145deg,#d9eaf3 0%,#e8f3f8 52%,#d5e7f0 100%);
}
body.pdv-operator-mode .scan-card,
body.pdv-operator-mode .quick-wrap{
  background:linear-gradient(180deg,#e8f3f8,#e0edf5);
  border-color:var(--pdv-border);
  box-shadow:0 8px 22px rgba(16,40,59,.05);
}
body.pdv-operator-mode .cart{
  background:var(--pdv-surface);
  border-color:var(--pdv-border);
  box-shadow:0 10px 28px rgba(16,40,59,.06);
}
body.pdv-operator-mode .cart-row{
  background:var(--pdv-row);
  color:var(--pdv-readable);
}
body.pdv-operator-mode .cart-row:nth-of-type(odd){background:var(--pdv-row-alt)}
body.pdv-operator-mode .cart-foot{
  background:#e7f1f7;
  border-color:var(--pdv-border);
}
body.pdv-operator-mode .quick{
  background:linear-gradient(180deg,#f0f7fa,#e7f1f6);
  border-color:var(--pdv-border);
}
body.pdv-operator-mode .total-card{
  background:linear-gradient(180deg,#edf6fa 0%,#e3eff6 100%);
  border-color:var(--pdv-border);
  box-shadow:0 10px 28px rgba(16,40,59,.08);
}
body.pdv-operator-mode .total-card .summary-title,
body.pdv-operator-mode .total-card .grand,
body.pdv-operator-mode .total-card .total-line{color:#10283b}
body.pdv-operator-mode .payment-panel{
  background:linear-gradient(180deg,#073d57 0%,#06354d 100%);
}
body.pdv-operator-mode .pay-shortcut{
  background:linear-gradient(180deg,#f2f8fb,#e8f2f7);
  border-color:#acc8d6;
  color:#10283b;
  box-shadow:0 4px 12px rgba(3,38,57,.08);
}
body.pdv-operator-mode .pay-shortcut:hover:not(:disabled){
  background:linear-gradient(180deg,#f7fbfd,#edf6fa);
  border-color:#80b7c8;
}
body.pdv-operator-mode .bottom-actions .action-tile:not(.primary){
  background:linear-gradient(180deg,#eef6fa,#e4f0f6);
  border-color:var(--pdv-border);
  color:#10283b;
}
body.pdv-operator-mode .input,
body.pdv-operator-mode .qty-control,
body.pdv-operator-mode .qty-control button{
  background:#f2f8fb;
  color:#10283b;
  border-color:var(--pdv-border);
}
body.pdv-operator-mode .pdv-operational-health,
body.pdv-operator-mode .pdv-status-strip{
  background:#deecf4;
  border-color:var(--pdv-border);
}

/* Tema escuro: não reutilizar as superfícies claras acima. */
html[data-theme="dark"] body.pdv-operator-mode,
body[data-theme="dark"].pdv-operator-mode,
body.theme-dark.pdv-operator-mode,
body.dark.pdv-operator-mode{
  --pdv-page:#071725;
  --pdv-surface:#0c2131;
  --pdv-surface-strong:#102a3d;
  --pdv-surface-soft:#0a1d2c;
  --pdv-row:#102a3d;
  --pdv-row-alt:#0d2537;
  --pdv-border:#315269;
  --pdv-readable:#f4fbff;
  --text:#f4fbff;
  --muted:#b9cbd7;
  --line:#315269;
}
html[data-theme="dark"] body.pdv-operator-mode .content,
body[data-theme="dark"].pdv-operator-mode .content,
body.theme-dark.pdv-operator-mode .content,
body.dark.pdv-operator-mode .content{
  background:linear-gradient(145deg,#071725,#0b2232 55%,#081a28);
}
html[data-theme="dark"] body.pdv-operator-mode .cart-header,
body[data-theme="dark"].pdv-operator-mode .cart-header,
body.theme-dark.pdv-operator-mode .cart-header,
body.dark.pdv-operator-mode .cart-header{
  background:#061b2b;
  color:#fff;
}
html[data-theme="dark"] body.pdv-operator-mode .payment-panel,
body[data-theme="dark"].pdv-operator-mode .payment-panel,
body.theme-dark.pdv-operator-mode .payment-panel,
body.dark.pdv-operator-mode .payment-panel{
  background:#061f30;
  color:#fff;
}
html[data-theme="dark"] body.pdv-operator-mode .scan-card,
html[data-theme="dark"] body.pdv-operator-mode .quick-wrap,
html[data-theme="dark"] body.pdv-operator-mode .cart,
html[data-theme="dark"] body.pdv-operator-mode .cart-foot,
html[data-theme="dark"] body.pdv-operator-mode .quick,
html[data-theme="dark"] body.pdv-operator-mode .total-card,
html[data-theme="dark"] body.pdv-operator-mode .bottom-actions .action-tile:not(.primary),
body[data-theme="dark"].pdv-operator-mode .scan-card,
body[data-theme="dark"].pdv-operator-mode .quick-wrap,
body[data-theme="dark"].pdv-operator-mode .cart,
body[data-theme="dark"].pdv-operator-mode .cart-foot,
body[data-theme="dark"].pdv-operator-mode .quick,
body[data-theme="dark"].pdv-operator-mode .total-card,
body[data-theme="dark"].pdv-operator-mode .bottom-actions .action-tile:not(.primary),
body.theme-dark.pdv-operator-mode .scan-card,
body.theme-dark.pdv-operator-mode .quick-wrap,
body.theme-dark.pdv-operator-mode .cart,
body.theme-dark.pdv-operator-mode .cart-foot,
body.theme-dark.pdv-operator-mode .quick,
body.theme-dark.pdv-operator-mode .total-card,
body.theme-dark.pdv-operator-mode .bottom-actions .action-tile:not(.primary),
body.dark.pdv-operator-mode .scan-card,
body.dark.pdv-operator-mode .quick-wrap,
body.dark.pdv-operator-mode .cart,
body.dark.pdv-operator-mode .cart-foot,
body.dark.pdv-operator-mode .quick,
body.dark.pdv-operator-mode .total-card,
body.dark.pdv-operator-mode .bottom-actions .action-tile:not(.primary){
  background:#102a3d;
  color:#f4fbff;
  border-color:#315269;
  box-shadow:none;
}
html[data-theme="dark"] body.pdv-operator-mode .pay-shortcut,
body[data-theme="dark"].pdv-operator-mode .pay-shortcut,
body.theme-dark.pdv-operator-mode .pay-shortcut,
body.dark.pdv-operator-mode .pay-shortcut{
  background:#123149;
  color:#f4fbff;
  border-color:#41657a;
  box-shadow:none;
}
html[data-theme="dark"] body.pdv-operator-mode .input,
html[data-theme="dark"] body.pdv-operator-mode .qty-control,
html[data-theme="dark"] body.pdv-operator-mode .qty-control button,
body[data-theme="dark"].pdv-operator-mode .input,
body[data-theme="dark"].pdv-operator-mode .qty-control,
body[data-theme="dark"].pdv-operator-mode .qty-control button,
body.theme-dark.pdv-operator-mode .input,
body.theme-dark.pdv-operator-mode .qty-control,
body.theme-dark.pdv-operator-mode .qty-control button,
body.dark.pdv-operator-mode .input,
body.dark.pdv-operator-mode .qty-control,
body.dark.pdv-operator-mode .qty-control button{
  background:#0f2a3e;
  color:#f4fbff;
  border-color:#41657a;
}


/* Produtos Rápidos recolhíveis — libera área vertical para o carrinho */
body.pdv-operator-mode .quick-wrap{transition:padding .18s ease,min-height .18s ease}
body.pdv-operator-mode .quick-head{display:flex;align-items:center;gap:7px}
body.pdv-operator-mode .pdv-quick-toggle024{margin-left:auto;border:0;background:transparent;color:#175067;font:inherit;font-size:10px;font-weight:900;cursor:pointer;display:inline-flex;align-items:center;gap:6px;padding:4px 2px}
body.pdv-operator-mode .pdv-quick-toggle024 i{font-style:normal;font-size:13px;transition:transform .18s ease}
body.pdv-operator-mode .pdv-quick-collapsed{padding-top:5px!important;padding-bottom:5px!important}
body.pdv-operator-mode .pdv-quick-collapsed .quick-head{margin-bottom:0!important;min-height:24px}
body.pdv-operator-mode .pdv-quick-collapsed .quick-grid{display:none!important}
body.pdv-operator-mode .pdv-quick-collapsed .pdv-quick-toggle024 i{transform:rotate(180deg)}
html[data-cp-theme="dark"] body.pdv-operator-mode .pdv-quick-toggle024,
html[data-theme="dark"] body.pdv-operator-mode .pdv-quick-toggle024,
body[data-theme="dark"].pdv-operator-mode .pdv-quick-toggle024,
body.theme-dark.pdv-operator-mode .pdv-quick-toggle024,
body.dark.pdv-operator-mode .pdv-quick-toggle024{color:#7be8f4}
