:root {
  --primary: #2563eb;
  --primary-dark: #0d4c7f;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #f59e0b;
  --bg: #f1f5f9;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Segoe UI', sans-serif; color: var(--text); background: var(--bg); }
a { color: inherit; text-decoration: none; }
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 250px; background: var(--primary-dark); color: #fff; padding: 20px; }
.sidebar h2 { margin-top: 0; }
.sidebar nav a { display: block; padding: 10px 12px; border-radius: 8px; margin: 6px 0; background: rgba(255,255,255,.08); }
.sidebar nav a:hover { background: rgba(255,255,255,.2); }
.user-info { font-size: 14px; margin-bottom: 15px; color: #bfdbfe; }
.sidebar-operador-caixa {
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.25;
  color: #dbe3ef;
  background: rgba(148, 163, 184, .22);
  border: 1px solid rgba(203, 213, 225, .32);
}
.content { flex: 1; padding: 20px; }
.page-wrap { width: 100%; max-width: 1180px; margin: 0 auto; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.card { background: var(--card); border-radius: 10px; padding: 14px; box-shadow: 0 4px 14px rgba(15, 23, 42, .08); }
.card h3 { margin-top: 0; color: var(--muted); }
.card p { margin: 4px 0 0; font-size: 28px; font-weight: bold; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  border: 0;
  padding: 0 14px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  min-width: 106px;
  height: 36px;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #15803d; color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-warning { background: var(--warning); color: #111827; }
.btn-warning:hover { background: #d97706; color: #fff; }
.w-full { width: 100%; }
.mt-16 { margin-top: 16px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { border-bottom: 1px solid #e2e8f0; padding: 8px; text-align: left; font-size: 14px; }
th { background: #eff6ff; }
form label { display: block; margin: 0 0 6px; font-weight: 600; font-size: 14px; }
form input, form textarea, form select { width: 100%; padding: 9px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; }
form input[type="checkbox"] { width: auto; padding: 0; border: 0; }
textarea { min-height: 80px; }
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px; }
.field { grid-column: span 12; }
.field.span-6 { grid-column: span 6; }
.field.span-5 { grid-column: span 5; }
.field.span-4 { grid-column: span 4; }
.field.span-3 { grid-column: span 3; }
.field.span-2 { grid-column: span 2; }
.field.span-7 { grid-column: span 7; }
.field.span-8 { grid-column: span 8; }
.field.span-12 { grid-column: span 12; }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.check-inline { display: flex; align-items: center; height: 100%; min-height: 48px; padding-top: 24px; }
.check-inline label { margin: 0; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.field-with-action { display: flex; gap: 8px; align-items: center; }
.field-with-action .btn { white-space: nowrap; }
.alert { padding: 10px 12px; border-radius: 8px; margin: 12px 0; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-danger { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef3c7; color: #92400e; }
.alert-error { background: #dc2626; color: #ffffff; }
.toast-wrap {
  position: fixed;
  top: 12px;
  right: 12px;
  width: min(92vw, 460px);
  z-index: 9999;
  pointer-events: none;
}
.toast-alert {
  margin: 0;
  padding: 8px 10px;
  font-size: 15px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .22);
  pointer-events: auto;
  text-align: center;
}
.login-body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 14%, rgba(14, 116, 144, .16) 0%, rgba(14, 116, 144, 0) 32%),
    radial-gradient(circle at 88% 82%, rgba(37, 99, 235, .14) 0%, rgba(37, 99, 235, 0) 36%),
    linear-gradient(135deg, #dbe4ef 0%, #cfd9e6 100%);
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-shell {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  background: rgba(255, 255, 255, .62);
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(10, 34, 66, .24), 0 8px 20px rgba(10, 34, 66, .12);
  overflow: hidden;
  backdrop-filter: blur(8px);
  position: relative;
  animation: loginFloatIn .55s ease-out both;
}

.login-shell::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 26px;
  background: linear-gradient(120deg, rgba(255, 255, 255, .48), rgba(255, 255, 255, 0) 45%, rgba(14, 110, 149, .18));
  pointer-events: none;
}

.login-hero {
  background: linear-gradient(160deg, #0f3f78 0%, #154f8e 55%, #0e6e95 100%);
  color: #fff;
  padding: 40px 34px;
  position: relative;
}

.login-hero-logo-wrap {
  min-height: 62px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 12px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .02));
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 10px 24px rgba(5, 20, 45, .25);
  overflow: hidden;
}

.login-hero-logo-wrap::before {
  content: "";
  position: absolute;
  inset: -30% auto auto -10%;
  width: 170px;
  height: 170px;
  background: radial-gradient(circle, rgba(255, 255, 255, .18) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.login-hero-logo-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(255,255,255,.08), rgba(255,255,255,0) 34%),
    repeating-linear-gradient(120deg, rgba(255,255,255,.03) 0 1px, transparent 1px 8px);
  mix-blend-mode: screen;
  pointer-events: none;
}

.login-hero-logo {
  max-height: 62px;
  width: auto;
  object-fit: contain;
  filter: contrast(1.2) saturate(1.08) brightness(1.1) drop-shadow(0 4px 12px rgba(0, 0, 0, .3));
  position: relative;
  z-index: 1;
}

.login-hero-logo-missing {
  color: rgba(255, 255, 255, .92);
  font-size: 12px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 8px;
  padding: 8px 10px;
}

.login-brand-chip {
  display: inline-block;
  margin-bottom: 16px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: .4px;
  text-transform: uppercase;
  background: rgba(255, 255, 255, .12);
}

.login-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.1;
}

.login-hero p {
  margin: 0 0 20px;
  color: rgba(255, 255, 255, .9);
  font-size: 16px;
}

.login-highlights {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.login-highlights li {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
}

.login-card {
  width: 100%;
  padding: 36px 30px;
  background: rgba(255, 255, 255, .88);
  position: relative;
}


.login-card h2 {
  margin: 0 0 8px;
  font-size: 34px;
  line-height: 1;
  color: #07204d;
}

.login-card p {
  margin: 0 0 18px;
  color: #4c6483;
  font-size: 15px;
}

.login-form {
  display: grid;
  gap: 6px;
}

.login-form input {
  margin-bottom: 8px;
  background: #f5f8fd;
  border: 1px solid #aec1d9;
  border-radius: 10px;
  padding: 11px 12px;
}

.login-form input:focus {
  border-color: #1b72c5;
  box-shadow: 0 0 0 3px rgba(27, 114, 197, .2);
  outline: none;
}

.login-form .btn {
  margin-top: 8px;
  height: 44px;
  border-radius: 10px;
  font-weight: 700;
  background: #1d4f88;
  border-color: #1d4f88;
  color: #fff;
  transition: background-color .18s ease, border-color .18s ease, transform .14s ease, box-shadow .18s ease;
}

.login-form .btn:hover,
.login-form .btn:focus-visible {
  background: #0e6e95;
  border-color: #0e6e95;
  color: #fff;
  box-shadow: 0 8px 16px rgba(14, 110, 149, .28);
  transform: translateY(-1px);
}

.login-site-link {
  margin-top: 10px;
  text-align: center;
  display: block;
  font-size: 13px;
  color: #2f5f92;
  text-decoration: none;
  font-weight: 600;
}

.login-site-link:hover,
.login-site-link:focus-visible {
  color: #0e6e95;
  text-decoration: underline;
}

@keyframes loginFloatIn {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(.985);
    filter: blur(1px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
  }
  .login-hero {
    padding: 24px 22px;
  }
  .login-hero-logo {
    max-height: 48px;
  }
  .login-card {
    padding: 24px 20px;
  }
  .login-card h2 {
    font-size: 28px;
  }
}
.inline-actions a { margin-right: 8px; }
@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; }
  .content { padding: 10px; }
  .page-wrap { max-width: 100%; }
  .field.span-6, .field.span-5, .field.span-4, .field.span-3, .field.span-2, .field.span-8 { grid-column: span 12; }
  .btn { width: 100%; text-align: center; }
}
.pdv-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; align-items: start; }
.pdv-mode .card > h1:first-child {
  font-size: 48px;
  color: #0b2a58;
  letter-spacing: -0.03em;
}
.pdv-search-stack { position: relative; z-index: 30; margin-bottom: 10px; }
.pdv-search-wrap { margin-bottom: 0; position: relative; z-index: 31; }
.pdv-search-input {
  width: 100%;
  height: 58px;
  padding: 0 18px;
  border: 1px solid #b6cae8;
  border-radius: 14px;
  font-size: 20px;
  font-weight: 700;
  background: #fff;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.pdv-search-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}
.pdv-resultados {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  margin-top: 0;
  border: 1px solid #dbe4f1;
  border-radius: 10px;
  background: #fff;
  max-height: 320px;
  overflow: auto;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .18);
}
.pdv-resultados:empty { display: none; }
.pdv-item { padding: 10px; border-bottom: 1px solid #eef2f7; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.pdv-item:last-child { border-bottom: 0; }
.pdv-item:hover { background: #f8fbff; }
.pdv-item.is-active { background: #eaf2ff; }
.pdv-item-main { display: flex; align-items: center; gap: 10px; }
.pdv-itens-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 12px;
  align-items: start;
}
.pdv-preview-card {
  border: 1px solid #d3e0f3;
  border-radius: 14px;
  background: #f8fbff;
  padding: 12px;
}
.pdv-preview-title {
  font-size: 12px;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 8px;
}
.pdv-preview-image-wrap {
  width: 100%;
  height: 200px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.pdv-preview-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.pdv-preview-empty {
  color: #94a3b8;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.pdv-preview-name {
  margin-top: 8px;
  font-weight: 700;
  color: #0f172a;
}
.pdv-preview-code {
  font-size: 12px;
  color: #64748b;
}

.pdv-item-row.is-selected {
  background: #eaf3ff;
}
.pdv-item-row.is-selected td {
  border-bottom-color: #dbe7ff;
}
.pdv-item-row:focus {
  outline: 2px solid #93c5fd;
  outline-offset: -2px;
}
.pdv-left table { table-layout: fixed; }
.pdv-left th, .pdv-left td { vertical-align: middle; }
.codigo-col { width: 96px; min-width: 96px; text-align: center; }
.pdv-left td.codigo-col { font-size: 11px; }
.item-col { text-align: left; width: 36%; min-width: 0; }
.pdv-left th.item-col { text-align: center; }
.pdv-left td.item-col {
  text-align: center;
  padding-left: 8px;
  padding-right: 8px;
}
.item-info {
  min-height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.preco-col { width: 88px; min-width: 88px; text-align: center; }
.qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 10px;
}
.qty-btn {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 0;
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  line-height: 1;
}
.qty-btn:hover {
  background: #dbeafe;
}
.qty-input {
  width: 52px;
  height: 24px;
  text-align: center;
  font-size: 13px !important;
  font-weight: 400;
  font-family: 'Segoe UI', sans-serif;
  padding: 0 4px;
  line-height: 1;
}
.qtd-col {
  width: 96px;
  min-width: 96px;
  text-align: left;
  padding-left: 2px !important;
  padding-right: 6px !important;
}
.total-col {
  width: 130px;
  min-width: 130px;
  text-align: center;
  padding-left: 14px !important;
  padding-right: 8px !important;
  white-space: nowrap;
}
.acoes-col { width: 84px; min-width: 84px; text-align: center; }
.acoes-col .btn {
  padding: 7px 10px;
  font-size: 13px;
  border-radius: 9px;
}
.acoes-col .btn-icon-remove {
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 6px;
  font-size: 14px;
  line-height: 24px;
  text-align: center;
}

/* PDV com sidebar recolhida para ganhar espaço */
body.pdv-mode .sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 900;
  width: 250px;
  min-width: 250px;
  padding: 20px;
  overflow: auto;
  transform: translateX(-100%);
  transition: all .22s ease;
}
body.pdv-mode.pdv-sidebar-open .sidebar {
  transform: translateX(0);
}
body.pdv-mode .content {
  transition: all .22s ease;
}
body.pdv-mode .content {
  padding: 8px;
}
body.pdv-mode .page-wrap {
  max-width: none;
  width: 100%;
  margin: 0;
}
body.pdv-mode .card {
  width: 100%;
}
.pdv-sidebar-toggle {
  position: fixed;
  left: 8px;
  top: 34px;
  transform: none;
  width: 14px;
  height: 30px;
  border: 0;
  border-radius: 7px;
  background: rgba(30, 64, 175, .28);
  color: rgba(255, 255, 255, .75);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 4px 10px rgba(15, 23, 42, .12);
}
body.pdv-mode.pdv-sidebar-open .pdv-sidebar-toggle {
  left: 214px;
}

.pdv-left td.preco-col,
.pdv-left td.total-col,
.pdv-left td.acoes-col,
.pdv-left th.preco-col,
.pdv-left th.total-col,
.pdv-left th.acoes-col,
.pdv-left td.qtd-col,
.pdv-left th.qtd-col {
  text-align: center;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.qty-input[type="number"] {
  -moz-appearance: textfield;
}
.pdv-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #dbe4f1;
  background: #fff;
}
.pdv-thumb-empty { background: #e2e8f0; }
.tbl-thumb {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #dbe4f1;
  background: #fff;
  user-select: none;
}
.tbl-thumb-zoom { cursor: zoom-in; }
.tbl-thumb-empty { background: #e2e8f0; border: 1px solid #cbd5e1; }
.img-zoom-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}
.img-zoom-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.75);
}
.img-zoom-content {
  position: relative;
  z-index: 2;
  max-width: min(92vw, 1000px);
  max-height: 88vh;
  margin: 4vh auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.img-zoom-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  padding: 6px;
}
.img-zoom-close {
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 600;
}
.pdv-total { margin-top: 14px; font-size: 22px; font-weight: 700; color: var(--primary-dark); }
.pdv-right { position: sticky; top: 10px; }
.pdv-right.card {
  background: linear-gradient(160deg, #f8fbff 0%, #eef4ff 55%, #e6efff 100%);
  border: 1px solid #d8e6ff;
  border-radius: 16px;
  box-shadow: 0 14px 28px rgba(28, 57, 115, .15);
}
.pdv-right.card form > label {
  color: rgba(15, 23, 42, .72);
  font-weight: 400;
  font-size: 13px;
}
.pdv-right.card form > select,
.pdv-right.card form > input[type="text"],
.pdv-right.card form > textarea {
  background: #0d4c7f;
  border: 1px solid #7aa2ff;
  color: #fff;
  font-weight: 800;
  height: 40px;
  min-height: 40px;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 40px;
}
.pdv-right.card form > input::placeholder,
.pdv-right.card form > textarea::placeholder {
  color: rgba(255,255,255,.88);
  font-weight: 700;
}
.pdv-right.card form > select:focus,
.pdv-right.card form > input[type="text"]:focus,
.pdv-right.card form > textarea:focus {
  border-color: #c7d8ff;
  box-shadow: 0 0 0 3px rgba(86, 125, 255, .28);
}
.pdv-mini-card,
.pdv-total-card {
  margin-top: 12px;
  background: #0d4c7f;
  border: 1px solid #7aa2ff;
  border-radius: 12px;
  padding: 8px 12px 10px;
}
.pdv-mini-title {
  color: rgba(255,255,255,.9);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.1;
}
.pdv-mini-value {
  margin-top: 4px;
  text-align: right;
}
.pdv-mini-money {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pdv-mini-money .pdv-currency {
  color: #fff;
  font-weight: 900;
  font-size: 26px;
  line-height: 1;
}
.pdv-right.card .pdv-mini-card > input[type="text"] {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #fff;
  font-weight: 900;
  font-size: 34px;
  height: 34px;
  min-height: 34px;
  line-height: 34px;
  padding: 0;
}
.pdv-right.card .pdv-mini-money > input[type="text"] {
  flex: 1;
  margin-top: 0;
  text-align: right;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #fff;
  font-weight: 900;
  font-size: 34px;
  height: 34px;
  min-height: 34px;
  line-height: 34px;
  padding: 0;
}
.pdv-right.card .pdv-total {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: #fff;
  font-weight: 900;
  text-align: right;
  margin-top: 0;
  padding: 2px 0 0;
  font-size: 34px;
  line-height: 1.1;
  white-space: nowrap;
}
.pdv-total .pdv-currency {
  font-size: .95em;
  font-weight: 900;
}
.pdv-total .pdv-amount {
  font-size: 1em;
  font-weight: 900;
}
.pdv-right.card .form-actions {
  justify-content: center;
}
.pdv-parcelas-wrap {
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #c6d7f3;
  background: #f0f6ff;
}
.pdv-parcelas-wrap label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #174272;
}
.pdv-parcelas-preview {
  margin-top: 8px;
  color: #174272;
  font-size: 13px;
  font-weight: 700;
}
.pdv-shortcuts {
  margin-top: 14px;
  border: 1px solid #bfd6f9;
  border-radius: 12px;
  padding: 10px;
  background: #eef5ff;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
}
.pdv-shortcuts span {
  font-size: 12px;
  color: #0b2a58;
  font-weight: 700;
}
.pdv-shortcuts strong {
  display: inline-block;
  min-width: 30px;
  color: #fff;
  background: #1e4fbf;
  border-radius: 6px;
  text-align: center;
  padding: 2px 6px;
  margin-right: 5px;
}
.preview-foto {
  margin-top: 8px;
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #dbe4f1;
}
.preview-foto-lg {
  width: 260px;
  height: 260px;
}
.upload-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}
.upload-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 92px;
  border: 2px dashed #93c5fd;
  border-radius: 12px;
  background: #f8fbff;
  cursor: pointer;
  transition: .2s ease;
}
.upload-box:hover {
  border-color: #2563eb;
  background: #eff6ff;
}
.upload-title {
  font-weight: 700;
  color: #1e3a8a;
}
.upload-sub {
  font-size: 12px;
  color: #64748b;
}

@media (max-width: 1100px) {
  .pdv-grid { grid-template-columns: 1fr; }
  .pdv-right { position: static; }
  .pdv-itens-layout { grid-template-columns: 1fr; }
  .pdv-preview-image-wrap { height: 160px; }
  .pdv-shortcuts { grid-template-columns: 1fr; }
}
.foto-topo {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 14px;
  align-items: start;
}
.produto-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 14px;
  align-items: start;
}
.produto-logo-col {
  align-self: start;
}
.produto-logo-col .empresa-logo-box {
  margin-top: 6px;
  width: 260px;
  height: 260px;
  padding: 8px;
}
.produto-logo-col .empresa-logo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}
.produto-layout > .form-grid {
  margin-top: 28px;
}
.barcode-head-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
}
.barcode-auto-row {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: #0f172a;
}
.barcode-auto-row input[type="checkbox"] {
  margin: 0;
}
#codigoBarrasManual::placeholder {
  font-size: 11px;
  font-style: italic;
}
.foto-click {
  display: inline-block;
  position: relative;
  cursor: pointer;
}
.foto-hint {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  background: rgba(15, 23, 42, .65);
  color: #fff;
  border-radius: 8px;
  padding: 6px 8px;
  text-align: center;
  font-size: 12px;
}
.preview-vazio {
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  border: 2px dashed #94a3b8;
}
.foto-meta label { margin-bottom: 6px; display: block; }
@media (max-width: 900px) {
  .foto-topo { grid-template-columns: 1fr; }
  .produto-layout { grid-template-columns: 1fr; }
  .produto-layout > .form-grid { margin-top: 0; }
}
.produto-view-card { padding: 18px; }
.produto-view-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; }
.produto-view-head h1 { margin: 0; font-size: 34px; }
.produto-view-codigo { color: var(--muted); font-weight: 600; }
.produto-view-grid { margin-top: 14px; display: grid; grid-template-columns: 320px 1fr; gap: 16px; }
.produto-view-foto-wrap { background: #f8fafc; border: 1px solid #dbe4f1; border-radius: 12px; padding: 10px; display:flex; align-items:center; justify-content:center; }
.produto-view-foto { width: 100%; max-width: 280px; height: 280px; object-fit: cover; border-radius: 10px; }
.produto-view-foto-empty { display:flex; align-items:center; justify-content:center; color: var(--muted); font-weight: 600; background:#e2e8f0; }
.produto-view-dados { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.produto-view-kpi { background: #f8fafc; border: 1px solid #dbe4f1; border-radius: 10px; padding: 10px; display:flex; flex-direction:column; gap:4px; }
.produto-view-kpi strong { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
.produto-view-kpi span { font-size: 16px; font-weight: 700; }

@media (max-width: 900px) {
  .produto-view-grid { grid-template-columns: 1fr; }
  .produto-view-foto { height: 220px; }
  .produto-view-dados { grid-template-columns: 1fr; }
  .produto-view-head h1 { font-size: 28px; }
}

/* Padrao visual moderno global */
.card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px;
}

.card > h1:first-child {
  margin: 0 0 16px;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.card > h2:first-child {
  margin: 0 0 14px;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.actions input[type="text"],
.actions input[type="search"],
.actions input[type="date"] {
  height: 36px;
  min-height: 36px;
  border-radius: 10px;
}
.actions select {
  height: 36px;
  min-height: 36px;
}

table {
  border-radius: 10px;
  overflow: hidden;
}

.module-modern {
  position: relative;
  overflow: hidden;
}

.module-modern::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #2563eb, #0ea5e9, #16a34a);
}

.module-modern-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.module-modern-head h1 {
  margin: 6px 0 0;
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.module-modern-tag {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 700;
  font-size: 12px;
}

.card .module-modern-text {
  margin: 12px 0 0;
  color: #475569;
  max-width: 760px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.module-modern-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.gerenciar-panel {
  text-decoration: none;
  color: inherit;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

.gerenciar-panel:hover {
  transform: translateY(-2px);
  border-color: #bfdbfe;
  box-shadow: 0 10px 22px rgba(30, 64, 175, .12);
}

.gerenciar-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.gerenciar-panel h3 {
  margin: 0;
  color: #0f172a;
  font-size: 22px;
  line-height: 1.2;
}

.gerenciar-panel p {
  margin: 10px 0 0;
  color: #475569;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}

.gerenciar-panel-tag {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
}

/* PDV e vendas no mesmo acabamento */
.pdv-search-wrap {
  background: #f8fafc;
  border: 1px solid #dbe4f1;
  border-radius: 14px;
  padding: 10px;
}

.pdv-right.card h3,
.pdv-left .card h3 {
  margin: 0 0 12px;
  font-size: 36px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #0b2a58;
}

.pdv-right.card h3 { font-size: 22px; letter-spacing: -0.01em; color: #546d8f; }
.pdv-right.card h3 { color: #0f172a; }

@media (max-width: 900px) {
  .card > h1:first-child { font-size: 34px; }
  .card > h2:first-child { font-size: 26px; }
  .module-modern-head h1 { font-size: 30px; }
  .module-modern-actions .btn { width: auto; }
}

.empresa-modern-card { max-width: 1120px; margin: 0 auto; }
.empresa-form { display: grid; gap: 14px; }
.empresa-top-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid #96b9e6;
  border-radius: 12px;
  background: #f7fbff;
}
.empresa-label { display: block; font-weight: 700; margin-bottom: 6px; color: #1f4f86; }
.empresa-logo-col { align-self: stretch; display: flex; }
.empresa-logo-box {
  width: 100%;
  height: 100%;
  min-height: 132px;
  border: 1px dashed #89aee0;
  border-radius: 12px;
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  padding: 6px;
}
.empresa-logo-box img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.empresa-logo-placeholder { font-size: 12px; color: #54739d; text-align: center; padding: 6px; }
.empresa-hidden-input { display: none !important; }
.empresa-main-col {
  border: 1px solid #96b9e6;
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, .35);
}
.empresa-main-col h2 { margin: 0; font-size: 24px; line-height: 1.1; color: #163f74; font-weight: 800; }
.empresa-main-col p { margin: 6px 0 8px; color: #1e4d85; font-size: 13px; }
.empresa-main-col .field label { margin-bottom: 4px; }
.empresa-label-small { font-size: 12px; letter-spacing: .02em; }
.empresa-grid .field { margin-bottom: 0; }
.empresa-footnote { margin: 0; color: #395f8c; font-size: 14px; }

@media (max-width: 900px) {
  .empresa-top-grid { grid-template-columns: 1fr; }
  .empresa-logo-col { justify-self: center; }
  .empresa-main-col h2 { font-size: 22px; }
}

/* PDV refatorado em cards */
.pdv-shell {
  background: #d7e7fb;
  border-color: #b7d0ef;
  height: calc(100dvh - 16px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.pdv-header {
  background: #0d4c7f;
  border: 1px solid #0d4c7f;
  border-radius: 8px;
  margin-bottom: 6px;
  padding: 4px 8px 6px;
  min-height: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
body.pdv-mode .pdv-header.card > h1:first-child {
  margin: 0;
  font-size: 26px !important;
  letter-spacing: .02em;
  color: #fff !important;
  text-align: center;
  font-weight: 900;
  line-height: 1.05;
}
.pdv-header-status {
  margin-top: 3px;
  color: #e8f1ff;
  font-weight: 700;
  font-size: clamp(11px, 1.2vw, 14px);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 98%;
  text-align: center;
}
.pdv-grid-modern {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 8px;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}
.pdv-col-left, .pdv-col-main { min-height: 0; }
.pdv-col-left {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 8px;
}
.pdv-col-left .pdv-product-card {
  flex: 1 1 auto;
  min-height: 0;
}
.pdv-col-left .pdv-fs-mini {
  margin-top: 0;
}
.pdv-col-main {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  height: 100%;
  padding-bottom: 8px;
  gap: 8px;
}
.pdv-card { background: #e6f0fc; border: 1px solid #bad0ea; border-radius: 10px; padding: 8px; }
.pdv-info-title {
  margin: -8px -8px 6px;
  padding: 5px 9px;
  border-radius: 10px 10px 0 0;
  background: #0d4c7f;
  color: #fff;
  font-weight: 800;
  letter-spacing: .02em;
  font-size: 13px;
}
.pdv-product-card .pdv-preview-image-wrap {
  height: 100%;
  min-height: 0;
  background: #fff;
  border-color: #9cb9da;
}
.pdv-product-card .pdv-preview-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.08);
}
.pdv-search-wrap { background: #fff; border-color: #9cb9da; }
.pdv-search-input { height: 32px; font-size: 16px; color: #0f172a; }
.pdv-barcode-top-card {
  margin-bottom: 8px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.pdv-barcode-centered { max-width: none; width: 100%; margin-left: 0; margin-right: 0; }
.pdv-barcode-top-card .pdv-search-wrap {
  padding: 0;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #c5d8ef;
}
.pdv-barcode-top-card .pdv-search-input {
  height: 36px;
  font-size: 17px;
  font-weight: 700;
  color: #2d4666;
  background: #fff;
  border: 0;
  border-radius: 10px;
  padding: 0 9px;
  text-align: center;
  caret-color: #00c853;
}
.pdv-barcode-top-card .pdv-search-input::placeholder {
  color: rgba(141, 164, 191, .38);
  font-weight: 500;
  text-align: center;
}
.pdv-barcode-top-card .pdv-search-input:focus {
  box-shadow: 0 0 0 2px rgba(22, 163, 74, .35);
}
.pdv-subtotal-amount {
  background: #fff;
  border: 1px solid #9cb9da;
  border-radius: 10px;
  min-height: clamp(40px, 6vh, 54px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 8px 14px;
  font-size: clamp(18px, 2.6vh, 24px);
  font-weight: 800;
  color: #0d2a4d;
}
.pdv-amount-sm {
  min-height: clamp(34px, 4.5vh, 44px);
  font-size: clamp(16px, 2.3vh, 22px);
}
.pdv-right-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.pdv-totals-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.pdv-actions-card .btn { width: 100%; margin-bottom: 8px; min-height: 46px; font-weight: 800; }
.pdv-actions-card .btn:last-child { margin-bottom: 0; }
.pdv-list-card .table-wrap { max-height: 320px; overflow: auto; }
.pdv-list-card { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.pdv-list-card .table-wrap {
  flex: 1;
  max-height: none;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: #fff;
  border-radius: 8px;
}
.pdv-list-card table { background: #fff; }
.pdv-list-card table {
  width: 100%;
  table-layout: fixed;
}
.pdv-list-card .num-col { width: 10%; }
.pdv-list-card .codigo-col { width: 18%; }
.pdv-list-card .item-col { width: 28%; }
.pdv-list-card .preco-col { width: 12%; }
.pdv-list-card .qtd-col { width: 10%; }
.pdv-list-card .unidade-col { width: 10%; }
.pdv-list-card .total-col { width: 12%; }
.pdv-list-card thead th {
  padding: 4px 12px;
  font-size: 13px;
  line-height: 1.1;
  text-align: center !important;
  background: #0a4f86;
  color: #fff;
}
.pdv-list-card tbody td {
  padding: 2px 12px;
  font-size: 13px;
  line-height: .95;
  vertical-align: middle;
  text-align: center !important;
  font-weight: 400;
}
.pdv-list-card tbody tr { height: 24px; }
.pdv-list-card .item-info {
  min-height: 0;
  display: block;
  line-height: .95;
  text-align: left;
}
.pdv-list-card th.item-col,
.pdv-list-card td.item-col {
  text-align: center !important;
  padding-left: 20px !important;
  padding-right: 12px !important;
}
.pdv-list-card thead th.item-col {
  text-align: center !important;
}
.pdv-list-card thead th.item-col .pdv-item-head {
  display: block;
  width: min(320px, 100%);
  margin: 0 auto;
  text-align: left;
}
.pdv-list-card th.preco-col,
.pdv-list-card td.preco-col {
  text-align: center !important;
}
.pdv-list-card thead th.preco-col {
  text-align: center !important;
}
.pdv-list-card thead th.preco-col .pdv-preco-head {
  display: inline-block;
  min-width: 72px;
  text-align: right;
}
.pdv-list-card tbody td.preco-col {
  text-align: center !important;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  white-space: nowrap;
}
.pdv-list-card tbody td.preco-col .pdv-preco-num {
  display: inline-block;
  min-width: 72px;
  text-align: right;
}
.pdv-list-card th.qtd-col,
.pdv-list-card td.qtd-col {
  text-align: center !important;
}
.pdv-list-card th.unidade-col,
.pdv-list-card td.unidade-col {
  text-align: center !important;
}
.pdv-list-card .item-info strong {
  display: block;
  line-height: .95;
  font-weight: 700;
}
.pdv-list-card .item-info .pdv-item-text {
  display: block;
  width: min(320px, 100%);
  margin: 0 auto;
  text-align: left;
}
.pdv-list-card tbody td.preco-col,
.pdv-list-card tbody td.qtd-col,
.pdv-list-card tbody td.unidade-col,
.pdv-list-card tbody td.total-col {
  font-weight: 700;
}
.pdv-list-card thead th.total-col {
  text-align: center !important;
}
.pdv-list-card thead th.total-col .pdv-total-head {
  display: inline-block;
  min-width: 72px;
  text-align: right;
}
.pdv-list-card tbody td.total-col {
  text-align: center !important;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  white-space: nowrap;
}
.pdv-list-card tbody td.total-col .pdv-total-num {
  display: inline-block;
  min-width: 72px;
  text-align: right;
}
.pdv-list-card .num-col {
  min-width: 0;
  text-align: center;
}
.pdv-list-card tbody,
.pdv-list-card tbody tr,
.pdv-list-card tbody td { background: #fff; }
.pdv-list-card tbody td,
.pdv-list-card tbody tr,
.pdv-list-card thead th {
  border-bottom: 0 !important;
}
.pdv-qtd-view { display: inline-block; min-width: 28px; font-weight: 700; }
.pdv-fs-mini {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: clamp(4px, .8vh, 6px);
  margin-top: 0;
}
.pdv-f-key {
  border: 1px solid #9bbad9;
  background: #fff;
  color: #0d4c7f;
  border-radius: 6px;
  font-size: clamp(9px, 1.2vh, 10px);
  font-weight: 700;
  padding: clamp(2px, .45vh, 4px) 6px;
  line-height: 1;
  min-height: clamp(18px, 2.6vh, 24px);
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.pdv-f-key-label {
  min-width: 18px;
  text-align: right;
  font-weight: 800;
}
.pdv-f-key-text {
  min-width: 70px;
  text-align: left;
}
.pdv-f-key:hover,
.pdv-f-key:focus {
  background: #edf4ff;
  outline: none;
}
.pdv-item-row.is-selected { background: #dbeafe !important; }
.pdv-item-row.is-selected td { background: #dbeafe !important; }
.pdv-shortcuts-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.pdv-shortcuts-bar span {
  background: #fff;
  border: 1px solid #aac5e3;
  border-radius: 8px;
  padding: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #12365b;
}
.pdv-shortcuts-bar strong {
  background: #0d4c7f;
  color: #fff;
  border-radius: 6px;
  padding: 2px 6px;
  margin-right: 4px;
}
.pdv-pay-modal { position: fixed; inset: 0; z-index: 9998; }
.pdv-pay-backdrop { position: absolute; inset: 0; background: rgba(2, 18, 38, .6); }
.pdv-pay-dialog {
  position: relative;
  z-index: 2;
  width: min(1260px, 96vw);
  margin: 4vh auto 0;
  background: #dce9fa;
  border: 1px solid #8eb0d8;
  box-shadow: 0 20px 40px rgba(10, 30, 60, .45);
}
.pdv-pay-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.pdv-pay-head h3 { margin: 0; font-size: 26px; color: #0d2a4d; }
.pdv-pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.pdv-pay-summary-card {
  position: relative;
  margin: 0 0 10px;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid #1c5d99;
  background: #0f4d85;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
}
.pdv-pay-summary-card.is-ok {
  background: #16a34a;
  border-color: #15803d;
}
.pdv-pay-summary-card.is-alert {
  background: #ef4444;
  border-color: #dc2626;
}
.pdv-pay-summary-card.is-warn {
  background: #f59e0b;
  border-color: #d97706;
}
.pdv-pay-summary-text {
  color: #ffffff;
  font-size: 24px;
  font-weight: 800;
  text-align: center;
  line-height: 1.2;
}
.pdv-pay-summary-note {
  font-weight: 500;
}
.pdv-pay-summary-badge {
  position: absolute;
  top: 8px;
  right: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .55);
  background: rgba(10, 20, 35, .22);
  color: #fff;
  padding: 2px 8px;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 600;
  white-space: nowrap;
}
.pdv-pay-dialog .pdv-mini-card, .pdv-pay-dialog .pdv-total-card { margin-top: 8px; }
body.pdv-pay-open { overflow: hidden; }

#pdvPayModal .pdv-pay-dialog {
  --pdv-value-y-offset: -2px;
  background: #b8c7dc;
  border-color: #1b4f86;
  border-width: 4px;
  border-radius: 16px;
  padding: 14px 16px 18px;
  width: min(980px, 92vw);
  max-height: 92vh;
  overflow: auto;
}
#pdvPayModal .pdv-pay-head h3 {
  color: #0d2d54;
  font-size: 30px;
  font-weight: 900;
}
#pdvPayModal .pdv-pay-title-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}
#pdvPayModal .pdv-pay-status-inline {
  min-height: 20px;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
}
#pdvPayModal .pdv-pay-status-value {
  font-size: inherit;
  font-weight: 900;
  margin: 0;
}
#pdvPayModal .pdv-pay-col {
  display: grid;
  grid-auto-rows: 96px;
  gap: 8px;
}
#pdvPayModal .pdv-pay-field label,
#pdvPayModal .pdv-parcelas-wrap label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: #fff;
  font-weight: 500;
  font-size: 20px;
  margin: 0 0 4px;
}
#pdvPayModal .pdv-pay-multi-hint {
  margin-top: 0;
  font-size: 11px;
  line-height: 1.1;
  font-weight: 300;
  color: #ffffff;
  text-transform: none;
  white-space: nowrap;
  transition: all .18s ease;
}
#pdvPayModal .pdv-pay-multi-hint.pdv-pay-multi-hint-alert {
  color: #fef08a;
  font-weight: 800;
  text-shadow:
    0 0 6px rgba(255, 255, 190, 1),
    0 0 14px rgba(254, 240, 138, .95),
    0 0 24px rgba(250, 204, 21, .85),
    0 0 36px rgba(250, 204, 21, .75);
}
#pdvPayModal .pdv-pay-multi-hint.pdv-pay-multi-hint-thin {
  font-weight: 300 !important;
  letter-spacing: .1px;
  text-shadow:
    0 0 5px rgba(255, 255, 190, .95),
    0 0 12px rgba(254, 240, 138, .9),
    0 0 20px rgba(250, 204, 21, .8),
    0 0 30px rgba(250, 204, 21, .7) !important;
}
#pdvPayModal .pdv-pay-field {
  margin-top: 0;
  background: #0f4d85;
  border: 1px solid #1c5d99;
  border-radius: 12px;
  padding: 10px 12px;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
#pdvPayModal .pdv-pay-field select,
#pdvPayModal .pdv-parcelas-wrap select {
  width: 100%;
  height: 38px;
  border-radius: 10px;
  border: 0;
  padding: 0 30px 0 12px;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  background: #0f4d85;
  text-align: right;
  text-align-last: right;
}
#pdvPayModal .pdv-pay-field select option,
#pdvPayModal .pdv-parcelas-wrap select option {
  text-align: left;
  font-size: 16px;
  font-weight: 600;
}
#pdvPayModal .pdv-parcelas-wrap {
  border: 1px solid #1c5d99;
  border-radius: 12px;
  padding: 10px;
  background: #0f4d85;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
#pdvPayModal #pdvParcelasWrap select {
  font-size: 24px;
  font-weight: 700;
  height: 36px;
  line-height: 1.1;
}
#pdvPayModal #pdvParcelasWrap {
  margin-top: -1px;
}
#pdvPayModal .pdv-parcelas-preview {
  display: none;
}
#pdvPayModal .pdv-mini-card,
#pdvPayModal .pdv-total-card {
  margin-top: 0;
  background: #0f4d85;
  border: 1px solid #1c5d99;
  border-radius: 12px;
  padding: 10px 12px;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: 24px 1fr;
  align-items: stretch;
}
#pdvPayModal .pdv-mini-title {
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 0;
  line-height: 24px;
  min-height: 24px;
}
#pdvPayModal .pdv-mini-money {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}
#pdvPayModal .pdv-mini-money .pdv-currency,
#pdvPayModal .pdv-total .pdv-currency {
  color: #fff;
  font-size: 26px;
  font-weight: 900;
  transform: translateY(var(--pdv-value-y-offset));
}
#pdvPayModal .pdv-mini-value {
  height: 38px;
  border-radius: 10px;
  border: 0;
  background: #0f4d85;
  color: #fff;
  font-size: 32px;
  font-weight: 800;
  font-family: inherit;
  padding: 0 12px;
  text-align: right;
  line-height: 1;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  transform: translateY(calc(var(--pdv-value-y-offset) - 2px));
}
#pdvPayModal .pdv-mini-value[readonly] {
  opacity: 1;
}
#pdvPayModal .pdv-pay-field select:focus,
#pdvPayModal .pdv-parcelas-wrap select:focus,
#pdvPayModal .pdv-mini-value:focus {
  outline: none;
  box-shadow: none;
}
#pdvPayModal .pdv-pay-field.is-kbd-active,
#pdvPayModal .pdv-parcelas-wrap.is-kbd-active,
#pdvPayModal .pdv-mini-card.is-kbd-active,
#pdvPayModal .pdv-total-card.is-kbd-active,
#pdvPayModal .pdv-pay-field:focus-within,
#pdvPayModal .pdv-parcelas-wrap:focus-within,
#pdvPayModal .pdv-mini-card:focus-within,
#pdvPayModal .pdv-total-card:focus-within {
  box-shadow: inset 0 0 0 2px #ffffff, 0 0 0 2px rgba(255, 255, 255, .45), 0 0 18px rgba(255, 255, 255, .35);
  border-color: #ffffff;
  border-radius: 12px;
}
#pdvPayModal .pdv-mini-card:focus,
#pdvPayModal .pdv-total-card:focus,
#pdvPayModal .pdv-pay-field:focus,
#pdvPayModal .pdv-parcelas-wrap:focus {
  outline: none;
}
#pdvPayModal .pdv-mini-value:focus,
#pdvPayModal .pdv-pay-field select:focus,
#pdvPayModal .pdv-parcelas-wrap select:focus {
  border-radius: 10px;
}
#pdvPayModal .pdv-mini-value::placeholder {
  color: rgba(255, 255, 255, .75);
}
#pdvPayModal .pdv-mini-value::selection,
#pdvPayModal .pdv-pay-field select::selection,
#pdvPayModal .pdv-parcelas-wrap select::selection {
  background: rgba(255, 255, 255, .85);
  color: #0f3b79;
}
#pdvPayModal .pdv-mini-value::-moz-selection,
#pdvPayModal .pdv-pay-field select::-moz-selection,
#pdvPayModal .pdv-parcelas-wrap select::-moz-selection {
  background: rgba(59, 130, 246, .35);
  color: #fff;
}
#pdvPayModal #pdvTroco,
#pdvPayModal #pdvTotal {
  margin-top: 0;
  color: #fff;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}
#pdvPayModal #pdvTroco .pdv-amount,
#pdvPayModal #pdvTotal .pdv-amount {
  color: #fff;
  font-size: 32px;
  line-height: 1;
  font-weight: 800;
  font-family: inherit;
  text-align: right;
  justify-self: end;
  padding-right: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transform: translateY(var(--pdv-value-y-offset));
}
#pdvPayModal .pdv-mini-card.pdv-troco-alert {
  border-color: #ef4444 !important;
  box-shadow: inset 0 0 0 2px rgba(239, 68, 68, .75), 0 0 0 2px rgba(127, 29, 29, .15);
}
#pdvPayModal .pdv-mini-card.pdv-troco-alert .pdv-mini-title,
#pdvPayModal .pdv-mini-card.pdv-troco-alert .pdv-currency,
#pdvPayModal .pdv-mini-card.pdv-troco-alert #pdvTroco .pdv-amount {
  color: #fee2e2 !important;
}
#pdvPayModal .pdv-mini-card.pdv-desconto-alert {
  border-color: #f59e0b !important;
  box-shadow: inset 0 0 0 2px rgba(245, 158, 11, .55), 0 0 0 2px rgba(120, 53, 15, .12);
}
#pdvPayModal .pdv-mini-card.pdv-desconto-alert .pdv-mini-title,
#pdvPayModal .pdv-mini-card.pdv-desconto-alert .pdv-currency,
#pdvPayModal .pdv-mini-card.pdv-desconto-alert .pdv-mini-value {
  color: #fef3c7 !important;
}
#pdvPayModal .pdv-mini-card.pdv-acrescimo-alert {
  border-color: #22c55e !important;
  box-shadow: inset 0 0 0 2px rgba(34, 197, 94, .55), 0 0 0 2px rgba(20, 83, 45, .12);
}
#pdvPayModal .pdv-mini-card.pdv-acrescimo-alert .pdv-mini-title,
#pdvPayModal .pdv-mini-card.pdv-acrescimo-alert .pdv-currency,
#pdvPayModal .pdv-mini-card.pdv-acrescimo-alert .pdv-mini-value {
  color: #dcfce7 !important;
}
#pdvPayModal .pdv-total-card.pdv-total-discount-alert {
  border-color: #f59e0b !important;
  box-shadow: inset 0 0 0 2px rgba(245, 158, 11, .55), 0 0 0 2px rgba(120, 53, 15, .12);
}
#pdvPayModal .pdv-total-card.pdv-total-discount-alert .pdv-mini-title,
#pdvPayModal .pdv-total-card.pdv-total-discount-alert .pdv-currency,
#pdvPayModal .pdv-total-card.pdv-total-discount-alert #pdvTotal .pdv-amount {
  color: #fef3c7 !important;
}
#pdvPayModal .pdv-total-card.pdv-total-acrescimo-alert {
  border-color: #22c55e !important;
  box-shadow: inset 0 0 0 2px rgba(34, 197, 94, .55), 0 0 0 2px rgba(20, 83, 45, .12);
}
#pdvPayModal .pdv-total-card.pdv-total-acrescimo-alert .pdv-mini-title,
#pdvPayModal .pdv-total-card.pdv-total-acrescimo-alert .pdv-currency,
#pdvPayModal .pdv-total-card.pdv-total-acrescimo-alert #pdvTotal .pdv-amount {
  color: #dcfce7 !important;
}
#pdvPayModal .pdv-total-card.pdv-total-mixed-alert {
  border-color: #38bdf8 !important;
  box-shadow: inset 0 0 0 2px rgba(56, 189, 248, .5), 0 0 0 2px rgba(8, 47, 73, .12);
}
#pdvPayModal .pdv-total-card.pdv-total-mixed-alert .pdv-mini-title,
#pdvPayModal .pdv-total-card.pdv-total-mixed-alert .pdv-currency,
#pdvPayModal .pdv-total-card.pdv-total-mixed-alert #pdvTotal .pdv-amount {
  color: #e0f2fe !important;
}
#pdvPayModal .pdv-total-card.pdv-total-troco-alert {
  border-color: #ef4444 !important;
  box-shadow: inset 0 0 0 2px rgba(239, 68, 68, .75), 0 0 0 2px rgba(127, 29, 29, .15);
}
#pdvPayModal .pdv-total-card.pdv-total-troco-alert .pdv-mini-title,
#pdvPayModal .pdv-total-card.pdv-total-troco-alert .pdv-currency,
#pdvPayModal .pdv-total-card.pdv-total-troco-alert #pdvTotal .pdv-amount {
  color: #fee2e2 !important;
}
#pdvPayModal .pdv-mini-money .pdv-currency,
#pdvPayModal .pdv-total .pdv-currency { align-self: center; }
#pdvPayModal .form-actions {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}
#pdvPayModal #btnLimparPagamentos,
#pdvPayModal #btnFinalizarVenda {
  min-width: 280px;
  height: 56px;
  font-size: 26px;
  font-weight: 800;
  border-radius: 12px;
  border: 2px solid transparent !important;
  box-shadow: none;
}
#pdvPayModal #btnLimparPagamentos {
  font-size: 22px;
}
#pdvPayModal #btnLimparPagamentos {
  background: #f59e0b;
  color: #fff;
}
#pdvPayModal #btnLimparPagamentos:hover {
  background: #d97706;
}
#pdvPayModal #btnLimparPagamentos:focus,
#pdvPayModal #btnLimparPagamentos:focus-visible,
#pdvPayModal #btnFinalizarVenda:focus,
#pdvPayModal #btnFinalizarVenda:focus-visible {
  outline: none;
  border-color: #fff !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .4);
}

@media (max-width: 1280px) {
  #pdvPayModal .pdv-pay-dialog {
    width: min(920px, 94vw);
    padding: 12px 12px 14px;
  }
  #pdvPayModal .pdv-pay-head h3 { font-size: 26px; }
  #pdvPayModal .pdv-pay-field label,
  #pdvPayModal .pdv-parcelas-wrap label { font-size: 18px; }
  #pdvPayModal .pdv-pay-field select,
  #pdvPayModal .pdv-parcelas-wrap select { font-size: 25px; }
  #pdvPayModal .pdv-mini-value,
  #pdvPayModal #pdvTroco .pdv-amount,
  #pdvPayModal #pdvTotal .pdv-amount { font-size: 29px; }
  #pdvPayModal .pdv-mini-money .pdv-currency,
  #pdvPayModal .pdv-total .pdv-currency { font-size: 24px; }
}

@media (max-width: 1100px) {
  #pdvPayModal .pdv-pay-dialog {
    --pdv-value-y-offset: -3px;
    width: min(860px, 95vw);
  }
  #pdvPayModal .pdv-pay-field select,
  #pdvPayModal .pdv-parcelas-wrap select { font-size: 23px; }
  #pdvPayModal .pdv-mini-value,
  #pdvPayModal #pdvTroco .pdv-amount,
  #pdvPayModal #pdvTotal .pdv-amount { font-size: 26px; }
  #pdvPayModal .pdv-mini-money .pdv-currency,
  #pdvPayModal .pdv-total .pdv-currency { font-size: 22px; }
}

@media (max-height: 820px) {
  #pdvPayModal .pdv-pay-dialog {
    margin-top: 2vh;
    max-height: 95vh;
    padding: 10px 10px 12px;
  }
  #pdvPayModal .pdv-pay-head { margin-bottom: 6px; }
  #pdvPayModal .pdv-pay-head h3 { font-size: 24px; }
  #pdvPayModal .pdv-pay-grid { gap: 8px; }
  #pdvPayModal .pdv-pay-col { gap: 6px; }
  #pdvPayModal .pdv-pay-field,
  #pdvPayModal .pdv-parcelas-wrap,
  #pdvPayModal .pdv-mini-card,
  #pdvPayModal .pdv-total-card {
    height: 100%;
    min-height: 0;
    padding: 8px 10px;
  }
  #pdvPayModal .pdv-pay-col { grid-auto-rows: 74px; }
  #pdvPayModal .pdv-pay-field select,
  #pdvPayModal .pdv-parcelas-wrap select { height: 34px; font-size: 24px; }
  #pdvPayModal #pdvParcelasWrap select { font-size: 22px; height: 32px; }
  #pdvPayModal #pdvParcelasWrap { margin-top: 0; }
  #pdvPayModal .pdv-mini-title,
  #pdvPayModal .pdv-pay-field label,
  #pdvPayModal .pdv-parcelas-wrap label { font-size: 16px; margin-bottom: 4px; }
  #pdvPayModal .pdv-mini-value { height: 34px; font-size: 26px; }
  #pdvPayModal .pdv-mini-money .pdv-currency,
  #pdvPayModal .pdv-total .pdv-currency { font-size: 22px; }
  #pdvPayModal #pdvTroco .pdv-amount,
  #pdvPayModal #pdvTotal .pdv-amount { font-size: 26px; }
  #pdvPayModal #btnFinalizarVenda { height: 48px; min-width: 230px; font-size: 22px; }
}
.pdv-pay-dialog.pdv-qtd-dialog {
  width: min(620px, 92vw) !important;
  max-width: 620px;
  margin: 10vh auto 0 !important;
}
.pdv-qtd-list { max-height: 62vh; overflow: auto; display: grid; gap: 8px; }
.pdv-qtd-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f7fbff;
  border: 1px solid #c5d8ef;
  border-radius: 10px;
  padding: 8px 10px;
}
.pdv-qtd-row.is-active {
  background: #dcfce7;
  border-color: #86efac;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, .14);
}
.pdv-qtd-main strong { display: block; color: #102a49; }
.pdv-qtd-main small { color: #4b6a8d; font-weight: 600; }
.pdv-qtd-stepper { display: inline-flex; align-items: center; gap: 8px; }
.pdv-qtd-num { min-width: 26px; text-align: center; font-weight: 800; color: #0d4c7f; }
.pdv-qtd-empty { text-align: center; color: #4b6a8d; font-weight: 700; padding: 14px; }
.pdv-pay-dialog.pdv-price-dialog {
  width: min(760px, 88vw) !important;
  max-width: 760px;
  margin: 10vh auto 0 !important;
}
.pdv-price-search-wrap { margin-bottom: 8px; }
.pdv-price-search-wrap .pdv-search-input {
  width: 100%;
  height: 38px;
  border: 1px solid #b9d1ec;
  border-radius: 10px;
  padding: 0 10px;
  text-align: center;
}
.pdv-price-search-wrap .pdv-search-input::placeholder {
  color: rgba(141, 164, 191, .34);
}
.pdv-price-results {
  max-height: 45vh;
  overflow: auto;
  display: grid;
  gap: 6px;
}
.pdv-price-history-title {
  margin: 8px 0 2px;
  font-size: 12px;
  font-weight: 700;
  color: #4e6f93;
}
.pdv-price-item {
  border: 1px solid #d4e3f5;
  background: #f7fbff;
  border-radius: 8px;
  padding: 8px 10px;
  display: grid;
  gap: 2px;
  cursor: pointer;
}
.pdv-price-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
}
.pdv-price-item strong { color: #0f315a; }
.pdv-price-item small { color: #4e6f93; }
.pdv-price-item span { color: #0d4c7f; font-weight: 800; }
.pdv-price-item.is-selected {
  background: #e6f8ea;
  border-color: #b8e6c2;
  box-shadow: inset 0 0 0 2px #ffffff;
}
.pdv-price-item:focus {
  outline: 2px solid rgba(22, 163, 74, .35);
  outline-offset: 1px;
}
.pdv-price-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.pdv-price-head-actions .img-zoom-close,
.pdv-price-head-actions #pdvPriceNewQuery {
  padding: 8px 12px;
  height: 38px;
  min-height: 38px;
  line-height: 1.2;
  border-radius: 8px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pdv-price-head-actions #pdvPriceNewQuery:focus,
.pdv-price-head-actions #pdvPriceNewQuery:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px #ffffff, 0 0 0 6px rgba(22, 163, 74, .55);
  transform: translateY(-1px);
  filter: brightness(1.05);
}
.pdv-pay-dialog.pdv-remove-dialog {
  width: min(640px, 94vw) !important;
  max-width: 640px;
  margin: 12vh auto 0 !important;
}
.pdv-remove-size-sm .pdv-remove-dialog {
  width: min(560px, 94vw) !important;
  max-width: 560px;
}
.pdv-remove-size-md .pdv-remove-dialog {
  width: min(640px, 94vw) !important;
  max-width: 640px;
}
.pdv-remove-size-lg .pdv-remove-dialog {
  width: min(740px, 95vw) !important;
  max-width: 740px;
}
.pdv-remove-list { max-height: 48vh; overflow: auto; display: grid; gap: 6px; }
.pdv-remove-size-sm .pdv-remove-list { max-height: 32vh; }
.pdv-remove-size-md .pdv-remove-list { max-height: 46vh; }
.pdv-remove-size-lg .pdv-remove-list { max-height: 58vh; }
.pdv-remove-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  border: 1px solid #d4e3f5;
  background: #f7fbff;
  border-radius: 8px;
  padding: 8px 10px;
}
.pdv-remove-main strong { display: block; color: #0f315a; }
.pdv-remove-main small { color: #4e6f93; white-space: nowrap; display: block; }
.pdv-remove-btn { min-width: 90px; margin-left: 4px; }
.pdv-remove-btn:focus,
.pdv-remove-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px #ffffff, 0 0 0 6px rgba(220, 38, 38, .55);
  transform: translateY(-1px) scale(1.02);
  filter: brightness(1.06);
}
.pdv-print-dialog {
  width: min(720px, 92vw) !important;
  max-width: 720px;
  margin: 10vh auto 0 !important;
  background: #dce9fa;
  border: 2px solid #1b4f86;
  border-radius: 14px;
  box-shadow: 0 16px 30px rgba(10, 30, 60, .35);
}
.pdv-print-actions {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.pdv-print-actions .btn {
  min-height: 48px;
  font-weight: 800;
  border-radius: 10px;
  color: #fff !important;
  border: 2px solid #0b416b;
  background: #0d4c7f !important;
}
.pdv-print-actions .btn:focus,
.pdv-print-actions .btn:focus-visible {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px #ffffff, 0 0 0 7px rgba(37, 99, 235, .55);
  transform: translateY(-1px) scale(1.02);
  filter: brightness(1.08);
}
#pdvPrintModal .img-zoom-close:focus,
#pdvPrintModal .img-zoom-close:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, .45);
}
#pdvPrintCupom { background: #0d4c7f !important; }
#pdvPrintRecibo { background: #0d4c7f !important; }
#pdvPrintContrato { background: #0d4c7f !important; }

#pdvPrintModal .pdv-pay-field {
  margin-top: 2px;
  background: #0f4d85;
  border: 1px solid #1c5d99;
  border-radius: 12px;
  padding: 10px 12px;
}
#pdvPrintModal .pdv-pay-field label {
  display: block;
  color: #fff;
  font-weight: 600;
  margin-bottom: 6px;
}
#pdvPrintNumeroVenda {
  width: 100%;
  height: 42px;
  border-radius: 10px;
  border: 1px solid #90b4dc;
  padding: 0 12px;
  font-size: 22px;
  font-weight: 800;
  color: #0d2a4d;
  letter-spacing: .04em;
}
#pdvPrintNumeroVenda:focus,
#pdvPrintNumeroVenda:focus-visible {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, .35);
}

@media (max-height: 820px) {
  .pdv-shell { height: calc(100dvh - 8px); }
  .pdv-grid-modern { gap: 6px; }
  .pdv-col-left { gap: 6px; }
  .pdv-col-main { gap: 6px; }
  .pdv-card { padding: 6px; }
  .pdv-subtotal-amount { min-height: clamp(34px, 4.8vh, 46px); font-size: clamp(16px, 2.3vh, 20px); }
  .pdv-amount-sm { min-height: clamp(30px, 4vh, 38px); font-size: clamp(14px, 2vh, 18px); }
}

@media (max-width: 1200px) {
  .pdv-grid-modern { grid-template-columns: 1fr; }
  .pdv-right-bottom-grid { grid-template-columns: 1fr; }
  .pdv-totals-grid { grid-template-columns: 1fr; }
  .pdv-shortcuts-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pdv-col-main { grid-template-rows: auto auto auto; }
  .pdv-shell { height: auto; overflow: visible; display: block; }
  .pdv-grid-modern { min-height: unset; flex: unset; }
}
@media (max-width: 900px) {
  .pdv-header h1 { font-size: 20px; }
  .pdv-pay-grid { grid-template-columns: 1fr; }
  .pdv-shortcuts-bar { grid-template-columns: 1fr; }
  #pdvPayModal .pdv-pay-head h3 { font-size: 24px; }
  #pdvPayModal .pdv-mini-value { font-size: 30px; height: 38px; }
  #pdvPayModal #pdvTroco .pdv-amount,
  #pdvPayModal #pdvTotal .pdv-amount { font-size: 30px; }
  #pdvPayModal .pdv-mini-money .pdv-currency,
  #pdvPayModal .pdv-total .pdv-currency { font-size: 26px; }
  #pdvPayModal .pdv-pay-field select,
  #pdvPayModal .pdv-parcelas-wrap select { font-size: 28px; }
}
