/* Icones do menu off-canvas (SVG via fgs-offcanvas-icons.js) */
.fgs-oc-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
  opacity: 0.92;
}
.fgs-oc-icon svg {
  width: 100%;
  height: 100%;
}

/* Definição de Variáveis de Cor Corporativas */
:root {
  --fgs-primary-dark: #0f172a; /* O azul escuro do teu painel principal */
  --fgs-accent: #6366f1;       /* O roxo elegante usado para links e destaques */
  --fgs-bg-light: #f8fafc;     /* O fundo cinza claro ultra confortável */
  --fgs-danger: #ef4444;       /* Vermelho discreto para ações destrutivas */
  --fgs-border-radius: 8px;    /* Arredondamento suave e moderno */
}

/* Estrutura do Painel Lateral */
.fgs-sidebar-checkout {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  background-color: #ffffff;
  border-left: 1px solid #e2e8f0;
  border-radius: 0;
  padding: 0;
}

/* Área de Scrolling da Lista de Itens */
.fgs-checkout-items-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin-top: 12px;
  margin-bottom: 16px;
}
#cartDrawer .fgs-checkout-items-list {
  margin: 0;
  padding: 0.5rem 1rem;
}

.fgs-cart-cliente-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.fgs-cart-cliente-grid.is-split {
  grid-template-columns: 1fr 1fr;
}
.fgs-cart-cliente-col {
  min-width: 0;
}
.fgs-cart-cliente-grid.is-split #cartExmoCamposWrap:not(.hidden),
.fgs-cart-cliente-grid.is-split #cartExmoPlaceholder:not(.hidden) {
  grid-column: 2;
}
.fgs-cart-exmo-placeholder:not(.hidden) {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 8px;
  border: 1px dashed #93c5fd;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
}
.fgs-cart-exmo-placeholder:hover {
  background: #dbeafe;
}
.fgs-cart-cliente-input {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1.3;
  color: #0f172a;
  background: #fff;
}
.fgs-cart-cliente-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgb(59 130 246 / 0.2);
}

/* Bloco de Resumo */
.fgs-checkout-summary {
  background-color: rgb(248 250 252 / 0.5);
  border-radius: 0;
  padding: 1rem;
}

.fgs-summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
}

.fgs-total-row {
  font-size: 18px;
  font-weight: 700;
  color: var(--fgs-primary-dark);
}

/* Botões Modernizados e Corporativos */
.fgs-checkout-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.fgs-btn-primary {
  background-image: linear-gradient(to right, #1e293b, var(--fgs-primary-dark));
  color: #ffffff;
  border: none;
  padding: 14px;
  border-radius: var(--fgs-border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fgs-btn-mpesa {
  background: #c41e3a;
  color: #ffffff;
  border: none;
  padding: 14px;
  border-radius: var(--fgs-border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fgs-btn-mpesa:hover:not(:disabled) {
  background: #a01830;
}

.fgs-btn-mpesa:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.fgs-actions-grid-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.fgs-btn-secondary {
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 10px;
  border-radius: var(--fgs-border-radius);
  cursor: pointer;
  font-size: 13px;
}

.fgs-btn-danger:hover {
  color: var(--fgs-danger);
  border-color: var(--fgs-danger);
}

/* Ergonomia de Quantidade no Carrinho (POS Tátil) */
#cartList button[data-act="minus"],
#cartList button[data-act="plus"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--fgs-primary-dark, #0f172a);
  background-color: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}

#cartList button[data-act="minus"]:hover,
#cartList button[data-act="plus"]:hover {
  background-color: #e2e8f0;
  border-color: #cbd5e1;
}

#cartList button[data-act="minus"]:active,
#cartList button[data-act="plus"]:active {
  background-color: #cbd5e1;
  transform: scale(0.95);
}

/* Espaçamento e alinhamento do bloco de quantidade */
#cartList div.mt-1.flex {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  margin-top: 6px !important;
  margin-right: 4px !important;
}

#cartList .pdv-cart-qty {
  height: 32px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  text-align: center;
  font-size: 13px;
}

#cartList .pdv-cart-desc {
  height: 28px;
  width: 4.35rem;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  text-align: right;
  font-size: 11px;
}

.fgs-desc-global-row {
  align-items: center;
  gap: 8px;
}

.fgs-desc-global-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.fgs-desc-global-toggle {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
}

.fgs-desc-global-toggle button {
  margin: 0;
  padding: 3px 7px;
  border: 0;
  background: #fff;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.fgs-desc-global-toggle button.is-active {
  background: #0f172a;
  color: #fff;
}

.fgs-desc-global-input {
  width: 4.5rem;
  height: 28px;
  padding: 0 6px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  text-align: right;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

#cartList .text-xs.font-medium.text-slate-700 {
  font-size: 12px;
  color: #475569;
  font-weight: 600;
  margin-right: 4px;
}

/**
 * FGS — polimento visual partilhado (cartões zinc, overlays com transição, modais).
 * Usar: <html lang="pt-PT" class="fgs-polish"> e <link rel="stylesheet" href="fgs-ui-polish.css" /> no <head>
 * (ou import no bundle Vite). Inclui regras para #backdrop / #backdropServico em produtos.html.
 */

/* View Transitions API — navegação MPA mesma origem (Chrome 126+, Edge 126+); browsers antigos ignoram. */
@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.32s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

html.fgs-polish {
  -webkit-font-smoothing: antialiased;
}

/* Tipografia global (alinha com o "Nova reserva" / Inter) */
html.fgs-polish,
html.fgs-polish body {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    "Apple Color Emoji",
    "Segoe UI Emoji";
}

/* ——— Overlays: fade em vez de display:none (mantém flex para animar o painel) ——— */
html.fgs-polish .backdrop,
html.fgs-polish .backdrop-rq,
html.fgs-polish .preck-backdrop {
  display: flex;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}
html.fgs-polish .backdrop.show,
html.fgs-polish .backdrop-rq.show,
html.fgs-polish .preck-backdrop.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Entrada do painel modal */
html.fgs-polish .backdrop .modal,
html.fgs-polish .backdrop-rq .modal-rq {
  transform: scale(0.97) translateY(10px);
  opacity: 0;
  transition:
    transform 0.26s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.22s ease,
    box-shadow 0.2s ease;
}
html.fgs-polish .backdrop.show .modal,
html.fgs-polish .backdrop-rq.show .modal-rq {
  transform: scale(1) translateY(0);
  opacity: 1;
}

html.fgs-polish .preck-backdrop .preck-modal {
  transform: scale(0.98) translateY(8px);
  opacity: 0;
  transition:
    transform 0.24s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.2s ease;
}
html.fgs-polish .preck-backdrop.show .preck-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Base do modal "rq" (reservas.html) */
html.fgs-polish .modal-rq {
  width: min(560px, 100%);
  max-height: calc(100vh - 36px);
  background: #d4d4d8;
  color: #18181b;
  border-radius: 16px;
  border: 2px solid #000;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
  margin: 0 auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
html.fgs-polish .modal-rq-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

/* Cabeçalhos / rodapés de modal */
html.fgs-polish .modal-h,
html.fgs-polish .modal-rq-h {
  padding: 16px 20px;
  border-bottom: 1px solid #71717a !important;
  background: #d4d4d8;
  font-weight: 600;
  color: #18181b;
}
html.fgs-polish .modal-h strong,
html.fgs-polish .modal-rq-h strong {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #18181b;
}
html.fgs-polish .modal-f,
html.fgs-polish .modal-rq-f {
  padding: 14px 20px;
  border-top: 1px solid #71717a !important;
  background: #d4d4d8;
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 12px !important;
}
html.fgs-polish .modal-f .btn,
html.fgs-polish .modal-rq-f .btn {
  min-height: 36px;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.875rem;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}
html.fgs-polish .modal-f .btn:not(.primary):not(.btn--primary),
html.fgs-polish .modal-rq-f .btn:not(.primary):not(.btn--primary) {
  border-color: #e4e4e7;
  background: #fff;
  color: #18181b;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
html.fgs-polish .modal-f .btn:not(.primary):not(.btn--primary):hover,
html.fgs-polish .modal-rq-f .btn:not(.primary):not(.btn--primary):hover {
  background: #f4f4f5;
  border-color: #d4d4d8;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}
html.fgs-polish .modal-f .btn.primary,
html.fgs-polish .modal-rq-f .btn.primary,
html.fgs-polish .modal-f .btn.btn--primary,
html.fgs-polish .modal-rq-f .btn.btn--primary {
  border-color: #18181b !important;
  background: #18181b !important;
  color: #fafafa !important;
}
html.fgs-polish .modal-f .btn.primary:hover,
html.fgs-polish .modal-rq-f .btn.primary:hover,
html.fgs-polish .modal-f .btn.btn--primary:hover,
html.fgs-polish .modal-rq-f .btn.btn--primary:hover {
  background: #27272a !important;
  border-color: #27272a !important;
}

/* Detalhes da reserva — tabelas e secções dentro do modal rq */
html.fgs-polish .modal-rq-body .det-reserva-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
html.fgs-polish .modal-rq-body .det-reserva-table th {
  text-align: left;
  width: 36%;
  max-width: 260px;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid #e4e4e7; /* zinc-200 */
  color: #71717a; /* zinc-500 */
  font-weight: 600;
  vertical-align: top;
}
html.fgs-polish .modal-rq-body .det-reserva-table td {
  padding: 10px 0;
  border-bottom: 1px solid #e4e4e7; /* zinc-200 */
  word-break: break-word;
  color: #18181b; /* zinc-900 */
}
html.fgs-polish .modal-rq-body .det-reserva-table tfoot th,
html.fgs-polish .modal-rq-body .det-reserva-table tfoot td {
  padding: 10px 0;
  border-top: 2px solid #e4e4e7;
  border-bottom: none;
  font-weight: 700;
  color: #18181b;
}
html.fgs-polish .modal-rq-body .det-reserva-pre {
  margin: 0;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.45;
  background: #fafafa; /* zinc-50 */
  border: 1px solid #e4e4e7; /* zinc-200 */
  border-radius: 10px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
html.fgs-polish .modal-rq-body .rq-section {
  margin-bottom: 18px;
}
html.fgs-polish .modal-rq-body .rq-section h3 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #18181b; /* zinc-900 */
}
html.fgs-polish .modal-rq-body .rq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}
@media (max-width: 700px) {
  html.fgs-polish .modal-rq-body .rq-grid {
    grid-template-columns: 1fr;
  }
}
html.fgs-polish .modal-rq-body .rq-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 14px;
}
@media (max-width: 700px) {
  html.fgs-polish .modal-rq-body .rq-grid-3 {
    grid-template-columns: 1fr;
  }
}
html.fgs-polish .modal-rq-body .rq-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #3f3f46; /* zinc-700 */
  margin-bottom: 6px;
}

/* Botão primário fora de modal (ex.: reservas) */
html.fgs-polish .btn.btn--primary:not(.btn--ghost) {
  border-color: #18181b !important;
  background: #18181b !important;
  color: #fafafa !important;
}
html.fgs-polish .btn.btn--primary:not(.btn--ghost):hover {
  background: #27272a !important;
  border-color: #27272a !important;
}
html.fgs-polish .btn:not(.primary):not(.btn--primary):not(.btn--ghost):hover {
  background: #f8fafc;
  border-color: #d4d4d8;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}
html.fgs-polish .btn:not(.primary):not(.btn--primary):not(.btn--ghost):active,
html.fgs-polish .modal-f .btn:not(.primary):not(.btn--primary):active,
html.fgs-polish .modal-rq-f .btn:not(.primary):not(.btn--primary):active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.07);
}

/* Pré-check-in */
html.fgs-polish .preck-head {
  background: #d4d4d8;
  border-bottom-color: #71717a;
  color: #18181b;
}

/* Campos em formulários de modal / pré-check-in */
html.fgs-polish .modal-b input:not([type='checkbox']):not([type='radio']),
html.fgs-polish .modal-b select,
html.fgs-polish .modal-b textarea,
html.fgs-polish .modal-body-scroll input:not([type='checkbox']):not([type='radio']),
html.fgs-polish .modal-body-scroll select,
html.fgs-polish .modal-body-scroll textarea,
html.fgs-polish .modal-rq-body input:not([type='checkbox']):not([type='radio']),
html.fgs-polish .modal-rq-body select,
html.fgs-polish .modal-rq-body textarea,
html.fgs-polish .preck-body input:not([type='checkbox']):not([type='radio']),
html.fgs-polish .preck-body select,
html.fgs-polish .preck-body textarea {
  width: 100% !important;
  height: 38px !important;
  padding: 8px 12px !important;
  font-size: 13.5px !important;
  border-radius: 6px !important;
  border: 1px solid #a1a1aa !important;
  background: #ffffff !important;
  color: #18181b !important;
  box-sizing: border-box !important;
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.02),
    0 1px 2px rgba(0, 0, 0, 0.04) !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

html.fgs-polish .modal-b textarea,
html.fgs-polish .modal-body-scroll textarea,
html.fgs-polish .modal-rq-body textarea,
html.fgs-polish .preck-body textarea {
  height: auto !important;
  min-height: 80px !important;
}

html.fgs-polish .modal-b select,
html.fgs-polish .modal-body-scroll select,
html.fgs-polish .modal-rq-body select,
html.fgs-polish .preck-body select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2371717a' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
  background-position: right 0.75rem center !important;
  background-repeat: no-repeat !important;
  background-size: 1.25em 1.25em !important;
  padding-right: 2.5rem !important;
  cursor: pointer !important;
}
html.fgs-polish .modal-b input::placeholder,
html.fgs-polish .modal-b textarea::placeholder,
html.fgs-polish .modal-body-scroll input::placeholder,
html.fgs-polish .modal-body-scroll textarea::placeholder,
html.fgs-polish .modal-rq-body input::placeholder,
html.fgs-polish .modal-rq-body textarea::placeholder,
html.fgs-polish .preck-body input::placeholder,
html.fgs-polish .preck-body textarea::placeholder {
  color: #71717a; /* zinc-500 */
}
html.fgs-polish .modal-b input:focus,
html.fgs-polish .modal-b select:focus,
html.fgs-polish .modal-b textarea:focus,
html.fgs-polish .modal-body-scroll input:focus,
html.fgs-polish .modal-body-scroll select:focus,
html.fgs-polish .modal-body-scroll textarea:focus,
html.fgs-polish .modal-rq-body input:focus,
html.fgs-polish .modal-rq-body select:focus,
html.fgs-polish .modal-rq-body textarea:focus,
html.fgs-polish .preck-body input:focus,
html.fgs-polish .preck-body select:focus,
html.fgs-polish .preck-body textarea:focus {
  border-color: #a1a1aa !important;
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.08) !important;
  outline: none !important;
}

/* Cartões lista (clientes, equipa, reservas, …) */
html.fgs-polish .card {
  border: none;
  border-radius: 12px;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.05),
    0 2px 4px -1px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}
html.fgs-polish .card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.08),
    0 4px 6px -2px rgba(0, 0, 0, 0.04);
}
html.fgs-polish .card-h h2 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #18181b;
}

html.fgs-polish .btn.primary {
  border-color: #18181b;
  background: #18181b;
  color: #fafafa;
}
html.fgs-polish .btn.primary:hover {
  background: #27272a;
  border-color: #27272a;
}

/* Listagens com scroll */
html.fgs-polish .clientes-list-wrap,
html.fgs-polish .reservas-tbl-scroll {
  scrollbar-width: thin;
  scrollbar-color: #d4d4d8 transparent;
}
html.fgs-polish .clientes-list-wrap::-webkit-scrollbar,
html.fgs-polish .reservas-tbl-scroll::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
html.fgs-polish .clientes-list-wrap::-webkit-scrollbar-thumb,
html.fgs-polish .reservas-tbl-scroll::-webkit-scrollbar-thumb {
  background: #d4d4d8;
  border-radius: 999px;
}

/* Tabelas simples dentro do cartão (sem forçar hover em .tbl-reservas com cores de estado) */
html.fgs-polish main .card .table-wrap tbody tr:hover td {
  background: #fafafa;
}

/* Secções principais Tailwind (documentos, vendas, auditoria, pedidos…) */
html.fgs-polish main section.rounded-2xl.border.border-slate-200.bg-white,
html.fgs-polish main > div.mb-4.rounded-2xl.border.border-slate-200.bg-white {
  border-color: #e4e4e7;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 10px 32px rgba(15, 23, 42, 0.06);
  transition: box-shadow 0.22s ease, border-color 0.2s ease;
}
html.fgs-polish main section.rounded-2xl.border.border-slate-200.bg-white:hover,
html.fgs-polish main > div.mb-4.rounded-2xl.border.border-slate-200.bg-white:hover {
  border-color: #d4d4d8;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.05),
    0 14px 40px rgba(15, 23, 42, 0.08);
}

/* Painéis tipo cartão sem .mb-4 (ex.: 2.º bloco do main em auditoria) */
html.fgs-polish main > div.rounded-2xl.border.border-slate-200.bg-white.shadow-sm:not(.mb-4) {
  border-color: #e4e4e7;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 10px 32px rgba(15, 23, 42, 0.06);
  transition:
    box-shadow 0.22s ease,
    border-color 0.2s ease;
}
html.fgs-polish main > div.rounded-2xl.border.border-slate-200.bg-white.shadow-sm:not(.mb-4):hover {
  border-color: #d4d4d8;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.05),
    0 14px 40px rgba(15, 23, 42, 0.08);
}

/* Cartões do painel (index) */
html.fgs-polish main .fgs-dash-card {
  border-color: #e4e4e7;
  transition: box-shadow 0.22s ease, border-color 0.2s ease;
}

/* Login: campos do formulário */
html.fgs-polish .panel-form input:not([type='checkbox']),
html.fgs-polish .panel-form select {
  border-radius: 6px;
  border-color: #e4e4e7;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
html.fgs-polish .panel-form input:focus,
html.fgs-polish .panel-form select:focus {
  border-color: #a1a1aa;
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.08);
  outline: none;
}

/* Botão Sair (toolbar) */
html.fgs-polish #btnSair {
  min-height: 2.5rem;
  padding-inline: 1rem;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

/* produtos.html: manter modais de produto/serviço centrados com o mesmo ficheiro */
html.fgs-polish #backdrop,
html.fgs-polish #backdropServico {
  align-items: center;
}

/* ——— Painel "legacy" (clientes/produtos/equipa/…): tabela, botões e modais ——— */
html.fgs-polish .actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* Botões (fora de modais) — manter estética zinc */
html.fgs-polish .btn {
  appearance: none;
  border: 1px solid #e4e4e7; /* zinc-200 */
  background: #fff;
  color: #18181b; /* zinc-900 */
  padding: 9px 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.12s ease;
}
html.fgs-polish .btn:hover {
  background: #f4f4f5; /* zinc-100 */
  border-color: #d4d4d8; /* zinc-300 */
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}
html.fgs-polish .btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.07);
}
html.fgs-polish .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
html.fgs-polish .btn.primary {
  border-color: #18181b;
  background: #18181b;
  color: #fafafa;
}
html.fgs-polish .btn.primary:hover {
  background: #27272a;
  border-color: #27272a;
}
html.fgs-polish .btn.danger {
  border-color: rgba(185, 28, 28, 0.4);
  background: rgba(185, 28, 28, 0.08);
  color: #991b1b;
}
html.fgs-polish .btn.danger:hover {
  background: rgba(185, 28, 28, 0.12);
  border-color: rgba(185, 28, 28, 0.55);
}

/* Tabelas genéricas em .table-wrap */
html.fgs-polish .table-wrap {
  overflow-x: auto;
}
html.fgs-polish .table-wrap table {
  width: 100%;
  border-collapse: collapse;
}
html.fgs-polish .table-wrap th,
html.fgs-polish .table-wrap td {
  text-align: left;
  padding: 12px 12px;
  border-bottom: 1px solid #e4e4e7; /* zinc-200 */
  font-size: 13px;
  vertical-align: top;
}
html.fgs-polish .table-wrap th {
  font-size: 12px;
  color: #71717a; /* zinc-500 */
  font-weight: 600;
  letter-spacing: -0.01em;
}
html.fgs-polish .table-wrap tr:hover td {
  background: #fafafa; /* zinc-50 */
}

/* Modais "legacy" (.backdrop) e reservas (.backdrop-rq) */
html.fgs-polish .backdrop,
html.fgs-polish .backdrop-rq {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.55);
  align-items: center;
  justify-content: center;
  padding: 18px;
  padding-top: max(18px, env(safe-area-inset-top));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 30000;
}
/* Quando oculto: não interceptar scroll nem wheel da página */
html.fgs-polish .backdrop:not(.show),
html.fgs-polish .backdrop-rq:not(.show) {
  overflow: hidden;
}
html.fgs-polish .modal {
  width: min(560px, 100%);
  max-height: calc(100vh - 36px);
  background: #d4d4d8;
  border-radius: 16px;
  border: 2px solid #000;
  color: #18181b;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
  margin: 0 auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
html.fgs-polish .modal.modal-scrollable {
  /* Explicit, para páginas legacy que usam esta classe */
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 36px);
}
html.fgs-polish .modal.modal-scrollable .modal-form-scroll {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
html.fgs-polish .modal.modal-scrollable .modal-body-scroll {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}
html.fgs-polish .modal.modal-scrollable .modal-f {
  flex-shrink: 0;
}
html.fgs-polish .modal-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
html.fgs-polish .modal-b {
  padding: 16px 20px;
  overflow-y: auto;
  min-height: 0;
  flex: 1 1 auto;
}

/* Labels e layout de formulários dentro de modais legacy (alinha com Nova reserva) */
html.fgs-polish .modal-b label,
html.fgs-polish .modal-body-scroll label,
html.fgs-polish .modal-rq-body label,
html.fgs-polish .preck-body label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #3f3f46; /* zinc-700 */
  margin-bottom: 6px;
}
html.fgs-polish .modal-h .modal-x {
  appearance: none;
  border: 1px solid #e4e4e7;
  background: #fff;
  color: #3f3f46;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
html.fgs-polish .modal-h .modal-x:hover {
  background: #f4f4f5;
  border-color: #d4d4d8;
  transform: translateY(-1px);
}
html.fgs-polish .modal-h .modal-x:active {
  transform: translateY(0);
}

/* Larguras padrão para modais legacy (substitui style="max-width: …") */
html.fgs-polish .modal.modal-w-520 { max-width: 520px; }
html.fgs-polish .modal.modal-w-700 { max-width: 700px; }
html.fgs-polish .modal.modal-w-720 { max-width: 720px; }
html.fgs-polish .modal.modal-w-760 { max-width: 760px; }
html.fgs-polish .modal.modal-w-860 { max-width: 860px; }
html.fgs-polish .modal.modal-w-920 { max-width: 920px; }

/* ——— Reservas (reservas.html): tabela + pesquisa no mesmo "polish" ——— */
html.fgs-polish .reservas-lista-head h3 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #18181b; /* zinc-900 */
}

/* Higienização visual da tabela de reservas */
html.fgs-polish .tbl-reservas td {
  text-decoration: none !important;
}

html.fgs-polish .tbl-reservas td.td-hospede-clean {
  text-decoration: none !important;
  font-weight: 500;
  color: #1e293b;
}

html.fgs-polish .tbl-reservas td a,
html.fgs-polish .tbl-reservas td button {
  text-decoration: none !important;
}

/* Check-in / out empilhado verticalmente sem desalinhamento */
html.fgs-polish .tbl-reservas td:nth-child(7) {
  font-family: monospace;
  font-size: 11px;
  white-space: pre-line;
  line-height: 1.4;
  text-align: center;
}

/* Badges elegantes para o Estado */
html.fgs-polish .tbl-reservas td:nth-child(10) {
  text-align: center;
}

html.fgs-polish .tbl-reservas td:nth-child(10) span,
html.fgs-polish .tbl-reservas td:nth-child(10) {
  text-decoration: none !important;
}

/* Alinhamento e centralização dos botões de acção */
html.fgs-polish .tbl-reservas td.td-accoes {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
  padding: 8px 12px;
}

html.fgs-polish .tbl-reservas td.td-accoes button {
  margin: 0 !important;
  min-height: 28px !important;
  height: 28px !important;
  line-height: 1 !important;
  padding: 0 10px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: 1px solid #7c3aed !important; /* violet-600 */
  background: #ffffff !important;
  color: #6d28d9 !important; /* violet-700 */
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
html.fgs-polish .tbl-reservas td.td-accoes button:hover:not(:disabled) {
  background: #f5f3ff !important; /* violet-50 */
  border-color: #6d28d9 !important;
  color: #5b21b6 !important;
}
html.fgs-polish .tbl-reservas td.td-accoes button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
html.fgs-polish .tbl-reservas td.td-accoes button.has-pending {
  border-color: #a855f7 !important; /* purple-500 */
  background: #faf5ff !important; /* purple-50 */
  color: #7e22ce !important;
}

/* Consistência dos botões superiores */
html.fgs-polish #btnEditarReserva {
  background-color: #1e293b !important;
  border-color: #1e293b !important;
  color: #ffffff !important;
}

html.fgs-polish #btnEditarReserva:hover {
  background-color: #0f1b33 !important;
  border-color: #0f1b33 !important;
}

html.fgs-polish .reservas-lista-acoes .btn {
  border-radius: 8px !important;
  transition: all 0.15s ease-in-out;
}

html.fgs-polish .reservas-search {
  margin: 0 0 10px 0;
  max-width: 380px;
}
html.fgs-polish .reservas-search label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #3f3f46; /* zinc-700 */
  margin-bottom: 6px;
}
html.fgs-polish .reservas-search input[type='text'] {
  width: 100%;
  padding: 9px 10px;
  border-radius: 6px;
  border: 1px solid #e4e4e7; /* zinc-200 */
  background: #fff;
  font-size: 13px;
  color: #18181b; /* zinc-900 */
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
html.fgs-polish .reservas-search input[type='text']:focus {
  border-color: #a1a1aa; /* zinc-400 */
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.08);
  outline: none;
}

html.fgs-polish .reservas-tbl-scroll {
  border: 1px solid #f3f4f6; /* gray-100 */
  border-radius: 10px;
  box-shadow: none;
}
html.fgs-polish .tbl-reservas th,
html.fgs-polish .tbl-reservas td {
  border-color: #f3f4f6; /* gray-100 */
  padding: 10px 12px;
}
html.fgs-polish .tbl-reservas th {
  background: #fafafa; /* zinc-50 */
  font-weight: 600;
  color: #18181b; /* zinc-900 */
  box-shadow: none;
  border-bottom: 1px solid #e5e7eb; /* gray-200 */
}
html.fgs-polish .tbl-reservas tbody tr:nth-child(odd) {
  background: #ffffff;
}
html.fgs-polish .tbl-reservas tbody tr:nth-child(even) {
  background: rgba(248, 250, 252, 0.55); /* slate-50/50 */
}
html.fgs-polish .tbl-reservas tbody tr.row-selected {
  background: #f1f5f9 !important; /* slate-100 */
}
html.fgs-polish .tbl-reservas tbody tr:hover {
  background: #f8fafc; /* slate-50 */
}
html.fgs-polish .tbl-reservas .td-cb input[type='checkbox'] {
  accent-color: #18181b; /* zinc-900 */
}

/* Reserva online: indicador lateral discreto (sem fundo colorido na linha) */
html.fgs-polish .tbl-reservas tbody tr.tr-reserva-online:not(.tr-reserva-checkin):not(.tr-reserva-checkout) {
  box-shadow: inset 2px 0 0 #a78bfa; /* violet-400 */
}

/* Badges de estado (pills) */
html.fgs-polish .tbl-reservas .reserva-estado-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.35;
  white-space: nowrap;
}
html.fgs-polish .tbl-reservas .reserva-estado-pill--checkin {
  background: #d1fae5; /* emerald-100 */
  color: #065f46; /* emerald-800 */
}
html.fgs-polish .tbl-reservas .reserva-estado-pill--checkout {
  background: #ede9fe; /* violet-100 */
  color: #5b21b6; /* violet-800 */
}
html.fgs-polish .tbl-reservas .reserva-estado-pill--nova {
  background: #fef3c7; /* amber-100 */
  color: #92400e; /* amber-800 */
}
html.fgs-polish .tbl-reservas .reserva-estado-pill--default {
  background: #f1f5f9; /* slate-100 */
  color: #334155; /* slate-700 */
}

/* ——— PDV manual: catálogo alinhado a Nova reserva (zinc / Inter) ——— */
html.fgs-polish main section#secCatalogoPdv.rounded-2xl {
  border-color: #e4e4e7;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 10px 32px rgba(15, 23, 42, 0.06);
  transition: box-shadow 0.22s ease, border-color 0.2s ease;
}
html.fgs-polish main section#secCatalogoPdv.rounded-2xl:hover {
  border-color: #d4d4d8;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.05),
    0 14px 40px rgba(15, 23, 42, 0.08);
}
html.fgs-polish #secCatalogoPdv input[type='search'],
html.fgs-polish #secCatalogoPdv select {
  width: 100%;
  padding: 7px 8px !important;
  border-radius: 6px !important;
  border: 1px solid #a1a1aa !important;
  background: #ffffff !important;
  color: #18181b !important;
  font-size: 10.5px !important;
  box-shadow:
    inset 0 0 0 1px rgba(24, 24, 27, 0.06),
    0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
html.fgs-polish #secCatalogoPdv input[type='search']::placeholder {
  color: #71717a;
}
html.fgs-polish #secCatalogoPdv input[type='search']:focus,
html.fgs-polish #secCatalogoPdv select:focus {
  border-color: #a1a1aa !important;
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.08) !important;
  outline: none !important;
}
html.fgs-polish #pdvCatChipsRow button.pdv-cat-chip {
  border: 2px solid #e4e4e7;
  background: #ffffff;
  color: #27272a; /* zinc-800 */
  font-weight: 500;
  appearance: none;
  cursor: pointer;
}
html.fgs-polish #pdvCatChipsRow button.pdv-cat-chip:hover {
  background: #fafafa;
  border-color: #d4d4d8;
}
html.fgs-polish #pdvCatChipsRow button.pdv-cat-chip[aria-pressed='true'] {
  border-color: #18181b;
  background: #18181b;
  color: #fafafa;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
html.fgs-polish button.pdv-catalog-card {
  border-radius: 8px;
  border: 1.5px solid var(--fgs-header-g2, #0f1b33) !important;
  background: #fff !important;
  box-shadow:
    0 2px 4px -1px rgba(0, 0, 0, 0.05),
    0 1px 2px -1px rgba(0, 0, 0, 0.03);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
html.fgs-polish button.pdv-catalog-card:hover {
  border-color: var(--fgs-header-g2, #0f1b33) !important;
  transform: translateY(-2px);
  box-shadow:
    0 6px 12px -3px rgba(15, 23, 42, 0.08),
    0 2px 4px -2px rgba(15, 23, 42, 0.04);
}
html.fgs-polish button.pdv-catalog-card:active {
  transform: translateY(0);
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.06),
    0 2px 4px -1px rgba(0, 0, 0, 0.04);
}
html.fgs-polish button.pdv-catalog-card:focus-visible {
  outline: none !important;
  box-shadow:
    0 0 0 3px rgba(30, 41, 59, 0.12),
    0 4px 6px -1px rgba(0, 0, 0, 0.05),
    0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
}

/* Imagens remotas (Firebase Storage): slot fixo + skeleton até carregar */
.fgs-storage-image {
  position: relative;
  display: inline-block;
  overflow: hidden;
  flex-shrink: 0;
  vertical-align: middle;
  background-color: #e2e8f0;
}
.fgs-storage-image--empty .fgs-storage-image-skel {
  display: block;
}
.fgs-storage-image-skel {
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.fgs-storage-image-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.fgs-storage-image--loaded .fgs-storage-image-img {
  opacity: 1;
}
.fgs-storage-image--loaded .fgs-storage-image-skel,
.fgs-storage-image--error .fgs-storage-image-skel {
  display: none;
}
.fgs-storage-image--error {
  background-color: #f1f5f9;
}
.fgs-storage-image-img.object-contain,
.fgs-storage-image:has(.object-contain) .fgs-storage-image-img {
  object-fit: contain;
}

/* ——— Carregamento assíncrono (fgs-async-ui.js) ——— */
@keyframes fgs-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

html.fgs-polish .fgs-skel,
.fgs-skel {
  display: inline-block;
  background: linear-gradient(90deg, #e2e8f0 0%, #f1f5f9 45%, #e2e8f0 90%);
  background-size: 200% 100%;
  animation: fgs-shimmer 1.35s ease-in-out infinite;
  border-radius: 4px;
  vertical-align: middle;
}

.fgs-spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid #e2e8f0;
  border-top-color: #22c55e;
  border-radius: 50%;
  animation: fgs-spin 0.75s linear infinite;
}

@keyframes fgs-spin {
  to {
    transform: rotate(360deg);
  }
}

.fgs-catalog-card-skel,
.fgs-pending-card-skel {
  pointer-events: none;
  user-select: none;
}

/* Borda azul de tonalidade igual ao navbar delimitando o carrinho de venda */
html.fgs-polish #cartDrawer {
  border: 5px solid var(--fgs-header-g2, #0f1b33) !important;
}
html.fgs-polish body.fgs-pdv-page #cartDrawer {
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  border: 0 !important;
  border-left: 1px solid #e2e8f0 !important;
  background: #fff !important;
  box-shadow: none !important;
}

/* Botões do carrinho (Finalizar, Pedir Cotação, Limpar) — Estética Unificada Premium */
html.fgs-polish #btnFinalizar {
  background: var(--fgs-header-g2, #0f1b33) !important;
  border: 1px solid var(--fgs-header-g2, #0f1b33) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 14px rgba(15, 27, 51, 0.25) !important;
  transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease !important;
}

html.fgs-polish #btnFinalizar:not(:disabled):hover {
  background: var(--fgs-header-g3, #152a50) !important;
  border-color: var(--fgs-header-g3, #152a50) !important;
  box-shadow: 0 6px 20px rgba(15, 27, 51, 0.35) !important;
}

html.fgs-polish #btnPagarMpesa {
  background: #c41e3a !important;
  border: 1px solid #c41e3a !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 14px rgba(196, 30, 58, 0.28) !important;
  transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease !important;
}

html.fgs-polish #btnPagarMpesa:not(:disabled):hover {
  background: #a01830 !important;
  border-color: #a01830 !important;
  box-shadow: 0 6px 20px rgba(196, 30, 58, 0.38) !important;
}

html.fgs-polish #btnPedirCotacao,
html.fgs-polish #btnGuiaRemessa,
html.fgs-polish #btnLimpar,
html.fgs-polish #btnCongelar {
  background-color: transparent !important;
  background: transparent !important;
  border: 2px solid var(--fgs-header-g2, #0f1b33) !important;
  color: var(--fgs-header-g2, #0f1b33) !important;
  font-weight: 700 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease !important;
}

html.fgs-polish #btnPedirCotacao:not(:disabled):hover,
html.fgs-polish #btnGuiaRemessa:not(:disabled):hover,
html.fgs-polish #btnLimpar:not(:disabled):hover,
html.fgs-polish #btnCongelar:not(:disabled):hover {
  background-color: rgba(15, 27, 51, 0.06) !important;
}

html.fgs-polish #btnFinalizar:disabled,
html.fgs-polish #btnPagarMpesa:disabled,
html.fgs-polish #btnPedirCotacao:disabled,
html.fgs-polish #btnGuiaRemessa:disabled {
  opacity: 0.35 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

/* Badges de IVA nos cartões de produtos — pílula discreta e profissional */
html.fgs-polish .pdv-catalog-card span.shrink-0 {
  background-color: #f1f5f9 !important;
  color: #64748b !important;
  font-size: 8px !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em !important;
  text-transform: none !important;
  border: none !important;
  border-radius: 9999px !important;
  padding: 1px 6px !important;
  line-height: 1.2 !important;
}

/* Catálogo PDV compacto (~40% área) — mínimo 5 colunas em desktop */
html.fgs-polish #gridPdvCatalogo {
  gap: 0.5rem !important;
}
@media (min-width: 1024px) {
  html.fgs-polish #gridPdvCatalogo {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
}
@media (min-width: 1280px) {
  html.fgs-polish #gridPdvCatalogo {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
}
@media (min-width: 1536px) {
  html.fgs-polish #gridPdvCatalogo {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
}

/* Botão flutuante do carrinho — identidade corporativa premium */
html.fgs-polish #btnOpenCartDrawer {
  border: none !important;
  border-radius: 9999px !important;
  background: linear-gradient(180deg, #1e293b 0%, var(--fgs-header-g2, #0f1b33) 100%) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em;
  padding: 0.85rem 1.15rem 0.85rem 1.25rem !important;
  box-shadow:
    0 10px 24px rgba(15, 27, 51, 0.28),
    0 4px 8px rgba(15, 27, 51, 0.12) !important;
  transition: all 0.2s ease;
}

html.fgs-polish #btnOpenCartDrawer:hover {
  background: linear-gradient(180deg, #334155 0%, #1e293b 100%) !important;
  transform: translateY(-1px);
  box-shadow:
    0 14px 28px rgba(15, 27, 51, 0.32),
    0 6px 12px rgba(15, 27, 51, 0.14) !important;
}

html.fgs-polish #btnOpenCartDrawer:active {
  transform: translateY(0);
  box-shadow:
    0 6px 16px rgba(15, 27, 51, 0.22),
    0 2px 6px rgba(15, 27, 51, 0.1) !important;
}

html.fgs-polish #btnOpenCartDrawer:focus-visible {
  outline: none !important;
  box-shadow:
    0 0 0 3px rgba(30, 41, 59, 0.35),
    0 10px 24px rgba(15, 27, 51, 0.28) !important;
}

html.fgs-polish #btnPdvFullscreenSearchFab {
  border: none !important;
  background: linear-gradient(180deg, #1e293b 0%, var(--fgs-header-g2, #0f1b33) 100%) !important;
  color: #ffffff !important;
  box-shadow:
    0 10px 24px rgba(15, 27, 51, 0.28),
    0 4px 8px rgba(15, 27, 51, 0.12) !important;
}

html.fgs-polish #btnPdvFullscreenSearchFab:hover {
  background: linear-gradient(180deg, #334155 0%, #1e293b 100%) !important;
}

html.fgs-polish #pdvFullscreenSearchInput {
  border-color: #cbd5e1 !important;
  font-size: 0.875rem !important;
}

/* Simetria do Botão "Sair de Wide Screen" — alinhado perfeitamente com o Carrinho */
html.fgs-polish #fgsFullscreenFloatingExitBtn {
  border: none !important;
  border-radius: 9999px !important;
  background: linear-gradient(180deg, #1e293b 0%, var(--fgs-header-g2, #0f1b33) 100%) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em;
  padding: 0.85rem 1.25rem !important;
  height: auto !important;
  min-height: 0 !important;
  box-shadow:
    0 10px 24px rgba(15, 27, 51, 0.28),
    0 4px 8px rgba(15, 27, 51, 0.12) !important;
  transition: all 0.2s ease;
}

html.fgs-polish #fgsFullscreenFloatingExitBtn:hover {
  background: linear-gradient(180deg, #334155 0%, #1e293b 100%) !important;
  transform: translateY(-1px) scale(1) !important;
  box-shadow:
    0 14px 28px rgba(15, 27, 51, 0.32),
    0 6px 12px rgba(15, 27, 51, 0.14) !important;
}

html.fgs-polish #fgsFullscreenFloatingExitBtn:active {
  transform: translateY(0) scale(1) !important;
  box-shadow:
    0 6px 16px rgba(15, 27, 51, 0.22),
    0 2px 6px rgba(15, 27, 51, 0.1) !important;
}

html.fgs-polish #fgsFullscreenFloatingExitBtn:focus-visible {
  outline: none !important;
  box-shadow:
    0 0 0 3px rgba(30, 41, 59, 0.35),
    0 10px 24px rgba(15, 27, 51, 0.28) !important;
}

html.fgs-polish #cartFabCount {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 1.65rem !important;
  height: 1.65rem !important;
  padding: 0 0.35rem !important;
  border-radius: 9999px !important;
  background: rgba(255, 255, 255, 0.18) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.35) !important;
  color: #ffffff !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: 0.02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* ==========================================
   SUPORTE PREMIUM PARA MODO WIDE SCREEN / KIOSK
   ========================================== */

/* Quando em ecrã inteiro (Wide Screen), oculta os cabeçalhos, menus e rodapés principais */
html.fgs-fullscreen-active header.fgs-header-gradient,
html.fgs-fullscreen-active footer.fgs-footer-bar,
html.fgs-fullscreen-active #fgsPlatformPreviewBanner {
  display: none !important;
}

/* Força o wrapper principal do PDV a ocupar toda a largura e altura do ecrã (True Wide Screen) */
html.fgs-fullscreen-active #pdvMainWrap {
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 2rem !important;
  padding-right: 2rem !important;
  padding-top: 3.25rem !important;
  padding-bottom: 1.5rem !important;
  margin: 0 !important;
}

/* Quando o carrinho (drawer) está aberto no modo Wide Screen, garante que o conteúdo não seja obliterado/coberto */
@media (min-width: 640px) {
  html.fgs-fullscreen-active.fgs-cart-open #pdvMainWrap {
    padding-right: 440px !important; /* largura do carrinho (420px) + margem confortável de respiro */
  }
  html.fgs-fullscreen-active.fgs-cart-open.fgs-cart-wide #pdvMainWrap {
    padding-right: 860px !important;
  }
}

/* Garante que o aside do carrinho ocupe 100% da altura visível no modo de ecrã inteiro */
html.fgs-fullscreen-active #cartDrawer {
  height: 100vh !important;
  top: 0 !important;
  bottom: 0 !important;
}

/* Adaptação inteligente da grelha de produtos no modo Wide Screen — cards compactos, mín. 5 colunas */
html.fgs-fullscreen-active #gridPdvCatalogo {
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)) !important;
}
@media (min-width: 1024px) {
  html.fgs-fullscreen-active #gridPdvCatalogo {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
}
@media (min-width: 1280px) {
  html.fgs-fullscreen-active #gridPdvCatalogo {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
}
@media (min-width: 1536px) {
  html.fgs-fullscreen-active #gridPdvCatalogo {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
}

html.fgs-fullscreen-active #gridPendentesFaturacao {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
}

/* ==========================================================================
   TECLADO VIRTUAL CONTEXTUAL DE ALTA PERFORMANCE (ESPECIAL PARA POS SEM TECLADO)
   ========================================================================== */

/* Contentor principal do Teclado Virtual */
.fgs-virtual-keyboard {
  position: fixed;
  bottom: 0;
  left: 50%;
  right: auto;
  width: max-content;
  max-width: calc(100vw - 16px);
  background: rgba(248, 250, 252, 0.98); /* Slate 50 com ligeira transparência premium */
  border: 1px solid #cbd5e1;
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -10px 25px -5px rgba(0, 0, 0, 0.12), 0 -8px 10px -6px rgba(0, 0, 0, 0.06);
  z-index: 99999; /* Fica acima de tudo, inclusive do carrinho e modals */
  padding: 4px 8px 10px;
  transform: translateX(-50%) translateY(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 4px;
  user-select: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-sizing: border-box;
}

.fgs-virtual-keyboard.is-dragged {
  transition: none;
}

.fgs-keyboard-drag-handle {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  margin: 0;
  padding: 2px 2px 0;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: grab;
  touch-action: none;
  line-height: 0;
}

.fgs-keyboard-drag-handle:active {
  cursor: grabbing;
}

.fgs-keyboard-drag-handle svg {
  width: 18px;
  height: 18px;
  opacity: 0.55;
}

.fgs-keyboard-keys {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

/* Quando ativo, desliza para cima */
.fgs-virtual-keyboard.active {
  transform: translateX(-50%) translateY(0);
}

.fgs-virtual-keyboard.is-dragged.active {
  transform: none;
}

/* Linha de teclas */
.fgs-keyboard-row {
  display: flex;
  justify-content: center;
  gap: 5px;
  width: 100%;
  box-sizing: border-box;
}

/* Teclado alfabético compacto — sem margens laterais ociosas */
.fgs-virtual-keyboard:not(.numpad) .fgs-keyboard-row {
  gap: 5px;
}

.fgs-virtual-keyboard:not(.numpad) .fgs-keyboard-key {
  flex: 0 0 42px;
  width: 42px;
  min-width: 42px;
  max-width: 42px;
  height: 46px;
  font-size: 15px;
}

.fgs-virtual-keyboard:not(.numpad) .fgs-keyboard-key.special {
  flex: 0 0 50px;
  width: 50px;
  min-width: 50px;
  max-width: 50px;
  font-size: 13px;
}

.fgs-virtual-keyboard:not(.numpad) .fgs-keyboard-key.space-key {
  flex: 1 1 auto;
  width: auto;
  min-width: 160px;
  max-width: none;
}

.fgs-virtual-keyboard:not(.numpad) .fgs-keyboard-key.action-key {
  flex: 0 0 84px;
  width: 84px;
  min-width: 84px;
  max-width: 84px;
}

/* Teclas individuais */
.fgs-keyboard-key {
  flex: 1;
  max-width: 72px;
  height: 52px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f1b33 !important; /* Azul escuro institucional */
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.1s ease, transform 0.05s ease, border-color 0.1s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  touch-action: manipulation; /* Evita atraso de duplo toque e zoom */
  box-sizing: border-box;
}

/* Toque ou clique ativo */
.fgs-keyboard-key:active {
  background: #e2e8f0 !important;
  border-color: #94a3b8 !important;
  transform: scale(0.95);
}

/* Teclas especiais (ex: Shift, Backspace, Espaço, Caps) */
.fgs-keyboard-key.special {
  background: #f1f5f9;
  border-color: #cbd5e1;
  max-width: 95px;
  font-size: 14px;
}

/* Tecla de Espaço larga */
.fgs-keyboard-key.space-key {
  max-width: 340px;
}

/* Tecla de Ação de Destaque (Fechar / Concluir) */
.fgs-keyboard-key.action-key {
  background: var(--fgs-header-g2, #0f1b33) !important;
  color: #ffffff !important;
  border-color: var(--fgs-header-g2, #0f1b33) !important;
  max-width: 110px;
  font-size: 14px;
}
.fgs-keyboard-key.action-key:active {
  background: var(--fgs-header-g3, #152a50) !important;
  border-color: var(--fgs-header-g3, #152a50) !important;
}

/* Teclado numérico compacto (Numpad) — estética POS premium / corporativa */
.fgs-virtual-keyboard.numpad {
  max-width: 320px;
  left: auto !important;
  right: 16px !important;
  bottom: 16px !important;
  transform: translateY(calc(100% + 24px));
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 12px;
  box-shadow:
    0 12px 32px rgba(15, 23, 42, 0.12),
    0 2px 8px rgba(15, 23, 42, 0.06);
  background: rgba(248, 250, 252, 0.98);
  padding: 10px;
  gap: 6px;
}

.fgs-virtual-keyboard.numpad .fgs-keyboard-drag-handle {
  display: none;
}

.fgs-virtual-keyboard.numpad.active {
  transform: translateY(0);
}

.fgs-virtual-keyboard.numpad.is-dragged.active {
  transform: none;
}

/* Teclas numéricas base (0–9, vírgula, apagar) — sem contornos agressivos */
.fgs-virtual-keyboard.numpad .fgs-keyboard-key:not(.action-key):not(.fgs-numpad-clear),
.fgs-virtual-keyboard.numpad .fgs-keyboard-row:nth-child(4) .fgs-keyboard-key.special {
  flex: 1;
  max-width: none;
  height: 48px;
  border: none !important;
  border-radius: 8px;
  background: #f1f5f9;
  color: #1e293b !important;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.01em;
  box-shadow: none;
  transition:
    background-color 0.14s ease,
    transform 0.08s ease,
    box-shadow 0.14s ease;
}

@media (hover: hover) {
  .fgs-virtual-keyboard.numpad .fgs-keyboard-key:not(.action-key):not(.fgs-numpad-clear):hover,
  .fgs-virtual-keyboard.numpad .fgs-keyboard-row:nth-child(4) .fgs-keyboard-key.special:hover {
    background: #e2e8f0 !important;
  }
}

.fgs-virtual-keyboard.numpad .fgs-keyboard-key:not(.action-key):not(.fgs-numpad-clear):active,
.fgs-virtual-keyboard.numpad .fgs-keyboard-row:nth-child(4) .fgs-keyboard-key.special:active {
  background: #e2e8f0 !important;
  border: none !important;
  transform: scale(0.97);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
}

/* Botão C (Limpar) — destaque subtil de acção de limpeza */
.fgs-virtual-keyboard.numpad .fgs-keyboard-row:last-child .fgs-keyboard-key.special,
.fgs-virtual-keyboard.numpad .fgs-numpad-clear {
  flex: 1;
  max-width: none;
  height: 48px;
  border: none !important;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412 !important;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  box-shadow: none;
  transition:
    background-color 0.14s ease,
    transform 0.08s ease;
}

@media (hover: hover) {
  .fgs-virtual-keyboard.numpad .fgs-keyboard-row:last-child .fgs-keyboard-key.special:hover,
  .fgs-virtual-keyboard.numpad .fgs-numpad-clear:hover {
    background: #ffedd5 !important;
  }
}

.fgs-virtual-keyboard.numpad .fgs-keyboard-row:last-child .fgs-keyboard-key.special:active,
.fgs-virtual-keyboard.numpad .fgs-numpad-clear:active {
  background: #fed7aa !important;
  border: none !important;
  transform: scale(0.97);
}

/* Botão Fechar — sólido institucional (alinhado a «Adicionar ao pedido») */
.fgs-virtual-keyboard.numpad .fgs-keyboard-key.action-key {
  flex: 1;
  max-width: none;
  height: 48px;
  border: none !important;
  border-radius: 8px;
  background: linear-gradient(180deg, #1e293b 0%, var(--fgs-header-g2, #0f1b33) 100%) !important;
  color: #ffffff !important;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(15, 27, 51, 0.22);
  transition:
    background 0.14s ease,
    transform 0.08s ease,
    box-shadow 0.14s ease;
}

@media (hover: hover) {
  .fgs-virtual-keyboard.numpad .fgs-keyboard-key.action-key:hover {
    background: linear-gradient(180deg, #334155 0%, #1e293b 100%) !important;
    box-shadow: 0 4px 12px rgba(15, 27, 51, 0.28);
  }
}

.fgs-virtual-keyboard.numpad .fgs-keyboard-key.action-key:active {
  background: var(--fgs-header-g3, #152a50) !important;
  border: none !important;
  transform: scale(0.98);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.18);
}

/* Grelha equilibrada do numpad */
.fgs-virtual-keyboard.numpad .fgs-keyboard-row {
  gap: 6px;
  width: 100%;
}

.fgs-virtual-keyboard.numpad .fgs-keyboard-row:last-child {
  gap: 8px;
}

/* Quando o carrinho está aberto, encolhe o teclado alfabético (não-numérico) 
   para a mesma largura útil dos produtos, desimpedindo a área do carrinho */
@media (min-width: 640px) {
  html.fgs-cart-open .fgs-virtual-keyboard:not(.numpad):not(.is-dragged) {
    left: calc(50% - 220px);
    transform: translateX(-50%) translateY(0);
  }

  html.fgs-cart-open .fgs-virtual-keyboard:not(.numpad):not(.is-dragged):not(.active) {
    transform: translateX(-50%) translateY(100%);
  }
}

/* Quando o teclado numérico virtual está ativo, cortamos o topo do carrinho em 200px (20%) */
html.fgs-numpad-active #cartDrawer {
  top: 200px !important;
  height: calc(100vh - 200px) !important;
  border-top: none !important; /* Fusão visual premium */
  transition: top 0.22s cubic-bezier(0.16, 1, 0.3, 1), height 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Posiciona o teclado numérico virtual horizontalmente e sem margens ociosas no topo do carrinho */
html.fgs-numpad-active .fgs-virtual-keyboard.numpad {
  position: fixed !important;
  top: 0 !important;
  bottom: auto !important;
  right: 0 !important;
  left: auto !important;
  width: min(420px, 100vw) !important; /* Alinhamento exato à largura do carrinho */
  max-width: 420px !important;
  height: 200px !important; /* Ocupa exatamente os 20% recortados no topo */
  border: none !important;
  border-bottom: 1px solid #e2e8f0 !important;
  border-radius: 0 !important; /* Perfeitamente integrado */
  background: #f8fafc !important;
  box-sizing: border-box !important;
  padding: 10px 12px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  transform: translateY(-100%); /* Desliza de cima para baixo */
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease !important;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.1) !important;
}

html.fgs-cart-wide.fgs-numpad-active .fgs-virtual-keyboard.numpad {
  width: min(840px, 100vw) !important;
  max-width: 840px !important;
}

/* Desliza para baixo quando o numpad é ativado */
html.fgs-numpad-active .fgs-virtual-keyboard.numpad.active {
  transform: translateY(0) !important;
  opacity: 1 !important;
}

/* Compactação e disposição horizontal ideal das teclas numéricas para POS táctil */
html.fgs-numpad-active .fgs-virtual-keyboard.numpad .fgs-keyboard-row {
  gap: 6px !important;
}

html.fgs-numpad-active .fgs-virtual-keyboard.numpad .fgs-keyboard-key:not(.action-key):not(.fgs-numpad-clear),
html.fgs-numpad-active .fgs-virtual-keyboard.numpad .fgs-keyboard-row:nth-child(4) .fgs-keyboard-key.special {
  height: 34px !important;
  min-height: 34px !important;
  font-size: 15px !important;
  border-radius: 7px !important;
  border: none !important;
  background: #f1f5f9 !important;
  color: #1e293b !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

html.fgs-numpad-active .fgs-virtual-keyboard.numpad .fgs-keyboard-row:last-child .fgs-keyboard-key.special,
html.fgs-numpad-active .fgs-virtual-keyboard.numpad .fgs-numpad-clear {
  height: 36px !important;
  min-height: 36px !important;
  font-size: 14px !important;
  border-radius: 7px !important;
  border: none !important;
  background: #fff7ed !important;
  color: #9a3412 !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

html.fgs-numpad-active .fgs-virtual-keyboard.numpad .fgs-keyboard-key.action-key {
  height: 36px !important;
  min-height: 36px !important;
  font-size: 13px !important;
  border-radius: 7px !important;
  border: none !important;
  background: linear-gradient(180deg, #1e293b 0%, var(--fgs-header-g2, #0f1b33) 100%) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 6px rgba(15, 27, 51, 0.2) !important;
}

@media (hover: hover) {
  html.fgs-numpad-active .fgs-virtual-keyboard.numpad .fgs-keyboard-key:not(.action-key):not(.fgs-numpad-clear):hover,
  html.fgs-numpad-active .fgs-virtual-keyboard.numpad .fgs-keyboard-row:nth-child(4) .fgs-keyboard-key.special:hover {
    background: #e2e8f0 !important;
  }

  html.fgs-numpad-active .fgs-virtual-keyboard.numpad .fgs-keyboard-row:last-child .fgs-keyboard-key.special:hover,
  html.fgs-numpad-active .fgs-virtual-keyboard.numpad .fgs-numpad-clear:hover {
    background: #ffedd5 !important;
  }

  html.fgs-numpad-active .fgs-virtual-keyboard.numpad .fgs-keyboard-key.action-key:hover {
    background: linear-gradient(180deg, #334155 0%, #1e293b 100%) !important;
  }
}

html.fgs-numpad-active .fgs-virtual-keyboard.numpad .fgs-keyboard-key:not(.action-key):not(.fgs-numpad-clear):active,
html.fgs-numpad-active .fgs-virtual-keyboard.numpad .fgs-keyboard-row:nth-child(4) .fgs-keyboard-key.special:active {
  background: #e2e8f0 !important;
  border: none !important;
  transform: scale(0.97);
}

html.fgs-numpad-active .fgs-virtual-keyboard.numpad .fgs-keyboard-row:last-child .fgs-keyboard-key.special:active,
html.fgs-numpad-active .fgs-virtual-keyboard.numpad .fgs-numpad-clear:active {
  background: #fed7aa !important;
  border: none !important;
}

html.fgs-numpad-active .fgs-virtual-keyboard.numpad .fgs-keyboard-key.action-key:active {
  background: var(--fgs-header-g3, #152a50) !important;
  border: none !important;
  transform: scale(0.98);
}

/* Remove a margem extra do wrapper inferior do ecrã para acomodar o teclado sem rolar se possível */
html.fgs-keyboard-visible #pdvMainWrap {
  padding-bottom: 240px !important;
}

/* Estilos elegantes para o dropdown de Pedidos Suspensos (em Espera) */
.fgs-espera-item {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  padding: 10px 14px !important;
  cursor: pointer !important;
  border-bottom: 1px solid #f1f5f9 !important;
  transition: background-color 0.15s ease, color 0.15s ease !important;
  text-align: left !important;
}
.fgs-espera-item:last-child {
  border-bottom: none !important;
}
.fgs-espera-item:hover {
  background-color: #f1f5f9 !important;
}
.fgs-espera-item .title {
  font-weight: 600 !important;
  color: #1e293b !important;
  font-size: 13px !important;
}
.fgs-espera-item .meta {
  font-size: 11px !important;
  color: #64748b !important;
  font-family: monospace !important;
}
.fgs-espera-item .delete-btn {
  color: #ef4444 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  margin-top: 4px !important;
  align-self: flex-start !important;
}
.fgs-espera-item .delete-btn:hover {
  text-decoration: underline !important;
}

/* Upload de imagem — modal de produtos (produtos.html) */
.fgs-image-upload-container {
  margin-top: 16px;
}
.fgs-field-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #475569;
  margin-bottom: 6px;
}
.fgs-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.fgs-dropzone:hover,
.fgs-dropzone:focus-visible {
  border-color: #94a3b8;
  background: #f1f5f9;
  outline: none;
}
.fgs-dropzone.fgs-dropzone--active {
  border-color: #1e293b;
  background: #eef2ff;
  box-shadow: 0 0 0 3px rgba(30, 41, 59, 0.08);
}
.fgs-dropzone-icon {
  font-size: 24px;
  line-height: 1;
}
.fgs-dropzone-hint {
  margin: 4px 0 0;
  font-size: 13px;
  color: #64748b;
}
#fgs-dropzone-preview {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.fgs-dropzone.fgs-dropzone--selected {
  border-color: #6366f1 !important;
}
#fgs-image-preview-element {
  max-height: 100px;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.fgs-dropzone-remove {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 12px;
  cursor: pointer;
  font-weight: 500;
  padding: 0;
}
.fgs-dropzone-remove:hover {
  text-decoration: underline;
}

.fgs-vestuario-only.hidden {
  display: none !important;
}

.fgs-size-grade {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.fgs-size-chip {
  position: relative;
  cursor: pointer;
  user-select: none;
}

.fgs-size-chip input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.fgs-size-chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  padding: 0.4rem 0.75rem;
  border: 1.5px solid #1e293b;
  border-radius: 0.5rem;
  color: #1e293b;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.fgs-size-chip:hover span {
  box-shadow: 0 0 0 2px rgba(30, 41, 59, 0.12);
}

.fgs-size-chip input:checked + span {
  background: #1e293b;
  color: #fff;
}

.fgs-size-chip input:focus-visible + span {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}

.fgs-nav-item-hidden {
  display: none !important;
}

html:not([data-fgs-business-type='restaurante']) [data-fgs-rest-ops],
html:not([data-fgs-business-type='restaurante']) [data-fgs-tenant-vd-remota],
html:not([data-fgs-business-type='restaurante']) [data-fgs-tenant-ft-remota] {
  display: none !important;
}
html:not([data-fgs-business-type='restaurante']):not([data-fgs-hotelaria='1']) #dashRestHotelRow {
  display: none !important;
}

/* Restauração / hotelaria: esconder por defeito noutros tenants (fail-closed no 1.º paint). */
[data-fgs-rest-ops],
#dashRestHotelRow {
  display: none !important;
}
html[data-fgs-business-type='restaurante'] [data-fgs-rest-ops] {
  display: flex !important;
}
html[data-fgs-business-type='restaurante'] #dashRestHotelRow,
html[data-fgs-hotelaria='1'] #dashRestHotelRow {
  display: grid !important;
}

[data-fgs-hotel-ops] {
  display: none !important;
}
html[data-fgs-hotelaria='1'] [data-fgs-hotel-ops] {
  display: block !important;
}

[data-fgs-tenant-vd-remota],
[data-fgs-tenant-ft-remota] {
  display: none !important;
}
html[data-fgs-business-type='restaurante'] [data-fgs-tenant-vd-remota],
html[data-fgs-business-type='restaurante'] [data-fgs-tenant-ft-remota] {
  display: inline-flex !important;
}

[data-fgs-nav-key='reservas'] {
  display: none !important;
}
html[data-fgs-hotelaria='1'] [data-fgs-nav-key='reservas'] {
  display: inline-flex !important;
}

/* Farmácia / saúde: ocultar abas de restaurante antes do JS async (evita flash no 1.º paint). */
html[data-fgs-business-type='farmacia'] [data-fgs-tenant-vd-remota],
html[data-fgs-business-type='farmacia'] [data-fgs-tenant-ft-remota],
html[data-fgs-business-type='farmacia'] [data-fgs-tenant-manual-ft],
html[data-fgs-business-type='farmacia'] [data-fgs-nav-key='reservas'],
html[data-fgs-business-type='saude'] [data-fgs-tenant-vd-remota],
html[data-fgs-business-type='saude'] [data-fgs-tenant-ft-remota],
html[data-fgs-business-type='saude'] [data-fgs-tenant-manual-ft],
html[data-fgs-business-type='saude'] [data-fgs-nav-key='reservas'] {
  display: none !important;
}

/* Farmácia / saúde: painel e blocos verticais — evita flash de «Pedidos Online» / «Reservas». */
html[data-fgs-business-type='farmacia'] [data-fgs-farmacia-hide],
html[data-fgs-business-type='saude'] [data-fgs-farmacia-hide] {
  display: none !important;
}

html[data-fgs-business-type='farmacia'] nav[data-fgs-farmacia-only].hidden,
html[data-fgs-business-type='saude'] nav[data-fgs-farmacia-only].hidden {
  display: flex !important;
}

html[data-fgs-business-type='farmacia'] div[data-fgs-farmacia-only].hidden,
html[data-fgs-business-type='saude'] div[data-fgs-farmacia-only].hidden {
  display: grid !important;
}

html[data-fgs-business-type='farmacia'] section[data-fgs-farmacia-only].hidden,
html[data-fgs-business-type='saude'] section[data-fgs-farmacia-only].hidden {
  display: block !important;
}

html[data-fgs-business-type='farmacia'] button[data-fgs-farmacia-only].hidden,
html[data-fgs-business-type='saude'] button[data-fgs-farmacia-only].hidden {
  display: inline-flex !important;
}

html[data-fgs-business-type='farmacia'] a.fgs-nav-tab[data-fgs-farmacia-wizard].hidden,
html[data-fgs-business-type='farmacia'] a.fgs-nav-tab[data-fgs-farmacia-wizard].fgs-nav-item-hidden,
html[data-fgs-business-type='saude'] a.fgs-nav-tab[data-fgs-farmacia-wizard].hidden,
html[data-fgs-business-type='saude'] a.fgs-nav-tab[data-fgs-farmacia-wizard].fgs-nav-item-hidden {
  display: inline-flex !important;
}

html[data-fgs-business-type='farmacia'] #dashboardHeroFarmaciaMark.hidden,
html[data-fgs-business-type='saude'] #dashboardHeroFarmaciaMark.hidden {
  display: inline !important;
}

/* Rótulos farmácia no 1.º paint (hero + nav com data-fgs-label-farmacia). */
html[data-fgs-business-type='farmacia']:not([data-fgs-ui-labels-applied]) [data-fgs-label-farmacia]:not(title),
html[data-fgs-business-type='saude']:not([data-fgs-ui-labels-applied]) [data-fgs-label-farmacia]:not(title) {
  font-size: 0 !important;
  line-height: 0 !important;
  color: transparent;
}

html[data-fgs-business-type='farmacia']:not([data-fgs-ui-labels-applied]) [data-fgs-label-farmacia]:not(title)::after,
html[data-fgs-business-type='saude']:not([data-fgs-ui-labels-applied]) [data-fgs-label-farmacia]:not(title)::after {
  content: attr(data-fgs-label-farmacia);
  font-size: 0.75rem;
  line-height: 1.25;
  font-weight: inherit;
  color: inherit;
}

html[data-fgs-business-type='farmacia']:not([data-fgs-ui-labels-applied]) #dashboardHeroTitleText::after,
html[data-fgs-business-type='saude']:not([data-fgs-ui-labels-applied]) #dashboardHeroTitleText::after {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
}

@media (min-width: 640px) {
  html[data-fgs-business-type='farmacia']:not([data-fgs-ui-labels-applied]) #dashboardHeroTitleText::after,
  html[data-fgs-business-type='saude']:not([data-fgs-ui-labels-applied]) #dashboardHeroTitleText::after {
    font-size: 13.5px;
  }
}

html[data-fgs-business-type='farmacia']:not([data-fgs-ui-labels-applied]) a[data-fgs-tenant-manual-vd]:not([data-fgs-label-farmacia]),
html[data-fgs-business-type='saude']:not([data-fgs-ui-labels-applied]) a[data-fgs-tenant-manual-vd]:not([data-fgs-label-farmacia]) {
  font-size: 0 !important;
  line-height: 0 !important;
  color: transparent;
}

html[data-fgs-business-type='farmacia']:not([data-fgs-ui-labels-applied]) a[data-fgs-tenant-manual-vd]:not([data-fgs-label-farmacia])::after,
html[data-fgs-business-type='saude']:not([data-fgs-ui-labels-applied]) a[data-fgs-tenant-manual-vd]:not([data-fgs-label-farmacia])::after {
  content: 'Caixa / PDV';
  font-size: 0.75rem;
  line-height: 1.25;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
}

html[data-fgs-business-type='farmacia']:not([data-fgs-ui-labels-applied]) a.fgs-nav-tab[data-fgs-tenant-manual-vd]:not([data-fgs-label-farmacia])::after,
html[data-fgs-business-type='saude']:not([data-fgs-ui-labels-applied]) a.fgs-nav-tab[data-fgs-tenant-manual-vd]:not([data-fgs-label-farmacia])::after {
  color: rgba(255, 255, 255, 0.78);
}

/* Farmácia: indicador deslizante só após rótulos finais (evita underline no tab errado). */
html[data-fgs-business-type='farmacia']:not([data-fgs-ui-labels-applied]) .fgs-nav-slide-indicator,
html[data-fgs-business-type='saude']:not([data-fgs-ui-labels-applied]) .fgs-nav-slide-indicator {
  opacity: 0 !important;
}

/* FrontOffice / BackOffice — produção (não depende do Theme 2). */
header.fgs-header-gradient .fgs-ws-switch {
  display: inline-flex;
  align-items: center;
  gap: 0;
  flex: 0 0 auto !important;
  width: max-content !important;
  flex-shrink: 0;
  padding: 2px;
  margin-left: 0;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 6px;
  transform: none !important;
}
header.fgs-header-gradient .fgs-ws-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: -0.025em;
  line-height: 1 !important;
  padding: 5px 10px !important;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto !important;
  transform: none !important;
}
header.fgs-header-gradient .fgs-ws-btn:hover {
  color: #e2e8f0;
}
header.fgs-header-gradient .fgs-ws-btn.is-on {
  background: rgba(30, 41, 59, 0.8);
  color: #f1f5f9;
  border-color: transparent;
}
header.fgs-header-gradient .fgs-ws-brand,
header.fgs-header-gradient .fgs-ws-brand-name,
header.fgs-header-gradient .fgs-ws-old-title,
header.fgs-header-gradient [data-fgs-brand-logo-img],
header.fgs-header-gradient #pdvEmpresaTituloTopo,
header.fgs-header-gradient #dashboardHeroTitle,
header.fgs-header-gradient .fgs-header-extras,
header.fgs-header-gradient #empresaBadge,
header.fgs-header-gradient #regimeBadge,
header.fgs-header-gradient #statusApi,
header.fgs-header-gradient #fgsOfflineBadge,
header.fgs-header-gradient #fgsSucursalWrap,
header.fgs-header-gradient [data-fgs-sucursal-wrap],
header.fgs-header-gradient #btnRefresh {
  display: none !important;
}
html:not(.fgs-fo-pdv-fill) header.fgs-header-gradient button#btnPdvKiosk {
  display: none !important;
}
html.fgs-fo-pdv-fill header.fgs-header-gradient button#btnPdvKiosk {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0 !important;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  flex-shrink: 0;
}
html.fgs-fo-pdv-fill header.fgs-header-gradient button#btnPdvKiosk .fgs-pdv-fs-icon {
  width: 20px;
  height: 20px;
  display: block;
  pointer-events: none;
}

/* PDV: ecrã inteiro no canto superior (4 setas). Fora do header para sobreviver ao fullscreen. */
button#btnPdvKiosk.fgs-pdv-fs-fab {
  position: fixed !important;
  top: 10px;
  right: 12px;
  z-index: 100000;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0 !important;
  margin: 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  box-shadow: 0 8px 22px rgba(2, 6, 23, 0.35);
  cursor: pointer;
}
button#btnPdvKiosk.fgs-pdv-fs-fab:hover {
  background: rgba(15, 23, 42, 0.92);
}
button#btnPdvKiosk.fgs-pdv-fs-fab.is-on,
button#btnPdvKiosk.fgs-pdv-fs-fab[aria-pressed='true'] {
  background: rgba(56, 189, 248, 0.22);
  border-color: rgba(125, 211, 252, 0.55);
  color: #e0f2fe;
}
button#btnPdvKiosk.fgs-pdv-fs-fab .fgs-pdv-fs-icon {
  width: 22px;
  height: 22px;
  display: block;
  pointer-events: none;
}
body.fgs-pdv-page #fgsFullscreenFloatingExitBtn {
  display: none !important;
}
html:not([data-fgs-ws='back']) header.fgs-header-gradient nav[aria-label='Navegação principal'] a[href='produtos.html'],
html:not([data-fgs-ws='back']) header.fgs-header-gradient nav[aria-label='Navegação principal'] a[href^='produtos.html?'],
html:not([data-fgs-ws='back']) header.fgs-header-gradient nav[aria-label='Navegação principal'] a[href='equipa.html'],
html:not([data-fgs-ws='back']) header.fgs-header-gradient nav[aria-label='Navegação principal'] a[href^='equipa.html'],
html:not([data-fgs-ws='back']) header.fgs-header-gradient nav[aria-label='Navegação principal'] a[href*='pedidos-reconciliacao'],
html:not([data-fgs-ws='back']) header.fgs-header-gradient nav[aria-label='Navegação principal'] a[href='audit-log.html'],
html:not([data-fgs-ws='back']) header.fgs-header-gradient nav[aria-label='Navegação principal'] a[href*='audit-log.html'],
html:not([data-fgs-ws='back']) header.fgs-header-gradient nav[aria-label='Navegação principal'] a[href*='configuracao.html#'],
html:not([data-fgs-ws='back']) header.fgs-header-gradient nav[aria-label='Navegação principal'] a[href='/stock'],
html:not([data-fgs-ws='back']) header.fgs-header-gradient nav[aria-label='Navegação principal'] a[href$='/stock'],
html:not([data-fgs-ws='back']) #quickLinksNav a[href='produtos.html'],
html:not([data-fgs-ws='back']) #quickLinksNav a[href='equipa.html'],
html:not([data-fgs-ws='back']) #quickLinksNav a[href*='configuracao.html#'],
html:not([data-fgs-ws='back']) #fgsOffcanvasPanel a[href='produtos.html'],
html:not([data-fgs-ws='back']) #fgsOffcanvasPanel a[href='equipa.html'],
html:not([data-fgs-ws='back']) #fgsOffcanvasPanel a[href*='configuracao.html#'] {
  display: none !important;
}
header.fgs-header-gradient [data-fgs-nav-toolbar] nav a.rounded-md {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  text-decoration: none !important;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  letter-spacing: -0.025em !important;
  color: #94a3b8 !important;
  padding: 4px 8px !important;
}
header.fgs-header-gradient [data-fgs-nav-toolbar] nav a.rounded-md:hover {
  background: transparent !important;
  color: #e2e8f0 !important;
}
header.fgs-header-gradient [data-fgs-nav-toolbar] nav span[aria-current='page'],
header.fgs-header-gradient [data-fgs-nav-toolbar] nav a.rounded-md[aria-current='page'] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 2px solid #6366f1 !important;
  border-radius: 0 !important;
  font-weight: 500 !important;
  color: #f1f5f9 !important;
  box-shadow: none !important;
}

/* FrontOffice: só atendimento e facturação. Fiscal/ops vão para BO → Resumo. */
html[data-fgs-ws='front'] [data-fgs-bo-ops],
html[data-fgs-ws='front'] [data-fgs-painel-stat='iva'],
html[data-fgs-ws='front'] [data-fgs-painel-stat='mes'],
html[data-fgs-ws='front'] [data-fgs-painel-stat='clientes'],
html[data-fgs-ws='front'] [data-fgs-painel-stat='catalogo_kpis'],
html[data-fgs-ws='front'] [data-fgs-painel-stat='alertas_stock'],
html[data-fgs-ws='front'] [data-fgs-painel-stat='top'],
html[data-fgs-ws='front'] #dashStatsMesWrap,
html[data-fgs-ws='front'] #paygCreditWidget,
html[data-fgs-ws='front'] #farmBillingWidget,
html[data-fgs-ws='front'] #restBillingWidget,
html[data-fgs-ws='front'] #btnExportarSaftMz,
html[data-fgs-ws='front'] main a[href='produtos.html'],
html[data-fgs-ws='front'] main a[href^='produtos.html?'],
html[data-fgs-ws='front'] main a[href^='welcome.html'],
html[data-fgs-ws='front'] #quickLinkProdutos {
  display: none !important;
}
html[data-fgs-ws='front'] #dashStatsHojeWrap {
  grid-template-columns: minmax(0, 24rem);
  max-width: 24rem;
  margin-bottom: 0;
}
/* FO e BO: uma só linha, um só plano. Graus pelo controlo, não por faixas de fundo. */
html[data-fgs-ws='front'] header.fgs-header-gradient,
html[data-fgs-ws='back'] header.fgs-header-gradient {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  height: 46px;
  max-height: 46px;
  min-height: 46px;
  overflow-x: auto;
  overflow-y: hidden;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}
html[data-fgs-ws='front'] header.fgs-header-gradient > .mx-auto,
html[data-fgs-ws='back'] header.fgs-header-gradient > .mx-auto {
  width: auto;
  max-width: none;
  flex: 0 0 auto;
  margin: 0;
  padding: 0 0 0 12px;
  gap: 6px;
  height: 46px;
  min-height: 46px !important;
  max-height: 46px !important;
  align-items: center;
  background: transparent;
}
/* Traço 1: FO/BO | áreas — mesmo tamanho que o traço 2. */
html[data-fgs-ws='front'] header.fgs-header-gradient > .mx-auto::after,
html[data-fgs-ws='back'] header.fgs-header-gradient > .mx-auto::after {
  content: '';
  display: block;
  width: 1px;
  height: 18px;
  margin: 0 12px;
  background: rgba(226, 232, 240, 0.55);
  flex-shrink: 0;
  align-self: center;
}
html[data-fgs-ws='front'] header.fgs-header-gradient > .mx-auto > .flex,
html[data-fgs-ws='back'] header.fgs-header-gradient > .mx-auto > .flex {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  align-items: center;
  height: 46px;
}
html[data-fgs-ws='front'] header.fgs-header-gradient .fgs-nav-tabs-wrap,
html[data-fgs-ws='front'] header.fgs-header-gradient .cfg-header-tabs,
html[data-fgs-ws='back'] header.fgs-header-gradient .fgs-nav-tabs-wrap,
html[data-fgs-ws='back'] header.fgs-header-gradient .cfg-header-tabs {
  flex: 1 1 auto;
  min-width: 0;
  border-top: 0 !important;
  height: 46px;
}
html[data-fgs-ws='front'] header.fgs-header-gradient .cfg-header-tabs-inner,
html[data-fgs-ws='back'] header.fgs-header-gradient .cfg-header-tabs-inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  padding: 0 10px 0 0 !important;
  max-width: none;
  margin: 0;
  height: 46px;
}
html[data-fgs-ws='front'] header.fgs-header-gradient .cfg-group-tabs,
html[data-fgs-ws='back'] header.fgs-header-gradient .cfg-group-tabs {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  width: auto !important;
  min-width: 0 !important;
  gap: 2px !important;
  height: auto;
  align-items: center;
}
html[data-fgs-ws='front'] header.fgs-header-gradient .cfg-group-tab,
html[data-fgs-ws='back'] header.fgs-header-gradient .cfg-group-tab {
  border: 0 !important;
  border-radius: 6px !important;
  padding: 4px 8px !important;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: -0.025em !important;
  color: #cbd5e1 !important;
  background: transparent !important;
}
html[data-fgs-ws='back'] header.fgs-header-gradient .cfg-group-tab svg,
html[data-fgs-ws='back'] header.fgs-header-gradient .cfg-group-tab img,
html[data-fgs-ws='back'] header.fgs-header-gradient .cfg-group-tab .fgs-oc-icon {
  display: none !important;
}
html[data-fgs-ws='front'] header.fgs-header-gradient .cfg-group-tab.active,
html[data-fgs-ws='back'] header.fgs-header-gradient .cfg-group-tab.active {
  background: rgba(8, 16, 32, 0.72) !important;
  color: #f8fafc !important;
}
html[data-fgs-ws='front'] header.fgs-header-gradient .cfg-subtab-strip .tab,
html[data-fgs-ws='back'] header.fgs-header-gradient .cfg-subtab-strip .tab {
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  padding: 4px 8px !important;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  letter-spacing: -0.025em !important;
  color: #94a3b8 !important;
  background: transparent !important;
}
html[data-fgs-ws='front'] header.fgs-header-gradient .cfg-subtab-strip .tab.active,
html[data-fgs-ws='back'] header.fgs-header-gradient .cfg-subtab-strip .tab.active {
  background: transparent !important;
  color: #e2e8f0 !important;
  font-weight: 500 !important;
  border-bottom-color: #93c5fd !important;
}
html[data-fgs-ws='front'] header.fgs-header-gradient .fo-tabs-stack,
html[data-fgs-ws='back'] header.fgs-header-gradient .cfg-tabs-stack {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  height: 46px;
}
html[data-fgs-ws='front'] header.fgs-header-gradient .fo-tabs-stack > .cfg-group-tabs,
html[data-fgs-ws='back'] header.fgs-header-gradient .cfg-tabs-stack > .cfg-group-tabs {
  min-width: 0;
  width: auto;
  flex: 0 0 auto;
}
html[data-fgs-ws='front'] header.fgs-header-gradient .fo-tabs-stack > .cfg-subtab-strip.active,
html[data-fgs-ws='back'] header.fgs-header-gradient .cfg-tabs-stack > .cfg-subtab-strip.active {
  display: flex;
  padding-top: 0;
  padding-bottom: 0;
  padding-left: 0;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
}
html[data-fgs-ws='front'] header.fgs-header-gradient .fo-tabs-stack > .cfg-subtab-strip.active:not([hidden])::before,
html[data-fgs-ws='back'] header.fgs-header-gradient .cfg-tabs-stack > .cfg-subtab-strip.active:not([hidden])::before {
  content: '';
  display: block;
  width: 2px !important;
  min-width: 2px !important;
  height: 18px !important;
  align-self: center;
  min-height: 0;
  margin: 0 12px;
  background: rgba(248, 250, 252, 0.92) !important;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.22);
  flex-shrink: 0;
}
html[data-fgs-ws='front'] header.fgs-header-gradient .fgs-logout-btn.fgs-header-logout-icon,
html[data-fgs-ws='back'] header.fgs-header-gradient .fgs-logout-btn.fgs-header-logout-icon {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  border-radius: 6px !important;
}
#fgsPlatformPreviewBanner,
#fgsPlatformPreviewBanner.fgs-sa-badge {
  position: static !important;
  top: auto !important;
  z-index: 41;
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  height: 22px;
  padding: 0 8px !important;
  margin: 0 10px 0 4px !important;
  flex-shrink: 0;
  background: rgba(15, 23, 42, 0.72) !important;
  border: 1px solid #1e293b !important;
  border-bottom: 1px solid #1e293b !important;
  border-radius: 6px;
  color: #94a3b8 !important;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: -0.025em;
  line-height: 1 !important;
  white-space: nowrap;
}
#fgsPlatformPreviewBanner .fgs-sa-badge-link,
#fgsPlatformPreviewBanner a {
  color: #a5b4fc !important;
  text-decoration: none !important;
  font-weight: 500 !important;
}
#fgsPlatformPreviewBanner .fgs-sa-badge-link:hover,
#fgsPlatformPreviewBanner a:hover {
  color: #c7d2fe !important;
  text-decoration: underline !important;
}
html.fgs-polish > body > #fgsPlatformPreviewBanner {
  position: absolute !important;
  top: 12px;
  right: 12px;
  z-index: 80;
}
html[data-fgs-ws='front'] body.fgs-painel-page #foShellDash,
html[data-fgs-ws='front'] body.fgs-painel-page main {
  padding-top: 0.5rem;
  padding-bottom: 1rem;
}

/* Menu FGS no FrontOffice: só no PDV em concha (gaveta no cabeçalho de cima). */
html[data-fgs-ws='front']:not(:has(body.fgs-pdv-page)):not(.fgs-fo-pdv-fill) #btnOpenOffcanvas,
html[data-fgs-ws='front']:not(:has(body.fgs-pdv-page)):not(.fgs-fo-pdv-fill) #fgsOffcanvasRoot {
  display: none !important;
}
html.fgs-fo-pdv-fill #btnOpenOffcanvas {
  display: inline-flex !important;
}
html.fgs-fo-pdv-fill #fgsOffcanvasRoot {
  display: block !important;
  z-index: 200;
}
html[data-fgs-ws='back'] header.fgs-header-gradient #btnOpenOffcanvas.fgs-bo-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  border-radius: 0.375rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
}
html[data-fgs-ws='back'] header.fgs-header-gradient #btnOpenOffcanvas.fgs-bo-menu-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}
html[data-fgs-ws='back'] .fgs-offcanvas-wrap {
  position: fixed;
  inset: 0;
  z-index: 100;
  visibility: hidden;
  pointer-events: none;
}
html[data-fgs-ws='back'].fgs-offcanvas-open .fgs-offcanvas-wrap {
  visibility: visible;
  pointer-events: auto;
}
html[data-fgs-ws='back'] #fgsOffcanvasBackdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(2, 6, 23, 0.55);
  opacity: 0;
  transition: opacity 0.2s ease;
  cursor: pointer;
}
html[data-fgs-ws='back'].fgs-offcanvas-open #fgsOffcanvasBackdrop {
  opacity: 1;
}
html[data-fgs-ws='back'] #fgsOffcanvasPanel {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100dvh;
  width: min(100vw, 20rem);
  min-height: 0;
  color: #fff;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.45);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  transform: translateX(-100%);
  transition: transform 0.25s ease;
}
html[data-fgs-ws='back'].fgs-offcanvas-open #fgsOffcanvasPanel {
  transform: translateX(0);
}
html[data-fgs-ws='back'] #fgsOffcanvasPanel .fgs-bo-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
html[data-fgs-ws='back'] #fgsOffcanvasPanel .fgs-bo-menu-head h2 {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
html[data-fgs-ws='back'] #fgsOffcanvasPanel .fgs-bo-menu-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
html[data-fgs-ws='back'] #fgsOffcanvasPanel .fgs-bo-menu-close:hover {
  background: rgba(255, 255, 255, 0.1);
}
html[data-fgs-ws='back'] #fgsOffcanvasPanel .fgs-offcanvas-scroll {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}
html[data-fgs-ws='back'] #fgsOffcanvasPanel .fgs-bo-menu-theme {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
html[data-fgs-ws='back'] #fgsOffcanvasPanel .fgs-bo-menu-theme > p,
html[data-fgs-ws='back'] #fgsOffcanvasPanel .fgs-bo-menu-kicker {
  margin: 0 0 0.5rem;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
}
html[data-fgs-ws='back'] #fgsOffcanvasPanel .fgs-bo-menu-theme label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}
html[data-fgs-ws='back'] #fgsOffcanvasPanel .fgs-bo-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
html[data-fgs-ws='back'] #fgsOffcanvasPanel .fgs-bo-menu-nav a,
html[data-fgs-ws='back'] #fgsOffcanvasPanel .fgs-bo-menu-nav > button,
html[data-fgs-ws='back'] #fgsOffcanvasPanel .fgs-bo-menu-nav .fgs-bo-menu-reports button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 0;
  border-radius: 0.75rem;
  background: transparent;
  color: #e2e8f0;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
html[data-fgs-ws='back'] #fgsOffcanvasPanel .fgs-bo-menu-nav a:hover,
html[data-fgs-ws='back'] #fgsOffcanvasPanel .fgs-bo-menu-nav > button:hover {
  background: rgba(255, 255, 255, 0.1);
}
html[data-fgs-ws='back'] #fgsOffcanvasPanel .fgs-bo-menu-nav a.fgs-bo-menu-accent {
  background: rgba(124, 58, 237, 0.9);
  color: #fff;
  font-weight: 600;
}
html[data-fgs-ws='back'] #fgsOffcanvasPanel .fgs-bo-menu-reports {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
html[data-fgs-ws='back'] #fgsOffcanvasPanel #btnFechoDia {
  justify-content: center;
  background: linear-gradient(180deg, #2563eb, #1e40af);
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
}
html[data-fgs-ws='back'] #fgsOffcanvasPanel #btnExportarSaftMz {
  justify-content: center;
  margin-top: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
}
html[data-fgs-ws='back'] #fgsOffcanvasPanel #offcanvasBtnIrConfig,
html[data-fgs-ws='back'] #fgsOffcanvasPanel #offcanvasBtnIrPerfil {
  margin-top: 0.25rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
}
html[data-fgs-ws='back'] #fgsOffcanvasPanel .fgs-bo-menu-foot {
  padding: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
html[data-fgs-ws='back'] #fgsOffcanvasPanel .fgs-bo-menu-foot .fgs-logout-btn {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.75rem;
  background: transparent;
  color: #e2e8f0;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
html[data-fgs-ws='back'] #fgsOffcanvasPanel .fgs-bo-menu-foot .fgs-logout-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}
html[data-fgs-ws='back'] #fgsOffcanvasPanel .hidden {
  display: none !important;
}
html[data-fgs-ws='back'] #offcanvasLeadsCountBadge:not(.hidden) {
  margin-left: auto;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
}

/* ==========================================================================
   PDV balcão — altura útil, cartões de toque, carrinho sticky
   ========================================================================== */
html:has(body.fgs-pdv-page),
html.fgs-pdv-root,
body.fgs-pdv-page {
  height: 100% !important;
  max-height: 100%;
}
body.fgs-pdv-page {
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
  min-height: 0 !important;
}
body.fgs-pdv-page > footer.fgs-footer-bar {
  display: block !important;
  flex-shrink: 0;
}
body.fgs-pdv-page > header.fgs-header-gradient {
  flex-shrink: 0;
}
body.fgs-pdv-page > header.fgs-header-gradient .pdv-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0.4rem 0.85rem;
}
body.fgs-pdv-page > header.fgs-header-gradient .pdv-topbar-inner + .border-t,
body.fgs-pdv-page > header.fgs-header-gradient [data-fgs-nav-toolbar] {
  display: none;
}
body.fgs-pdv-page .pdv-nav-more {
  display: none !important;
}

/* Off-canvas PDV */
html.fgs-offcanvas-open {
  overflow: hidden;
}
body.fgs-pdv-page .fgs-offcanvas-wrap {
  visibility: hidden;
  pointer-events: none;
}
html.fgs-offcanvas-open body.fgs-pdv-page .fgs-offcanvas-wrap {
  visibility: visible;
  pointer-events: auto;
}
body.fgs-pdv-page #fgsOffcanvasBackdrop {
  opacity: 0;
  transition: opacity 0.2s ease;
  border: 0;
  padding: 0;
  cursor: pointer;
}
html.fgs-offcanvas-open body.fgs-pdv-page #fgsOffcanvasBackdrop {
  opacity: 1;
}
body.fgs-pdv-page #fgsOffcanvasPanel {
  transform: translateX(-100%);
  transition: transform 0.25s ease;
}
html.fgs-offcanvas-open body.fgs-pdv-page #fgsOffcanvasPanel {
  transform: translateX(0);
}
body.fgs-pdv-page .pdv-oc-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 0.75rem;
  padding: 0.65rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #e2e8f0;
  text-decoration: none;
}
body.fgs-pdv-page .pdv-oc-link:hover,
body.fgs-pdv-page .pdv-oc-link[aria-current='page'],
body.fgs-pdv-page .pdv-oc-link.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
body.fgs-pdv-page .pdv-oc-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  padding: 0.7rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
}
body.fgs-pdv-page .pdv-oc-logout:hover {
  background: rgba(255, 255, 255, 0.16);
}
body.fgs-pdv-page .pdv-nav-more > summary {
  list-style: none;
  cursor: pointer;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  padding: 0.35rem 0.7rem;
  font-size: 12px;
  font-weight: 650;
  color: #fff;
  user-select: none;
}
body.fgs-pdv-page .pdv-nav-more > summary::-webkit-details-marker {
  display: none;
}
body.fgs-pdv-page .pdv-nav-more[open] > summary {
  background: rgba(255, 255, 255, 0.18);
}
body.fgs-pdv-page .pdv-nav-more-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 50;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
}
body.fgs-pdv-page .pdv-nav-more-panel a {
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  background: #f8fafc;
}
body.fgs-pdv-page .pdv-nav-more-panel a:hover,
body.fgs-pdv-page .pdv-nav-more-panel a[aria-current='page'] {
  background: #0f172a;
  color: #fff;
}
body.fgs-pdv-page #btnOpenOffcanvas {
  display: flex !important;
}
body.fgs-pdv-page #btnOpenCartDrawer {
  display: none !important;
}
body.fgs-pdv-page #cartDrawer > .flex,
body.fgs-pdv-page #cartDrawer > .pdv-cart-col {
  min-height: 0;
  height: 100%;
}
body.fgs-pdv-page #pdvWorkspace {
  flex: 1 1 0%;
  min-height: 0;
  height: auto;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  align-self: stretch;
}
body.fgs-pdv-page #pdvMainWrap {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: none !important;
  margin: 0 !important;
  padding: 1rem !important;
  border-radius: 0 !important;
  background: #f1f5f9 !important;
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
}
body.fgs-pdv-page #pdvMainWrap > main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0 !important;
}
body.fgs-pdv-page #secCatalogoPdv {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
body.fgs-pdv-page #secCatalogoPdv > .pdv-catalog-head {
  flex-shrink: 0;
}
.pdv-catalog-toolbar-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.5rem;
}
.pdv-catalog-toolbar-row .pdv-catalog-search {
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
}
#secCatalogoPdv.pdv-has-loja-marketing .pdv-catalog-toolbar-row .pdv-catalog-search {
  flex: 1 1 auto;
  width: auto;
  max-width: calc(70% - 0.35rem);
  min-width: 0;
  margin-left: auto;
}
body.fgs-pdv-page .pdv-toolbar-legacy,
body.fgs-pdv-page #pdvApresentacoesWrap,
body.fgs-pdv-page .pdv-catalog-mostrar {
  display: none !important;
}
body.fgs-pdv-page #secCatalogoPdv #fgsEsperaSection:not([hidden]) {
  display: block !important;
  position: relative;
  flex: 0 0 auto;
}
body.fgs-pdv-page #secCatalogoPdv #fgsEsperaSection[hidden] {
  display: none !important;
}
.pdv-catalog-toolbar-row .pdv-catalog-search > span:first-child,
.pdv-catalog-toolbar-row .pdv-catalog-mostrar > span:first-child,
#fgsEsperaSection > span:first-child,
#pdvApresentacoesWrap > span:first-child {
  display: none;
}
body.fgs-pdv-page #pdvCatalogSearch {
  min-height: 2.65rem;
  font-size: 0.95rem;
}
#pdvCatChipsRow.pdv-cat-tabs:not(.hidden) {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  overflow-x: auto;
  overflow-y: hidden;
  border-bottom: 1px solid #e4e4e7;
  padding: 0 0 0.5rem;
  margin: 0.15rem 0 0;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
#pdvCatChipsRow.pdv-cat-tabs .pdv-cat-chip {
  flex: 0 0 auto;
}
.pdv-catalog-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
  -webkit-overflow-scrolling: touch;
}
html.fgs-polish #gridPdvCatalogo.pdv-catalog-grid {
  display: grid;
  gap: 0.65rem !important;
}
@media (min-width: 1024px) {
  html.fgs-polish #gridPdvCatalogo.pdv-catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)) !important;
  }
}
@media (min-width: 1024px) and (max-height: 800px) {
  html.fgs-polish #gridPdvCatalogo.pdv-catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
  }
}
html.fgs-polish button.pdv-catalog-card:not(.pdv-family-card) {
  min-height: 0;
  width: 100%;
  padding: 0 !important;
  gap: 0;
  overflow: hidden;
}
.pdv-card-media {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 100%;
  height: 5.5rem;
  padding: 0.5rem;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
}
@media (min-width: 1280px) {
  .pdv-card-media {
    height: 6.25rem;
  }
}
@media (min-width: 1024px) and (max-height: 800px) {
  .pdv-card-media {
    height: 4.15rem;
    padding: 0.35rem;
  }
}
.pdv-card-media-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: 100%;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
}
.pdv-card-media-ph {
  display: none;
  align-items: center;
  justify-content: center;
}
.pdv-card-media.is-empty .pdv-card-media-img {
  display: none;
}
.pdv-card-media.is-empty .pdv-card-media-ph {
  display: flex;
}
.pdv-card-media-icon {
  width: 2rem;
  height: 2rem;
  color: #cbd5e1;
}
.pdv-card-media-logo {
  width: auto;
  max-width: 90%;
  height: 4.0625rem;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
}
@media (min-width: 1024px) and (max-height: 800px) {
  .pdv-card-media-logo {
    height: 2.9375rem;
  }
}
.pdv-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 4.35rem;
  padding: 0.55rem 0.7rem 0.65rem;
  gap: 0.2rem;
}
html.fgs-polish button.pdv-catalog-card .pdv-card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  color: #0f172a !important;
  letter-spacing: -0.02em;
}
html.fgs-polish button.pdv-catalog-card .pdv-card-sub {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 11px !important;
  font-weight: 500 !important;
  color: #64748b !important;
  line-height: 1.3;
}
html.fgs-polish button.pdv-catalog-card:not(.pdv-family-card) {
  container-type: inline-size;
}
html.fgs-polish button.pdv-catalog-card .pdv-card-foot {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}
html.fgs-polish button.pdv-catalog-card .pdv-card-foot .pdv-stock-badge {
  flex-shrink: 0;
}
html.fgs-polish button.pdv-catalog-card .pdv-card-price {
  font-size: clamp(0.78rem, 12cqi, 1.05rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em;
  color: #0f172a !important;
  line-height: 1.1;
  white-space: nowrap;
  min-width: 0;
}
.pdv-stock-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.pdv-stock-badge.is-ok {
  background: #dcfce7;
  color: #166534;
}
.pdv-stock-badge.is-low {
  background: #fef3c7;
  color: #92400e;
}
.pdv-stock-badge.is-out {
  background: #fee2e2;
  color: #991b1b;
}
html.fgs-polish button.pdv-catalog-card.is-out-of-stock,
.pdv-family-chip.is-out-of-stock {
  opacity: 0.55;
}
.pdv-family-card.pdv-catalog-card {
  min-height: 7.25rem;
  padding: 0.7rem 0.75rem;
  gap: 0.45rem;
}
.pdv-family-card .pdv-card-title {
  font-size: 13px;
  font-weight: 800;
}
.pdv-family-chip {
  padding: 0.45rem 0.5rem !important;
  font-size: 12px !important;
}
.pdv-family-chip .pdv-card-price {
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.pdv-catalog-atencao {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  margin-top: 0.15rem;
  padding-top: 0.45rem;
  border-top: 1px solid #e2e8f0;
}
.pdv-catalog-atencao[hidden] {
  display: none !important;
}
@media (max-height: 800px) {
  .pdv-catalog-atencao {
    display: none !important;
  }
}
.pdv-atencao-label {
  flex: 0 0 auto;
  margin: 0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #92400e;
}
.pdv-atencao-row {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  gap: 0.35rem;
  overflow-x: auto;
  scrollbar-width: thin;
}
.pdv-atencao-chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.35rem;
  max-width: 16rem;
  min-height: 2rem;
  padding: 0.2rem 0.45rem 0.2rem 0.55rem;
  border: 1px solid #fde68a;
  border-radius: 999px;
  background: #fffbeb;
  color: #0f172a;
  cursor: pointer;
}
.pdv-atencao-chip.is-out-of-stock {
  border-color: #fecaca;
  background: #fff1f2;
  opacity: 0.85;
}
.pdv-atencao-nome {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}
.pdv-atencao-more {
  flex: 0 0 auto;
  align-self: center;
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
}
@media (min-width: 1024px) and (max-height: 800px) {
  .pdv-card-body {
    min-height: 3.35rem;
    padding: 0.4rem 0.45rem 0.45rem;
  }
  html.fgs-polish button.pdv-catalog-card .pdv-card-title {
    font-size: 12px !important;
  }
}

#cartDrawer .fgs-checkout-summary {
  flex-shrink: 0;
  position: static;
  z-index: 2;
  width: 100%;
  margin: 0;
  padding: 1rem;
  border-radius: 0;
  background: rgb(248 250 252 / 0.5);
  border-top: 1px solid #e2e8f0;
  box-shadow: none;
}
#cartDrawer .fgs-checkout-header {
  flex-shrink: 0;
}
#pdvPayButtonsRow {
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem !important;
}
html.fgs-polish #btnFinalizar,
html.fgs-polish #btnPagarMpesa {
  min-height: 3.15rem;
  font-size: 0.92rem !important;
  letter-spacing: -0.01em;
}
#pdvAcoesSecundarias {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.35rem;
}
#pdvAcoesSecundarias > button {
  flex: 1 1 0;
  min-width: 0;
  white-space: normal;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.15;
}
#pdvAcoesSecundarias > #pdvContaHotelWrap.flex {
  grid-column: 1 / -1;
}
html.fgs-polish #btnPedirCotacao,
html.fgs-polish #btnGuiaRemessa,
html.fgs-polish #btnCongelar {
  background: #fff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
  font-weight: 650 !important;
  min-height: 2.75rem;
  font-size: 11px !important;
}
html.fgs-polish #btnPedirCotacao:not(:disabled):hover,
html.fgs-polish #btnGuiaRemessa:not(:disabled):hover,
html.fgs-polish #btnCongelar:not(:disabled):hover {
  background: #f1f5f9 !important;
}
html.fgs-polish #btnLimpar {
  background: #fff !important;
  border: 1px solid #fecaca !important;
  color: #9f1239 !important;
  font-weight: 700 !important;
  min-height: 2.75rem;
  font-size: 11px !important;
}
html.fgs-polish #btnLimpar:hover {
  background: #fff1f2 !important;
}

/* Desktop: catálogo | carrinho 380px permanente (sem FAB) */
@media (min-width: 1024px) {
  body.fgs-pdv-page {
    --pdv-cart-col: 380px;
  }
  body.fgs-pdv-page #pdvWorkspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--pdv-cart-col);
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
    justify-items: stretch;
    gap: 0;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    width: 100%;
  }
  body.fgs-pdv-page #pdvMainWrap,
  html.fgs-cart-open body.fgs-pdv-page #pdvMainWrap,
  html.fgs-cart-open.fgs-cart-wide body.fgs-pdv-page #pdvMainWrap,
  html.fgs-fullscreen-active body.fgs-pdv-page #pdvMainWrap,
  html.fgs-fullscreen-active.fgs-cart-open #pdvMainWrap,
  html.fgs-fullscreen-active.fgs-cart-open.fgs-cart-wide #pdvMainWrap {
    min-width: 0;
    min-height: 0;
    height: 100%;
    width: auto;
    margin: 0 !important;
    padding: 1rem !important;
    border-radius: 0 !important;
    background: #f1f5f9 !important;
  }
  body.fgs-pdv-page #cartDrawer,
  body.fgs-pdv-page #cartDrawer.hidden,
  html.fgs-polish body.fgs-pdv-page #cartDrawer {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-self: stretch;
    justify-self: stretch;
    z-index: 20;
    box-shadow: none !important;
    background: #fff !important;
    border: 0 !important;
    border-left: 1px solid #e2e8f0 !important;
  }
  body.fgs-pdv-page #cartDrawer.fgs-cart-wide {
    width: var(--pdv-cart-col) !important;
    max-width: var(--pdv-cart-col) !important;
  }
  body.fgs-pdv-page #cartDrawerBackdrop,
  body.fgs-pdv-page #btnOpenCartDrawer,
  html.fgs-polish body.fgs-pdv-page #btnOpenCartDrawer,
  body.fgs-pdv-page #btnCloseCartDrawer,
  body.fgs-pdv-page #btnExpandCartDrawer {
    display: none !important;
  }
}

/* Ecrãs estreitos: o carrinho aberto encosta ao header, ao rodapé e à direita. */
@media (max-width: 1023px) {
  body.fgs-pdv-page #cartDrawer:not(.hidden) {
    position: fixed !important;
    top: 44px !important;
    right: 0 !important;
    bottom: 2.75rem !important;
    left: auto !important;
    width: min(420px, 100vw) !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    z-index: 46;
  }
}

html.fgs-fo-pdv-fill,
html.fgs-fo-pdv-fill body {
  height: 100%;
  overflow: hidden;
}
html.fgs-fo-pdv-fill #fgsShell,
html.fgs-fo-pdv-fill #fgsShell > .flex {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: 100% !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}
html.fgs-fo-pdv-fill #foShellStage {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}
html.fgs-fo-pdv-fill header.fgs-header-gradient {
  flex-shrink: 0;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  height: 46px !important;
  max-height: 46px !important;
  overflow-x: auto;
  overflow-y: hidden;
}
html.fgs-fo-pdv-fill header.fgs-header-gradient > #fgsPlatformPreviewBanner,
html.fgs-fo-pdv-fill #fgsPlatformPreviewBanner {
  position: static !important;
  top: auto !important;
  right: auto !important;
  flex-shrink: 0;
}
html.fgs-fo-pdv-fill footer.fgs-footer-bar {
  display: block !important;
  flex-shrink: 0 !important;
}
html.fgs-fullscreen-active footer.fgs-footer-bar,
html.fgs-fullscreen-active body.fgs-pdv-page > footer.fgs-footer-bar {
  display: none !important;
}
html.fgs-fo-pdv-fill #foShellFrame {
  flex: 1 1 auto !important;
  height: auto !important;
  width: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
}
html.fgs-embed:has(body.fgs-pdv-page) header.fgs-header-gradient,
html.fgs-embed:has(body.fgs-pdv-page) footer.fgs-footer-bar,
html.fgs-embed:has(body.fgs-pdv-page) #fgsOffcanvasRoot,
html.fgs-embed:has(body.fgs-pdv-page) .fgs-offcanvas-wrap {
  display: none !important;
}
html.fgs-embed:has(body.fgs-pdv-page),
html.fgs-embed:has(body.fgs-pdv-page) body.fgs-pdv-page {
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}
html.fgs-embed:has(body.fgs-pdv-page) #pdvWorkspace,
html.fgs-embed:has(body.fgs-pdv-page) #pdvMainWrap {
  overflow: hidden !important;
  height: auto !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
}

/* Explicação de card/aba: só visível ao passar o rato (ou foco no ícone). */
.card > h2:has(.fgs-help),
.card-dark > h2:has(.fgs-help) {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
button.fgs-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  border: 1px solid #7dd3fc;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 10px;
  font-weight: 800;
  font-style: italic;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1;
  cursor: help;
  flex-shrink: 0;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
}
button.fgs-help::before {
  content: "i";
}
.fgs-help-tip {
  position: absolute;
  left: 0;
  top: calc(100% + 7px);
  z-index: 40;
  width: max-content;
  max-width: min(22rem, 78vw);
  padding: 0.5rem 0.65rem;
  border-radius: 0.5rem;
  background: #0f172a;
  color: #f8fafc;
  font-size: 11px;
  font-weight: 500;
  font-style: normal;
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-2px);
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s;
}
.fgs-help-tip::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  bottom: 100%;
  border: 5px solid transparent;
  border-bottom-color: #0f172a;
}
button.fgs-help:hover .fgs-help-tip,
button.fgs-help:focus .fgs-help-tip,
button.fgs-help:focus-visible .fgs-help-tip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (max-width: 639px) {
  body.fgs-pdv-page {
    overflow: auto;
    height: auto;
    max-height: none;
  }
  body.fgs-pdv-page #pdvMainWrap,
  body.fgs-pdv-page #secCatalogoPdv,
  .pdv-catalog-scroll {
    min-height: 70vh;
    overflow: visible;
  }
}

/* Modais dos tenants: bordo preto, fundo cinza, campos de escrita brancos.
   A plataforma (html.fgs-platform) mantém o tema azul já definido na página. */
html.fgs-polish:not(.fgs-platform) .modal,
html.fgs-polish:not(.fgs-platform) .modal-rq,
html.fgs-polish:not(.fgs-platform) .preck-modal,
html.fgs-polish:not(.fgs-platform) .cat-modal,
html.fgs-polish:not(.fgs-platform) .hex-modal,
html.fgs-polish:not(.fgs-platform) .rq-drawer,
html.fgs-polish:not(.fgs-platform) .fgs-modal-panel {
  background-color: #d4d4d8 !important;
  background-image: none !important;
  border: 2px solid #000 !important;
  color: #18181b !important;
}
html.fgs-polish:not(.fgs-platform) .modal-h,
html.fgs-polish:not(.fgs-platform) .modal-rq-h,
html.fgs-polish:not(.fgs-platform) .modal-f,
html.fgs-polish:not(.fgs-platform) .modal-rq-f,
html.fgs-polish:not(.fgs-platform) .modal-b,
html.fgs-polish:not(.fgs-platform) .modal-body-scroll,
html.fgs-polish:not(.fgs-platform) .modal-rq-body,
html.fgs-polish:not(.fgs-platform) .preck-head,
html.fgs-polish:not(.fgs-platform) .preck-body,
html.fgs-polish:not(.fgs-platform) .rq-drawer-h,
html.fgs-polish:not(.fgs-platform) .rq-drawer-body,
html.fgs-polish:not(.fgs-platform) .rq-drawer-f {
  background-color: #d4d4d8 !important;
  background-image: none !important;
  color: #18181b !important;
}
html.fgs-polish:not(.fgs-platform) .modal label,
html.fgs-polish:not(.fgs-platform) .modal-rq label,
html.fgs-polish:not(.fgs-platform) .preck-modal label,
html.fgs-polish:not(.fgs-platform) .cat-modal label,
html.fgs-polish:not(.fgs-platform) .hex-modal label,
html.fgs-polish:not(.fgs-platform) .fgs-modal-panel label,
html.fgs-polish:not(.fgs-platform) .modal-h strong,
html.fgs-polish:not(.fgs-platform) .modal .modal-registar-sub,
html.fgs-polish:not(.fgs-platform) .modal .text-slate-100,
html.fgs-polish:not(.fgs-platform) .modal .text-slate-400,
html.fgs-polish:not(.fgs-platform) .modal .text-white:not(button):not(a):not(.btn) {
  color: #3f3f46 !important;
}
html.fgs-polish:not(.fgs-platform) .modal input:not([type='checkbox']):not([type='radio']):not([type='hidden']):not([type='file']):not([type='button']):not([type='submit']):not([type='range']):not([type='color']),
html.fgs-polish:not(.fgs-platform) .modal select,
html.fgs-polish:not(.fgs-platform) .modal textarea,
html.fgs-polish:not(.fgs-platform) .modal-rq input:not([type='checkbox']):not([type='radio']):not([type='hidden']):not([type='file']),
html.fgs-polish:not(.fgs-platform) .modal-rq select,
html.fgs-polish:not(.fgs-platform) .modal-rq textarea,
html.fgs-polish:not(.fgs-platform) .preck-modal input:not([type='checkbox']):not([type='radio']):not([type='hidden']):not([type='file']),
html.fgs-polish:not(.fgs-platform) .preck-modal select,
html.fgs-polish:not(.fgs-platform) .preck-modal textarea,
html.fgs-polish:not(.fgs-platform) .cat-modal input:not([type='checkbox']):not([type='radio']):not([type='hidden']):not([type='file']),
html.fgs-polish:not(.fgs-platform) .cat-modal select,
html.fgs-polish:not(.fgs-platform) .cat-modal textarea,
html.fgs-polish:not(.fgs-platform) .hex-modal input:not([type='checkbox']):not([type='radio']):not([type='hidden']):not([type='file']),
html.fgs-polish:not(.fgs-platform) .hex-modal select,
html.fgs-polish:not(.fgs-platform) .hex-modal textarea,
html.fgs-polish:not(.fgs-platform) .fgs-modal-panel input:not([type='checkbox']):not([type='radio']):not([type='hidden']):not([type='file']):not([type='button']):not([type='submit']),
html.fgs-polish:not(.fgs-platform) .fgs-modal-panel select,
html.fgs-polish:not(.fgs-platform) .fgs-modal-panel textarea {
  background-color: #fff !important;
  background-image: none !important;
  color: #18181b !important;
  border-color: #a1a1aa !important;
  caret-color: #18181b;
}
html.fgs-polish:not(.fgs-platform) .modal .btn:not(.primary):not(.btn--primary),
html.fgs-polish:not(.fgs-platform) .modal-rq .btn:not(.primary):not(.btn--primary),
html.fgs-polish:not(.fgs-platform) .cat-modal .btn:not(.primary),
html.fgs-polish:not(.fgs-platform) .modal-h .modal-x {
  background-color: #fff !important;
  color: #18181b !important;
  border-color: #a1a1aa !important;
}
html.fgs-polish:not(.fgs-platform) .fgs-modal-panel :is(.text-white, .text-slate-100, .text-slate-200, .text-slate-300, .text-slate-400, .text-slate-500, .text-blue-100, .text-blue-300):not(button):not(a) {
  color: #18181b !important;
}
html.fgs-polish:not(.fgs-platform) .fgs-modal-panel div[class*='bg-slate-'],
html.fgs-polish:not(.fgs-platform) .fgs-modal-panel div[class*='bg-blue-950'] {
  background-color: #fff !important;
  background-image: none !important;
}