/* =========================================================================
   DEMOS — mini-sistemas dentro do palco
   ========================================================================= */

/* As demos respondem ao tamanho do PALCO, não da janela:
   assim funcionam iguais na moldura de notebook e na de celular. */
.demo {
  height: 100%;
  min-height: 520px;
  padding: 14px;
  display: flex;
  flex-direction: column;
}
.demo[hidden] { display: none; }
.demo:focus-visible { outline-offset: -4px; }

/* ---------- Estrutura comum ---------- */
.dm { display: flex; flex-direction: column; height: 100%; min-height: 0; flex: 1; }
.dm__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 11px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.dm__title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.dm__title h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  font-stretch: 108%;
  letter-spacing: -0.015em;
}
.dm__title .mono { font-size: 9px; color: var(--text-4); text-transform: none; letter-spacing: 0.04em; }
.dm__sub { font-size: var(--fs-xs); color: var(--text-4); margin-top: 2px; }

.dm__actions { display: flex; align-items: center; gap: 8px; }

.chip {
  height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-xs);
  background: rgba(255, 255, 255, 0.02);
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
  transition: color var(--t-fast), border-color var(--t-fast), background-color var(--t-fast);
}
.chip:hover { color: var(--text); border-color: var(--line-3); }
.chip.is-on {
  color: var(--text);
  border-color: rgba(92, 231, 255, 0.4);
  background: rgba(31, 212, 242, 0.09);
}

.seg { display: inline-flex; padding: 2px; border: 1px solid var(--line); border-radius: var(--r-xs); background: rgba(2, 6, 12, 0.6); }
.seg button {
  padding: 3px 8px;
  border-radius: 2px;
  font-size: 10.5px;
  color: var(--text-4);
  transition: background-color var(--t-fast), color var(--t-fast);
}
.seg button:hover { color: var(--text-2); }
.seg button.is-on { background: rgba(63, 124, 255, 0.22); color: var(--text); }

.d-card {
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: rgba(9, 16, 28, 0.7);
}

.d-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
}
.d-card__head h4 {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-2);
}
.d-card__head .mono { font-size: 8px; }
.d-card__body { padding: 10px; }

.d-num { font-variant-numeric: tabular-nums; }

/* ============================== PDV ================================== */
.pdv {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  flex: 1;
  min-height: 0;
}

.pdv__cats { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 10px; }

.pdv__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
  gap: 6px;
}

.prod {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: rgba(10, 18, 31, 0.8);
  text-align: left;
  color: var(--text-2);
  transition: border-color var(--t-fast), background-color var(--t-fast), transform var(--t-fast) var(--ease-out);
}
.prod:hover { border-color: var(--line-blue); background: rgba(17, 30, 52, 0.9); }
.prod:active { transform: scale(0.985); }
.prod[data-added="true"] { border-color: rgba(46, 224, 140, 0.5); }

.prod__art {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 2px;
  background: var(--art, rgba(31, 92, 255, 0.18));
  color: var(--art-fg, var(--cyan-300));
}
.prod__art svg { width: 17px; height: 17px; }

.prod__info { min-width: 0; display: grid; gap: 1px; }
.prod__name {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--text-2);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.prod__price { font-family: var(--font-mono); font-size: 9.5px; color: var(--text-4); }
.prod__plus { color: var(--text-4); display: grid; place-items: center; }
.prod__plus svg { width: 13px; height: 13px; }
.prod:hover .prod__plus { color: var(--cyan-300); }

/* Carrinho */
.pdv__cart {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-xs);
  background: linear-gradient(180deg, rgba(11, 20, 34, 0.95), rgba(6, 11, 20, 0.95));
  min-height: 0;
}
.pdv__cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 7px;
  border-bottom: 1px dashed var(--line-2);
}
.pdv__cart-head span:first-child { font-size: 11px; font-weight: 600; color: var(--text-2); }
.pdv__cart-head .mono { font-size: 8px; }

.pdv__items { list-style: none; padding: 0; margin: 0; display: grid; gap: 5px; overflow-y: auto; max-height: 210px; scrollbar-width: thin; }
.pdv__items:empty { display: none; }

.cart-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px dashed var(--line);
  animation: item-in 240ms var(--ease-out) both;
}
@keyframes item-in { from { opacity: 0; transform: translateX(5px); } to { opacity: 1; transform: none; } }

.cart-item__info { display: grid; gap: 1px; min-width: 0; }
.cart-item__name { font-size: 10.5px; color: var(--text-2); line-height: 1.2; }
.cart-item__each { font-family: var(--font-mono); font-size: 8px; color: var(--text-4); }
.cart-item__ctrl { display: flex; align-items: center; gap: 4px; }
.cart-item__price { font-family: var(--font-mono); font-size: 9.5px; color: var(--text-2); min-width: 44px; text-align: right; }

.qty-btn {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  color: var(--text-3);
  transition: color var(--t-fast), border-color var(--t-fast), background-color var(--t-fast);
}
.qty-btn:hover { color: var(--text); border-color: var(--line-3); background: rgba(255, 255, 255, 0.05); }
.qty-btn svg { width: 10px; height: 10px; }
.qty-btn--del:hover { color: var(--red-300); border-color: rgba(255, 87, 104, 0.45); background: rgba(229, 56, 74, 0.1); }
.qty-val { font-family: var(--font-mono); font-size: 10px; min-width: 14px; text-align: center; color: var(--text); }

.pdv__empty {
  flex: 1 1 auto;
  min-height: 110px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  padding: 16px 8px;
  text-align: center;
  border: 1px dashed var(--line-2);
  border-radius: 2px;
  color: var(--text-4);
}
.pdv__empty svg { width: 20px; height: 20px; opacity: 0.6; }
.pdv__empty p { font-size: 10px; line-height: 1.4; }

.pdv__totals { display: grid; gap: 3px; margin-top: auto; padding-top: 7px; border-top: 1px solid var(--line); }
.pdv__line { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 10px; color: var(--text-3); }
.pdv__line span:last-child { font-family: var(--font-mono); font-size: 10px; color: var(--text-2); }
.pdv__line--disc span:last-child { color: var(--green-300); }
.pdv__line--total { margin-top: 4px; padding-top: 6px; border-top: 1px dashed var(--line-2); }
.pdv__line--total span:first-child { font-size: 11px; font-weight: 600; color: var(--text); }
.pdv__line--total span:last-child { font-family: var(--font-display); font-size: 19px; font-weight: 700; font-stretch: 110%; color: var(--text); letter-spacing: -0.02em; }

.pdv__pay { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.pay-opt {
  padding: 5px 2px;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  font-size: 9.5px;
  color: var(--text-4);
  display: grid;
  gap: 1px;
  justify-items: center;
  transition: all var(--t-fast);
}
.pay-opt b { font-weight: 500; }
.pay-opt em { font-style: normal; font-family: var(--font-mono); font-size: 7.5px; color: var(--green-300); }
.pay-opt.is-on { border-color: rgba(92, 231, 255, 0.45); background: rgba(31, 212, 242, 0.08); color: var(--text); }

.pdv__finish {
  min-height: 34px;
  border-radius: 3px;
  background: linear-gradient(180deg, #2a67ff, #1444d6);
  border: 1px solid rgba(140, 180, 255, 0.5);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: filter var(--t-fast), transform var(--t-fast);
}
.pdv__finish:hover:not(:disabled) { filter: brightness(1.1); }
.pdv__finish:active:not(:disabled) { transform: translateY(1px); }
.pdv__finish:disabled { opacity: 0.4; cursor: not-allowed; }
.pdv__finish svg { width: 14px; height: 14px; }

/* Sucesso da venda */
.pdv__done {
  display: grid;
  gap: 10px;
  place-items: center;
  text-align: center;
  padding: 18px 6px;
  animation: done-in 420ms var(--ease-out) both;
}
@keyframes done-in { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }
.done__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(46, 224, 140, 0.45);
  background: rgba(23, 201, 118, 0.12);
  color: var(--green-300);
  box-shadow: 0 0 0 8px rgba(23, 201, 118, 0.05);
}
.done__icon svg { width: 26px; height: 26px; }
.done__title { font-family: var(--font-display); font-size: 15px; font-weight: 700; }
.done__meta { font-family: var(--font-mono); font-size: 9px; color: var(--text-4); letter-spacing: 0.06em; text-transform: uppercase; }
.done__amount { font-family: var(--font-display); font-size: 26px; font-weight: 800; font-stretch: 112%; letter-spacing: -0.03em; color: var(--green-300); }
.done__actions { display: grid; gap: 5px; width: 100%; }
.done__actions .btn { width: 100%; min-height: 32px; font-size: 10.5px; padding: 0 8px; }
.done__actions .btn svg { width: 13px; height: 13px; }

/* ============================ NOTA FISCAL ============================= */
.nfe { display: grid; gap: 12px; flex: 1; min-height: 0; }

.nfe__steps {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.nfe__step {
  flex: 1 1 0;
  display: grid;
  gap: 3px;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.015);
  font-size: 9.5px;
  color: var(--text-4);
  line-height: 1.2;
}
.nfe__step b { font-family: var(--font-mono); font-size: 7.5px; letter-spacing: 0.1em; color: var(--text-4); font-weight: 400; }
.nfe__step.is-on { border-color: rgba(92, 231, 255, 0.4); background: rgba(31, 212, 242, 0.07); color: var(--text); }
.nfe__step.is-on b { color: var(--cyan-300); }
.nfe__step.is-done { border-color: rgba(46, 224, 140, 0.32); color: var(--text-2); }
.nfe__step.is-done b { color: var(--green-400); }

.nfe__form { display: grid; gap: 9px; }
.nfe__grid { display: grid; gap: 8px; }

.nfe__field { display: grid; gap: 4px; }
.nfe__field label { font-size: 10px; color: var(--text-3); }
.nfe__field input {
  height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  background: rgba(3, 7, 14, 0.7);
  font-size: 11px;
  color: var(--text);
  width: 100%;
}
.nfe__field input::placeholder { color: var(--text-4); }
.nfe__field input:focus { outline: none; border-color: var(--blue-400); box-shadow: 0 0 0 3px rgba(31, 92, 255, 0.16); }
.nfe__field input[aria-invalid="true"] { border-color: var(--red-400); }
.nfe__err { font-size: 9px; color: var(--red-300); line-height: 1.3; display: none; }
.nfe__err[data-show="true"] { display: block; }

.nfe__items {
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(3, 7, 14, 0.4);
  padding: 7px 9px;
  display: grid;
  gap: 4px;
}
.nfe__item { display: flex; justify-content: space-between; gap: 8px; font-size: 10px; color: var(--text-3); }
.nfe__item span:last-child { font-family: var(--font-mono); color: var(--text-2); }
.nfe__items-foot { display: flex; justify-content: space-between; gap: 8px; padding-top: 5px; border-top: 1px dashed var(--line-2); font-size: 10px; color: var(--text); }
.nfe__items-foot b { font-family: var(--font-mono); }

.nfe__send {
  min-height: 34px;
  border-radius: 3px;
  border: 1px solid rgba(140, 180, 255, 0.5);
  background: linear-gradient(180deg, #2a67ff, #1444d6);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: filter var(--t-fast);
}
.nfe__send:hover:not(:disabled) { filter: brightness(1.1); }
.nfe__send:disabled { opacity: 0.65; cursor: progress; }
.nfe__send svg { width: 14px; height: 14px; }

.nfe__side { display: grid; gap: 10px; align-content: start; }

.nfe__doc {
  position: relative;
  padding: 11px;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  background: rgba(4, 9, 16, 0.85);
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-3);
  display: grid;
  gap: 6px;
  overflow: hidden;
}
.nfe__doc::after {
  content: "SEM VALOR FISCAL";
  position: absolute;
  inset: 46% 0 auto 0;
  text-align: center;
  transform: rotate(-11deg);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: rgba(255, 87, 104, 0.16);
  pointer-events: none;
}
.nfe__doc-head { display: flex; justify-content: space-between; gap: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.nfe__doc-head b { color: var(--text); font-weight: 500; letter-spacing: 0.1em; }
.nfe__doc-row { display: flex; justify-content: space-between; gap: 10px; }
.nfe__doc-row span:last-child { color: var(--text-2); text-align: right; overflow-wrap: anywhere; }
.nfe__doc-total { display: flex; justify-content: space-between; padding-top: 6px; border-top: 1px solid var(--line); color: var(--text); }
.nfe__doc-status {
  margin-top: 2px;
  padding: 4px 6px;
  border: 1px dashed var(--line-2);
  text-align: center;
  letter-spacing: 0.12em;
  font-size: 8.5px;
  color: var(--text-4);
  text-transform: uppercase;
}
.nfe__doc-status.is-ok {
  border-color: rgba(46, 224, 140, 0.45);
  background: rgba(23, 201, 118, 0.08);
  color: var(--green-300);
  border-style: solid;
}
.nfe__doc[data-state="authorized"] { border-color: rgba(46, 224, 140, 0.4); }

.nfe__log { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.nfe__log li {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  color: var(--text-4);
  opacity: 0.62;
  transition: opacity var(--t-base), color var(--t-base);
}
.nfe__log li i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid var(--line-3);
  display: grid;
  place-items: center;
  flex: none;
}
.nfe__log li i svg { width: 8px; height: 8px; opacity: 0; }
.nfe__log li[data-state="run"] { opacity: 1; color: var(--cyan-300); }
.nfe__log li[data-state="run"] i { border-color: var(--cyan-400); border-top-color: transparent; animation: spin 700ms linear infinite; }
.nfe__log li[data-state="ok"] { opacity: 1; color: var(--green-300); }
.nfe__log li[data-state="ok"] i { border-color: rgba(46, 224, 140, 0.5); background: rgba(23, 201, 118, 0.14); }
.nfe__log li[data-state="ok"] i svg { opacity: 1; color: var(--green-300); }
@keyframes spin { to { transform: rotate(360deg); } }

.nfe__key {
  margin-top: 2px;
  padding: 6px 7px;
  border: 1px solid rgba(46, 224, 140, 0.25);
  border-radius: 2px;
  background: rgba(23, 201, 118, 0.05);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.02em;
  color: var(--green-300);
  line-height: 1.5;
  overflow-wrap: anywhere;
  display: none;
}
.nfe__key[data-show="true"] { display: block; animation: done-in 400ms var(--ease-out) both; }

.nfe__reset {
  align-self: start;
  justify-self: start;
  font-size: 10px;
  color: var(--text-3);
  text-decoration: underline;
  text-underline-offset: 3px;
  display: none;
}
.nfe__reset[data-show="true"] { display: inline; }

/* ============================= DASHBOARD ============================== */
.dash { display: grid; gap: 9px; flex: 1; min-height: 0; align-content: start; }

.dash__kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }

.kpi {
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(12, 22, 38, 0.8), rgba(6, 11, 20, 0.7));
  display: grid;
  gap: 2px;
}
.kpi__label {
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-4);
}
.kpi__value {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  font-stretch: 108%;
  letter-spacing: -0.025em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.kpi__foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.kpi__delta { font-family: var(--font-mono); font-size: 8px; }
.kpi__delta.is-up { color: var(--green-300); }
.kpi__delta.is-down { color: var(--red-300); }
.kpi__spark { width: 52px; height: 16px; opacity: 0.8; }
.kpi__spark path { fill: none; stroke-width: 1.4; }

.dash__main { display: grid; gap: 9px; }

.chart { position: relative; padding: 8px 10px 6px; }
.chart__plot {
  position: relative;
  height: 118px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  padding-bottom: 0;
  border-bottom: 1px solid var(--line-2);
}
.chart__grid {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(to top, var(--line) 0 1px, transparent 1px 33%);
  pointer-events: none;
}
.chart__avg {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px dashed rgba(92, 231, 255, 0.4);
  pointer-events: none;
  z-index: 1;
}
.chart__avg span {
  position: absolute;
  right: 0;
  top: -13px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  color: var(--cyan-300);
  background: #08111d;
  padding: 0 3px;
}
.chart__bars { position: relative; z-index: 2; display: flex; align-items: flex-end; gap: 3px; width: 100%; height: 100%; }
.bar {
  flex: 1 1 0;
  min-width: 2px;
  height: 0%;
  border-radius: 1px 1px 0 0;
  background: linear-gradient(to top, rgba(31, 92, 255, 0.35), rgba(92, 231, 255, 0.75));
  transition: height 700ms var(--ease-out);
  position: relative;
  cursor: default;
}
.bar--hi { background: linear-gradient(to top, rgba(63, 124, 255, 0.55), var(--cyan-300)); }
.bar:hover { background: var(--cyan-300); }
.bar[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 5px;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  background: #061019;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 8px;
  white-space: nowrap;
  z-index: 4;
}
.chart__labels {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  color: var(--text-4);
  letter-spacing: 0.04em;
}

.stock { display: grid; gap: 0; }
.stock__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "name val"
    "bar badge";
  gap: 4px 8px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
  align-items: center;
}
.stock__item:last-child { border-bottom: 0; }
.stock__name { grid-area: name; font-size: 10px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stock__val { grid-area: val; font-family: var(--font-mono); font-size: 9px; color: var(--text-3); }
.stock__bar { grid-area: bar; height: 3px; background: rgba(255, 255, 255, 0.06); border-radius: 2px; overflow: hidden; }
.stock__bar i { display: block; height: 100%; background: var(--green-400); border-radius: 2px; transition: width 700ms var(--ease-out); }
.stock__item[data-low="true"] .stock__bar i { background: var(--red-400); }
.stock__badge {
  grid-area: badge;
  justify-self: end;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1px 4px;
  border-radius: 2px;
  border: 1px solid rgba(46, 224, 140, 0.3);
  color: var(--green-300);
}
.stock__item[data-low="true"] .stock__badge { border-color: rgba(255, 87, 104, 0.35); color: var(--red-300); }

.dash__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-4);
}

/* =============================== LOJA ================================ */
.shop { display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 0; position: relative; }

.shop__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }

.pcard {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(10, 18, 31, 0.75);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--t-base);
}
.pcard:hover { border-color: var(--line-2); }

.pcard__art {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background: var(--art-bg, linear-gradient(140deg, #132441, #0a1524));
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.pcard__art svg {
  position: relative;
  z-index: 1;
  width: 34%;
  height: 34%;
  color: var(--art-fg, rgba(92, 231, 255, 0.75));
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5));
}
/* luz de estúdio + sombra de apoio: o objeto parece estar numa superfície */
.pcard__art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(58% 48% at 50% 40%, rgba(255, 255, 255, 0.07), transparent 72%);
  pointer-events: none;
}
.pcard__art::after {
  content: "";
  position: absolute;
  bottom: 15%;
  left: 30%;
  width: 40%;
  height: 7px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  filter: blur(4px);
  pointer-events: none;
}
.pcard__like {
  position: absolute;
  top: 5px;
  right: 5px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 5px;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  background: rgba(4, 8, 16, 0.65);
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 8px;
  backdrop-filter: blur(4px);
  transition: color var(--t-fast), border-color var(--t-fast);
}
.pcard__like svg { width: 10px; height: 10px; transition: transform var(--t-fast) var(--ease-out); }
.pcard__like[aria-pressed="true"] { color: var(--red-300); border-color: rgba(255, 87, 104, 0.4); }
.pcard__like[aria-pressed="true"] svg { fill: var(--red-400); transform: scale(1.12); }

.pcard__body { padding: 7px 8px 8px; display: grid; gap: 4px; }
.pcard__name { font-size: 10.5px; font-weight: 500; color: var(--text-2); line-height: 1.25; }
.pcard__price { font-family: var(--font-mono); font-size: 10px; color: var(--text); }
.pcard__row { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin-top: 1px; }
.pcard__add {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 6px;
  border: 1px solid rgba(92, 231, 255, 0.32);
  border-radius: 2px;
  background: rgba(31, 212, 242, 0.07);
  color: var(--cyan-300);
  font-size: 9px;
  font-weight: 500;
  transition: background-color var(--t-fast), border-color var(--t-fast);
}
.pcard__add:hover { background: rgba(31, 212, 242, 0.15); border-color: rgba(92, 231, 255, 0.6); }
.pcard__add svg { width: 10px; height: 10px; }
.pcard__comments {
  font-size: 8.5px;
  color: var(--text-4);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.pcard__comments svg { width: 10px; height: 10px; }
.pcard__comments:hover { color: var(--text-2); }

.pcard__cmts { display: none; gap: 4px; padding-top: 6px; border-top: 1px dashed var(--line); }
.pcard__cmts[data-open="true"] { display: grid; }
.cmt { font-size: 8.5px; line-height: 1.4; color: var(--text-3); }
.cmt b { color: var(--text-2); font-weight: 600; }
.pcard__cform { display: flex; gap: 3px; }
.pcard__cform input {
  flex: 1;
  min-width: 0;
  height: 22px;
  padding: 0 5px;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  background: rgba(3, 7, 14, 0.7);
  font-size: 8.5px;
  color: var(--text);
}
.pcard__cform input::placeholder { color: var(--text-4); }
.pcard__cform input:focus { outline: none; border-color: var(--line-3); }
.pcard__cform button {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  color: var(--text-3);
}
.pcard__cform button svg { width: 11px; height: 11px; }

.shop__cart {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(250px, 100%);
  border: 1px solid var(--line-2);
  border-radius: 3px;
  background: rgba(7, 13, 24, 0.98);
  box-shadow: 0 20px 40px -16px rgba(0, 0, 0, 0.9);
  padding: 9px;
  display: none;
  gap: 6px;
  z-index: 5;
}
.shop__cart[data-open="true"] { display: grid; animation: cart-in 240ms var(--ease-out) both; }
@keyframes cart-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.shop__cart-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-bottom: 5px; border-bottom: 1px dashed var(--line-2); }
.shop__cart-head span { font-size: 10px; font-weight: 600; color: var(--text-2); }
.shop__cart-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 3px; max-height: 120px; overflow-y: auto; }
.shop__cart-list li { display: flex; justify-content: space-between; gap: 8px; font-size: 9.5px; color: var(--text-3); }
.shop__cart-list li span:last-child { font-family: var(--font-mono); color: var(--text-2); }
.shop__cart-total { display: flex; justify-content: space-between; gap: 8px; padding-top: 5px; border-top: 1px solid var(--line); font-size: 10px; color: var(--text); }
.shop__cart-total b { font-family: var(--font-mono); }
.shop__cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 8px;
  border: 1px solid var(--line-2);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-2);
  font-size: 10px;
}
.shop__cart-btn svg { width: 13px; height: 13px; }
.shop__cart-btn[data-count]:not([data-count="0"]) { border-color: rgba(92, 231, 255, 0.45); color: var(--cyan-300); }

.shop__flash {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translate(-50%, 6px);
  padding: 5px 10px;
  border-radius: 3px;
  border: 1px solid rgba(46, 224, 140, 0.4);
  background: rgba(6, 20, 15, 0.95);
  color: var(--green-300);
  font-size: 9.5px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--t-base) var(--ease-out);
  z-index: 6;
  white-space: nowrap;
}
.shop__flash[data-show="true"] { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* =========================== BREAKPOINTS ============================= */
@container stage (min-width: 540px) {
  .demo { padding: 16px; }
  .nfe__grid { grid-template-columns: 1.2fr 0.8fr; }
  .dash__kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .shop__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart__plot { height: 132px; }
}

@container stage (min-width: 720px) {
  .pdv { grid-template-columns: minmax(0, 1.15fr) minmax(248px, 0.85fr); }
  .nfe { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); align-items: start; }
  .nfe__side { position: sticky; top: 0; }
  .dash__main { grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); align-items: stretch; }
  .shop__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .shop__cart { width: 240px; }
  .demo { min-height: 480px; }
}

@container stage (min-width: 840px) {
  .demo { min-height: 520px; }
  .chart__plot { height: 158px; }
  .pdv__items { max-height: 232px; }
}

@container stage (max-width: 470px) {
  .demo { padding: 11px; }
  .pdv__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
  .prod { grid-template-columns: 26px minmax(0, 1fr); gap: 6px; padding: 6px; }
  .prod__art { width: 26px; height: 26px; }
  .prod__art svg { width: 15px; height: 15px; }
  .prod__plus { display: none; }
  .prod__price { font-size: 9px; }
  .kpi__value { font-size: 15px; }
  .nfe__step { padding: 5px 4px; font-size: 9px; }
}

/* Movimento reduzido: sem barra crescendo, sem spinner */
@media (prefers-reduced-motion: reduce) {
  .bar, .stock__bar i, .svc__fig, .cmp__layer--b { transition: none !important; }
  .fui__step, .fui__stat, .fui__row, .pdv__done { animation: none !important; }
}
