/* ==========================================================================
   GASTROMAIS / SISTEMA DE GESTÃO GASTRONÔMICA & CRM
   Design System: Dark Dashboard (fundo degradê, cards arredondados, coral da marca)
   ========================================================================== */

:root {
  /* Fundo: quase preto liso (#0e0e0e) com brilho coral (cor da logo) subindo do canto
     inferior direito. Mesma intensidade medida no painel da Cakto: ~37% no canto,
     ~22% a 400px de altura, some perto do topo. Cards cinza neutro #1a1a1a. */
  --bg-darkest: #0e0e0e;
  --bg-gradient:
    radial-gradient(1300px 1050px at 100% 100%, rgba(var(--brand-rgb), 0.38) 0%, rgba(var(--brand-rgb), 0.22) 40%, rgba(var(--brand-rgb), 0.10) 68%, transparent 100%),
    #0e0e0e;
  --bg-primary: #0e0e0e;
  --bg-card: #1a1a1a;
  --bg-card-hover: #212121;
  --bg-surface: #222222;
  --bg-input: #141414;
  --bg-glass: rgba(26, 26, 26, 0.92);

  /* Acento principal verde (mesma família usada nos indicadores "Ativo") */
  --accent-gold: #d97706;
  --accent-amber: #f59e0b;
  --accent-glow: #ef4b3f;
  --accent-fire: #ef4b3f;
  --accent-green: #10b981;
  /* Cor da marca (logo GastroMais): coral. Verde fica só para status "ok/ativo". */
  --accent-brand: #ef4b3f;
  --accent-brand-bright: #ff6f61;
  --accent-brand-deep: #c9382d;
  --brand-rgb: 239, 75, 63;
  --accent-green-bright: #34d399;
  --accent-red: #f87171;
  --accent-cyan: #38bdf8;

  /* Texto claro sobre fundo escuro */
  --text-main: #f3f4f6;
  --text-body: #cfd0d4;
  --text-muted: #9a9ca3;
  --text-gold: #fbbf24;

  /* Bordas sutis (linhas claras translúcidas sobre o fundo escuro) */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-gold: rgba(255, 255, 255, 0.14);
  --border-gold-hover: var(--accent-brand);

  --font-serif: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Sombras de profundidade para cards escuros elevados */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-card: 0 10px 30px -8px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(255, 255, 255, 0.03) inset;
  --shadow-glow: 0 0 0 1px rgba(var(--brand-rgb), 0.12), 0 8px 24px rgba(var(--brand-rgb), 0.08);

  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   CANTOS ARREDONDADOS CONSISTENTES (cards, inputs, botões, modais, abas)
   Os componentes já definem seu próprio border-radius com var(--radius-*);
   este bloco só cobre o que não declara nada (ex.: divs utilitárias).
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.pulse-dot,
.status-indicator,
.status-indicator.live-pulse {
  border-radius: 50% !important;
}

body.admin-body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  line-height: 1.5;
  position: relative;
}

/* Degradê pintado num pseudo-elemento position:fixed, não no background do body:
   background-attachment:fixed não funciona no Safari/iOS e o degradê rolava junto
   com o conteúdo. Fixed real ao viewport (igual ao dashboard da Cakto): só os
   cards (.admin-shell) rolam por cima, o brilho no canto fica parado. */
body.admin-body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--bg-gradient);
  pointer-events: none;
}

/* ==========================================
   MODAL DE LOGIN SEGURO
   ========================================== */
.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.login-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-card);
  text-align: center;
}

.login-brand .brand-flame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  color: var(--text-main);
}

.login-brand h2 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--text-main);
  margin-bottom: 8px;
}

.login-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.pass-hint {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.pass-hint strong {
  color: var(--text-main);
}

.login-forgot-link {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.2s ease;
}

.login-forgot-link:hover {
  color: var(--text-main);
}

/* ==========================================
   ESTRUTURA GERAL (SHELL)
   ========================================== */
.admin-shell {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* ==========================================
   SIDEBAR (MENU LATERAL)
   ========================================== */
.admin-sidebar {
  width: 280px;
  background: var(--bg-primary);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  transition: transform var(--transition-normal);
}

.sidebar-header {
  padding: 20px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.brand-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.brand-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.store-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.store-badge {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.sidebar-nav {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-body);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast);
}

.nav-item:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}

.nav-item.active {
  background: rgba(var(--brand-rgb), 0.14);
  border-color: rgba(var(--brand-rgb), 0.3);
  color: var(--accent-brand-bright);
  font-weight: 600;
}

.nav-item.active .nav-icon {
  color: var(--accent-brand-bright);
}

.nav-item.active .nav-pill {
  background: rgba(var(--brand-rgb), 0.2);
  color: var(--accent-brand-bright);
  border-color: transparent;
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: inherit;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.nav-label {
  flex: 1;
}

.nav-pill {
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.nav-pill.pill-alert {
  background: rgba(248, 113, 113, 0.16);
  border-color: rgba(248, 113, 113, 0.35);
  color: #fca5a5;
}

.sidebar-footer {
  padding: 16px 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.store-status-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.status-indicator.closed {
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.status-meta {
  display: flex;
  flex-direction: column;
}

.status-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.status-val {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
}

.btn-store-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-body);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.btn-store-link:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: rgba(var(--brand-rgb), 0.35);
}

.btn-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.btn-logout:hover {
  color: var(--accent-red);
}

.sidebar-legal-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-subtle);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.sidebar-legal-links .legal-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 6px;
}

.sidebar-legal-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.sidebar-legal-links a:hover {
  color: var(--accent-gold, #f59e0b);
  text-decoration: underline;
}

.sidebar-legal-links .legal-sep {
  opacity: 0.5;
  font-size: 0.65rem;
}

/* ==========================================
   CONTEÚDO PRINCIPAL (MAIN)
   ========================================== */
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  /* transparente: o degradê do body aparece atrás do conteúdo */
  background: transparent;
}

.admin-topbar {
  padding: 20px 32px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
}

.view-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--text-main);
}

.view-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.live-clock {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-body);
  background: var(--bg-surface);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.btn-quick-order {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--accent-brand) 0%, var(--accent-brand-deep) 100%);
  color: #fff;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(var(--brand-rgb), 0.28);
  transition: all var(--transition-fast);
}

.btn-quick-order:hover {
  background: linear-gradient(135deg, var(--accent-brand-bright) 0%, var(--accent-brand) 100%);
  border-color: transparent;
  color: #fff;
}

/* ==========================================
   PANES DAS ABAS
   ========================================== */
.tab-pane {
  display: none;
  padding: 28px 32px;
  animation: fadeIn 0.25s ease;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   CARDS E COMPONENTES GERAIS
   ========================================== */
.card-glass {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.box-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.icon-bubble {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-body);
  flex-shrink: 0;
}

.icon-bubble svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.icon-bubble.bubble-gold,
.icon-bubble.bubble-cyan,
.icon-bubble.bubble-green,
.icon-bubble.bubble-ifood {
  border-color: var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-body);
}

.box-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.box-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================
   ABA 1: SPLIT CRIADOR + PRÉVIA AO VIVO
   ========================================== */
.creator-split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  margin-bottom: 32px;
  align-items: start;
}

.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-body);
}

input[type="text"],
input[type="number"],
input[type="url"],
input[type="password"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-brand);
  box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.16);
}

textarea {
  resize: vertical;
}

.tiny-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.input-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Upload de logotipo: arquivo, arrastar e colar */
.logo-upload {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.logo-upload-preview {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background:
    repeating-conic-gradient(rgba(255, 255, 255, 0.1) 0% 25%, transparent 0% 50%) 50% / 14px 14px,
    var(--bg-input);
  overflow: hidden;
}

.logo-upload-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-upload-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.logo-upload-drop {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 12px 14px;
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  font-size: 0.82rem;
  color: var(--text-body);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.logo-upload-drop:hover,
.logo-upload-drop:focus-visible,
.logo-upload-drop.is-dragover {
  outline: none;
  border-color: var(--accent-glow);
  background: #ffffff;
}

.logo-upload-drop.is-busy {
  cursor: progress;
  opacity: 0.7;
}

.logo-upload-status {
  flex-basis: 100%;
  min-height: 1em;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.logo-upload-status.is-error {
  color: var(--accent-red);
}

.logo-upload-status.is-ok {
  color: var(--accent-green);
}

@media (max-width: 560px) {
  .logo-upload {
    flex-direction: column;
  }
}

/* ==========================================
   CRIAR CATEGORIA & SELETOR DE CATEGORIAS
   ========================================== */
.create-category-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.create-category-row input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.create-category-row input:focus {
  outline: none;
  border-color: var(--accent-brand);
  box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.16);
}

.btn-create-category {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  background: #18181b;
  color: #ffffff;
  border: 1px solid #18181b;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.btn-create-category:hover {
  background: #27272a;
  border-color: #27272a;
  transform: translateY(-1px);
}

/* Galeria Preset de Fotos */
.image-selector-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.radio-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--text-body);
}

.radio-pill:has(input:checked) {
  border-color: #18181b;
  background: #18181b;
  color: #ffffff;
}

.preset-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.preset-thumb {
  height: 56px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.preset-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preset-thumb:hover {
  transform: scale(1.03);
}

.preset-thumb.active {
  border-color: var(--accent-brand);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Upload Dropzone & Actions */
.upload-box-wrap {
  margin-bottom: 8px;
}

.upload-dropzone {
  border: 2px dashed var(--border-subtle);
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  transition: all var(--transition-fast);
}

.upload-dropzone.dragover {
  border-color: var(--accent-brand);
  background: var(--bg-card-hover);
  transform: scale(1.01);
}

.dropzone-icon {
  font-size: 2rem;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.dropzone-main-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.dropzone-sub-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.4;
}

.dropzone-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-upload-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-upload-action.btn-camera {
  background: linear-gradient(135deg, var(--accent-brand) 0%, var(--accent-brand-deep) 100%);
  color: #ffffff;
  border: 1px solid transparent;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-upload-action.btn-camera:hover {
  background: linear-gradient(135deg, var(--accent-brand-bright) 0%, var(--accent-brand) 100%);
  border-color: transparent;
  transform: translateY(-1px);
}

.btn-upload-action.btn-gallery {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.btn-upload-action.btn-gallery:hover {
  background: var(--bg-card-hover);
  border-color: rgba(var(--brand-rgb), 0.4);
  transform: translateY(-1px);
}

/* Uploaded Preview Card */
.uploaded-img-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  text-align: left;
}

.uploaded-img-card img {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border-subtle);
}

.uploaded-img-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.uploaded-img-info strong {
  font-size: 0.88rem;
  color: var(--text-main);
  word-break: break-all;
}

.uploaded-img-info span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.badge-ready {
  color: var(--accent-green) !important;
  font-weight: 700;
  font-size: 0.75rem !important;
}

.btn-remove-upload {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all var(--transition-fast);
}

.btn-remove-upload:hover {
  background: #fee2e2;
  color: #b91c1c;
}

/* URL Input & Instagram Feedback */
.url-input-box {
  display: flex;
  gap: 8px;
}

.url-input-box input {
  flex: 1;
}

.btn-paste-url {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.btn-paste-url:hover {
  background: #18181b;
  color: #ffffff;
  border-color: #18181b;
}

.url-feedback-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-top: 8px;
  animation: fadeIn 0.3s ease;
}

.pulse-dot-green {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  display: inline-block;
  flex-shrink: 0;
}

/* Toggle Switch Control */
.toggle-control {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.toggle-control input {
  display: none;
}

.toggle-slider {
  width: 44px;
  height: 24px;
  background: #e4e4e7;
  border-radius: var(--radius-full);
  position: relative;
  transition: background var(--transition-fast);
}

.toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: transform var(--transition-fast);
}

.toggle-control input:checked + .toggle-slider {
  background: #10b981;
}

.toggle-control input:checked + .toggle-slider::after {
  transform: translateX(20px);
}

.toggle-text {
  font-size: 0.9rem;
  color: var(--text-main);
}

/* Botões */
.btn-primary-glow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--accent-brand) 0%, var(--accent-brand-deep) 100%);
  color: #ffffff;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(var(--brand-rgb), 0.28);
  transition: all var(--transition-fast);
}

.btn-primary-glow:hover {
  background: linear-gradient(135deg, var(--accent-brand-bright) 0%, var(--accent-brand) 100%);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(var(--brand-rgb), 0.38);
}

.btn-primary-glow:active {
  transform: translateY(0);
}

.btn-ghost {
  padding: 9px 16px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-body);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-ghost:hover {
  border-color: rgba(var(--brand-rgb), 0.35);
  background: var(--bg-card-hover);
  color: var(--text-main);
}

.btn-secondary {
  padding: 9px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger-outline {
  padding: 8px 16px;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fca5a5;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-danger-outline:hover {
  background: rgba(248, 113, 113, 0.2);
  color: #fecaca;
}

.btn-full {
  width: 100%;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

/* ==========================================
   PRÉVIA DO CARD AO VIVO (RIGHT COLUMN)
   ========================================== */
.preview-box {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 24px;
}

.preview-stage {
  background: var(--bg-surface);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.preview-badge-status {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #34d399;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.preview-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 14px;
}

/* Prévia do card do cardápio: usa as cores do painel (dark), não mais o fundo
   branco do site público — texto (var(--text-main)) ficava invisível em
   branco sobre branco. */
.preview-menu-card {
  width: 100%;
  max-width: 340px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.menu-card-img-box {
  width: 100%;
  height: 180px;
  position: relative;
  overflow: hidden;
}

.menu-card-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.menu-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: #18181b;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.menu-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-card-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--text-main);
}

.menu-card-desc {
  font-size: 0.82rem;
  color: var(--text-body);
  line-height: 1.4;
  min-height: 48px;
}

.item-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}

.item-specs span {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  color: var(--text-body);
  border: 1px solid var(--border-subtle);
}

.menu-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
  margin-top: 4px;
}

.price-wrap {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.price-wrap .currency {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.price-wrap .price-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
}

.btn-order-direct {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #18181b;
  border: 1px solid #18181b;
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

/* ==========================================
   SEÇÃO INVENTÁRIO (LANCHES ATIVOS)
   ========================================== */
.menu-inventory-section {
  margin-top: 16px;
}

.inventory-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.inventory-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.inventory-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.inventory-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.inv-filter-btn {
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-body);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.inv-filter-btn:hover {
  border-color: var(--border-gold);
  background: var(--bg-card-hover);
  color: var(--text-main);
}

.inv-filter-btn.active {
  background: var(--accent-brand);
  border-color: var(--accent-brand);
  color: #fff;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}

.inv-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast);
}

.inv-card:hover {
  border-color: #d4d4d8;
}

.inv-card.is-paused {
  opacity: 0.6;
  border-style: dashed;
}

.inv-card-top {
  display: flex;
  gap: 12px;
}

.inv-thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-subtle);
}

.inv-info {
  flex: 1;
  min-width: 0;
}

.inv-title {
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inv-category {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
}

.inv-badge-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-bottom: 3px;
}

.inv-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 4px;
}

.inv-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}

.btn-card-action {
  padding: 6px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-body);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-card-action:hover {
  color: var(--text-main);
  border-color: var(--accent-gold);
}

.btn-card-action.btn-del:hover {
  color: var(--accent-red);
  border-color: var(--accent-red);
}

/* ==========================================
   ABA 2: PEDIDOS & CLIENTES
   ========================================== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  flex-shrink: 0;
}

.stat-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

/* Cards compactos de métricas (Fidelização / Automação) */
.stats-row-compact {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.stats-row-compact .stat-card {
  padding: 10px 14px;
  gap: 12px;
  min-height: auto;
  border-radius: 10px;
}

.stats-row-compact .stat-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stats-row-compact .stat-icon svg {
  width: 17px;
  height: 17px;
}

.stats-row-compact .stat-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.stats-row-compact .stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-row-compact .stat-val {
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.25;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
}

.kpi-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.total-bar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(229, 142, 38, 0.15);
  color: var(--accent-gold);
}

.total-bar-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
}

.stat-meta {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.stat-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
}

.text-gold { color: var(--accent-gold); }
.text-amber { color: var(--accent-amber); }
.text-cyan { color: var(--accent-cyan); }
.text-green { color: var(--accent-green); }

.orders-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.order-status-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.status-tab-btn {
  padding: 7px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-body);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.status-tab-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: var(--border-gold);
}

.status-tab-btn.active {
  background: var(--accent-brand);
  color: #fff;
  border-color: var(--accent-brand);
  font-weight: 600;
}

.orders-search input {
  max-width: 280px;
}

.orders-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}

.order-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast);
}

.order-card.status-novo { border-left: 4px solid #18181b; }
.order-card.status-preparando { border-left: 4px solid var(--accent-amber); }
.order-card.status-entrega { border-left: 4px solid var(--accent-cyan); }
.order-card.status-concluido { border-left: 4px solid var(--accent-green); }

.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.order-id {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text-main);
}

.order-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Botão Super Discreto para Desenvolvedor Apagar Pedido */
.btn-dev-delete-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm, 4px);
  color: var(--text-muted, #71717a);
  opacity: 0.2;
  cursor: pointer;
  transition: opacity 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.btn-dev-delete-order svg {
  pointer-events: none;
}

.btn-dev-delete-order:hover {
  opacity: 1;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.25);
  transform: scale(1.08);
}

.btn-dev-delete-order:active {
  transform: scale(0.95);
}

.order-customer {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.order-cust-name {
  font-size: 1rem;
  font-weight: 700;
}

.order-cust-wa {
  font-size: 0.85rem;
  color: #047857;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

.order-cust-wa:hover {
  text-decoration: underline;
}

.order-items-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.order-item-line {
  display: flex;
  justify-content: space-between;
}

.order-obs {
  font-size: 0.75rem;
  color: var(--accent-amber);
  font-style: italic;
}

.order-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}

.order-total-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
}

.order-status-select {
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  cursor: pointer;
}

/* ==========================================
   ABA 3: RELATÓRIOS FINANCEIROS ($)
   ========================================== */
.financial-kpis {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 1400px) {
  .financial-kpis {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
}

@media (max-width: 820px) {
  .financial-kpis {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  min-width: 0;
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--brand-rgb), 0.3);
  box-shadow: var(--shadow-card);
}

.kpi-card.gold-border {
  border-color: rgba(245, 158, 11, 0.35);
  background: var(--bg-card);
}

.kpi-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
  gap: 6px;
}

.kpi-head span:first-child {
  white-space: normal;
  line-height: 1.25;
}

.kpi-badge {
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  font-weight: 700;
  flex-shrink: 0;
}

.kpi-card .kpi-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--bg-surface);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kpi-card .kpi-icon svg {
  width: 13px;
  height: 13px;
}

.kpi-amount {
  font-size: 1.32rem;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.kpi-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.25;
  white-space: normal;
}

.reports-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.top-ranking-list, .bairros-ranking-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rank-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--text-main);
}

.rank-info {
  flex: 1;
}

.rank-name-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.rank-bar-bg {
  width: 100%;
  height: 6px;
  background: var(--bg-surface);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.rank-bar-fill {
  height: 100%;
  background: #18181b;
  border-radius: var(--radius-full);
}

/* ==========================================
   FATURAMENTO MENSAL DETALHADO POR DIAS
   ========================================== */
.daily-revenue-card {
  margin-top: 24px;
}

.daily-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.daily-revenue-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.control-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

.control-item label {
  white-space: nowrap;
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  margin: 0 !important;
  cursor: pointer;
}

.rep-select {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: all var(--transition-fast);
}

.rep-select:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 2px rgba(229, 142, 38, 0.2);
}

/* KPI Grid do Mês Selecionado */
.month-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.month-kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform var(--transition-fast);
}

.month-kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(229, 142, 38, 0.3);
}

.m-kpi-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.m-kpi-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.m-kpi-sub {
  font-size: 0.72rem;
  color: var(--text-body);
}

.text-gold {
  color: var(--accent-gold) !important;
}

.text-green {
  color: #2ecc71 !important;
}

/* Tabela / Lista Diária (Histórico de Faturamento) */
.daily-revenue-list-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.daily-revenue-list-header {
  display: grid;
  grid-template-columns: 210px 1fr 130px;
  padding: 12px 18px;
  background: var(--bg-surface);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-subtle);
}

.col-head-amount {
  text-align: right;
}

.daily-revenue-list {
  max-height: 480px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
}

.daily-revenue-list::-webkit-scrollbar {
  width: 6px;
}

.daily-revenue-list::-webkit-scrollbar-track {
  background: var(--bg-surface);
}

.daily-revenue-list::-webkit-scrollbar-thumb {
  background: #d4d4d8;
  border-radius: 4px;
}

.daily-revenue-list::-webkit-scrollbar-thumb:hover {
  background: #a1a1aa;
}

.daily-row {
  display: grid;
  grid-template-columns: 210px 1fr 130px;
  align-items: center;
  padding: 12px 18px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-fast);
}

.daily-row:last-child {
  border-bottom: none;
}

.daily-row:hover {
  background: var(--bg-card-hover);
}

.daily-row.has-no-sales {
  opacity: 0.55;
  background: var(--bg-surface);
}

.daily-col-day {
  display: flex;
  align-items: center;
  gap: 12px;
}

.daily-day-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.daily-badge {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 4px 9px;
  border-radius: 6px;
  font-family: var(--font-sans);
  border: 1px solid rgba(245, 158, 11, 0.3);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.daily-weekday {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.2;
}

.daily-orders-meta {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.daily-col-bar {
  padding: 0 16px;
}

.daily-bar-track {
  width: 100%;
  height: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.daily-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #b45309);
  border-radius: var(--radius-full);
  transition: width 0.5s ease-out;
}

.daily-col-amount {
  font-size: 0.98rem;
  font-weight: 800;
  text-align: right;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.daily-col-amount.highlight {
  color: #fbbf24;
  font-weight: 800;
}

.daily-col-amount.zero {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.85rem;
}

/* Estado Vazio do Histórico Diário */
.daily-revenue-empty-state {
  padding: 3.5rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--bg-card);
}

.daily-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  color: var(--text-muted);
}

.daily-revenue-empty-state strong {
  color: var(--text-main);
  font-weight: 700;
}

/* Rodapé em Destaque com Soma Total */
.daily-revenue-total-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1.5px solid rgba(245, 158, 11, 0.35);
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.daily-revenue-total-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-gold);
}

.total-bar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 240px;
}

.total-bar-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(245, 158, 11, 0.3);
  flex-shrink: 0;
}

.total-bar-icon-wrap svg {
  width: 22px;
  height: 22px;
  stroke: #b45309;
}

.total-bar-title {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #fbbf24;
  text-transform: uppercase;
}

.total-bar-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.total-bar-right {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-left: auto;
}

.total-bar-currency {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fbbf24;
}

.total-bar-value {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

/* Responsividade Mobile */
@media (max-width: 768px) {
  .month-kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  
  .daily-card-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .daily-revenue-controls {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  
  .control-item {
    justify-content: space-between;
  }
  
  .control-item select {
    flex: 1;
    max-width: 220px;
  }
  
  .daily-revenue-list-header {
    display: none;
  }
  
  .daily-row {
    grid-template-columns: 1fr auto;
    row-gap: 8px;
    padding: 12px 14px;
  }
  
  .daily-col-bar {
    grid-column: 1 / -1;
    padding: 4px 0 0 0;
  }
  
  .daily-revenue-total-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
  }
  
  .total-bar-right {
    width: 100%;
    justify-content: flex-end;
  }
  
  .total-bar-value {
    font-size: 1.85rem;
  }
}

/* ==========================================
   ABA 4: CONFIGURAÇÕES DA LOJA (WHITE-LABEL)
   ========================================== */
.config-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}

.config-card.full-width {
  grid-column: 1 / -1;
}

.bairros-table-wrap {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.bairros-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.bairros-table th {
  background: var(--bg-surface);
  padding: 10px 14px;
  color: var(--text-muted);
  position: sticky;
  top: 0;
}

.bairros-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.add-bairro-form {
  display: flex;
  gap: 10px;
}

.security-tools-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.security-box {
  background: var(--bg-surface);
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.security-box h4 {
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.form-inline {
  display: flex;
  gap: 10px;
}

.btn-actions-wrap {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.file-upload-btn {
  display: inline-block;
  cursor: pointer;
}

/* Toast */
.admin-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--accent-gold);
  box-shadow: var(--shadow-glow);
  padding: 12px 20px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all var(--transition-normal);
  z-index: 10000;
}

.admin-toast.active {
  opacity: 1;
  transform: translateY(0);
}

.admin-toast.toast-error {
  border-color: #ef4444;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
  background: #1f1315;
  color: #fca5a5;
}

.quick-addon-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.78rem;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
}
.quick-addon-chip input[type="checkbox"] {
  cursor: pointer;
}
.quick-selected-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.82rem;
}
.quick-selected-item-row:last-child {
  border-bottom: none;
}
.btn-remove-quick-item {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 3px;
}
.btn-remove-quick-item:hover {
  background: rgba(239, 68, 68, 0.15);
}

/* Barra de Navegação Inferior Mobile - Oculta no Desktop */
.admin-mobile-bottom-nav {
  display: none !important;
}

/* ==========================================
   RESPONSIVIDADE (MOBILE & TABLET)
   ========================================== */
@media (max-width: 1080px) {
  .creator-split-grid {
    grid-template-columns: 1fr;
  }
  .config-grid {
    grid-template-columns: 1fr;
  }
  .reports-split {
    grid-template-columns: 1fr;
  }
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* Previne zoom acidental em inputs no iOS e rolagem horizontal */
  input, select, textarea {
    font-size: 16px !important;
  }

  .admin-layout {
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
  }

  .admin-main {
    width: 100%;
    min-width: 0;
    padding-bottom: calc(75px + env(safe-area-inset-bottom, 12px));
  }

  /* Barra Superior Fixa (Sticky Topbar) */
  .admin-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 10px 14px;
    background: rgba(14, 14, 20, 0.96);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    flex-shrink: 0;
  }

  .topbar-title-wrap {
    flex: 1;
    min-width: 0;
  }

  .view-title {
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
  }

  .view-subtitle {
    display: none;
  }

  .topbar-actions {
    gap: 8px;
    flex-shrink: 0;
  }

  .live-clock {
    display: none;
  }

  .btn-quick-order {
    padding: 7px 12px;
    font-size: 0.78rem;
    white-space: nowrap;
    border-radius: var(--radius-sm);
  }

  /* Sidebar Gaveta Flutuante (Off-canvas Drawer) */
  .admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 290px;
    max-width: 85vw;
    z-index: 1100;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.6);
    background: var(--bg-primary);
    border-right: 1px solid var(--border-subtle);
    overflow-y: auto;
  }

  .admin-sidebar.open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1050;
    backdrop-filter: blur(4px);
  }

  .sidebar-backdrop.active {
    display: block;
  }

  /* Abas e Cartões Gerais */
  .tab-pane {
    padding: 14px 12px;
  }

  .card-glass {
    padding: 16px 12px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
  }

  .box-header {
    margin-bottom: 14px;
    gap: 10px;
  }

  .icon-bubble {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    flex-shrink: 0;
  }

  .box-header h3 {
    font-size: 1.05rem;
  }

  .box-header p {
    font-size: 0.78rem;
    line-height: 1.35;
  }

  /* Formulário de Criação de Lanches */
  .form-row {
    flex-direction: column;
    gap: 12px;
  }

  .form-group {
    margin-bottom: 12px;
  }

  .form-group label {
    font-size: 0.8rem;
    margin-bottom: 5px;
  }

  /* Abas do Seletor de Foto */
  .image-selector-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .image-selector-tabs::-webkit-scrollbar {
    display: none;
  }

  .radio-pill {
    padding: 7px 10px;
    font-size: 0.75rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Área de Upload (Câmera & Galeria) */
  .upload-dropzone {
    padding: 14px 10px;
  }

  .dropzone-icon {
    font-size: 1.8rem;
    margin-bottom: 4px;
  }

  .dropzone-main-text {
    font-size: 0.88rem;
  }

  .dropzone-sub-text {
    font-size: 0.74rem;
    margin-bottom: 10px;
  }

  .dropzone-actions {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .btn-upload-action {
    width: 100%;
    justify-content: center;
    padding: 10px 14px;
    font-size: 0.82rem;
  }

  /* Galeria Preset */
  .preset-gallery-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }

  .preset-thumb {
    height: 52px;
  }

  /* Input de URL */
  .url-input-box {
    flex-direction: column;
    gap: 8px;
  }

  .btn-paste-url {
    width: 100%;
    height: 38px;
    justify-content: center;
    padding: 0;
  }

  .url-feedback-badge {
    font-size: 0.75rem;
    padding: 6px 10px;
  }

  /* Ações do Formulário */
  .form-actions {
    flex-direction: column;
    gap: 8px;
  }

  .btn-primary-glow {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 0.92rem;
  }

  .btn-ghost {
    width: 100%;
    justify-content: center;
    padding: 10px;
  }

  /* Prévia do Card ao Vivo */
  .creator-split-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .preview-stage {
    padding: 12px 10px;
  }

  .preview-menu-card {
    max-width: 100%;
  }

  .preview-badge-status {
    top: 8px;
    right: 8px;
    font-size: 0.72rem;
    padding: 3px 8px;
  }

  /* Seção de Inventário (Lanches Ativos) */
  .menu-inventory-section {
    margin-top: 10px;
  }

  .inventory-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .inventory-filters {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
    width: 100%;
    padding-bottom: 4px;
  }
  .inventory-filters::-webkit-scrollbar {
    display: none;
  }

  .inv-filter-btn {
    white-space: nowrap;
    font-size: 0.78rem;
    padding: 6px 12px;
    flex-shrink: 0;
  }

  .inventory-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .inv-card {
    padding: 12px;
    gap: 10px;
  }

  .inv-thumb {
    width: 60px;
    height: 60px;
  }

  .inv-title {
    font-size: 0.95rem;
  }

  .inv-price {
    font-size: 1.05rem;
  }

  .inv-card-actions {
    flex-wrap: wrap;
    gap: 8px;
  }

  .btn-card-action {
    padding: 6px 10px;
    font-size: 0.78rem;
  }

  /* Aba 2: Pedidos e Clientes */
  .stats-row,
  .stats-row-compact {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
  }

  .stat-card {
    padding: 14px 10px;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .stat-label {
    font-size: 0.72rem;
  }

  .orders-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 16px;
  }

  .order-status-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
    width: 100%;
    padding-bottom: 4px;
  }
  .order-status-tabs::-webkit-scrollbar {
    display: none;
  }

  .status-tab-btn {
    white-space: nowrap;
    font-size: 0.78rem;
    padding: 6px 12px;
    flex-shrink: 0;
  }

  .orders-search input {
    max-width: 100%;
    width: 100%;
  }

  .orders-list-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .order-card {
    padding: 14px 12px;
    gap: 12px;
  }

  .order-cust-wa {
    background: rgba(37, 211, 102, 0.12);
    border: 1px solid rgba(37, 211, 102, 0.4);
    color: #2ecc71;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    width: fit-content;
    margin-top: 4px;
  }

  .order-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .order-status-select {
    width: 100%;
    padding: 9px 12px;
    font-size: 0.85rem;
  }

  /* Aba 3: Relatórios Financeiros ($) */
  .financial-kpis {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 20px;
  }

  .kpi-card {
    padding: 12px 14px;
  }

  .kpi-amount {
    font-size: 1.32rem;
  }

  .reports-split {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .rank-item {
    gap: 10px;
  }

  .rank-name-row {
    font-size: 0.85rem;
  }

  /* Aba 4: Configurações da Loja (White-label) */
  .config-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .bairros-table-wrap {
    max-height: 240px;
  }

  .bairros-table th, .bairros-table td {
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  .add-bairro-form {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .add-bairro-form input, .add-bairro-form button {
    width: 100%;
  }

  .security-tools-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .form-inline {
    flex-direction: column;
    gap: 8px;
  }

  .form-inline input, .form-inline button {
    width: 100%;
  }

  .btn-actions-wrap {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .btn-actions-wrap button, .file-upload-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  /* Toast Notification no Celular */
  .admin-toast {
    bottom: calc(75px + env(safe-area-inset-bottom, 10px));
    left: 12px;
    right: 12px;
    justify-content: center;
    font-size: 0.84rem;
    padding: 10px 14px;
  }

  /* Barra de Navegação Inferior para Celular (Mobile CRM App Bar) */
  .admin-mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(14, 14, 20, 0.96);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-gold);
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 8px));
    justify-content: space-around;
    align-items: center;
    z-index: 990;
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.7);
  }

  .bnav-btn {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 4px 2px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    position: relative;
    transition: all var(--transition-fast);
  }

  .bnav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    line-height: 1;
    transition: transform var(--transition-fast);
  }

  .bnav-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
  }

  .bnav-label {
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.15;
    text-align: center;
  }

  .bnav-btn.active {
    color: var(--accent-brand-bright);
  }

  .bnav-btn.active .bnav-icon {
    transform: scale(1.15);
    filter: drop-shadow(0 0 6px rgba(var(--brand-rgb), 0.5));
  }

  .bnav-badge {
    position: absolute;
    top: -2px;
    right: calc(50% - 18px);
    font-size: 0.65rem;
    font-weight: 800;
    min-width: 17px;
    height: 17px;
    border-radius: var(--radius-full);
    background: var(--accent-gold);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 1.5px solid #0e0e14;
  }

  .bnav-badge.pill-alert {
    background: var(--accent-red);
  }
}

@media (max-width: 480px) {
  .preset-gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .stats-row,
  .stats-row-compact {
    grid-template-columns: 1fr;
  }
}

/* ==========================================
   PROMOÇÕES & CUPONS DE DESCONTO NO CRM
   ========================================== */
.input-suffix-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-suffix-wrap input {
  padding-right: 68px !important;
}

.input-suffix {
  position: absolute;
  right: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-gold);
  pointer-events: none;
}

.label-badge-promo {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  background: rgba(229, 142, 38, 0.15);
  color: var(--accent-gold);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  margin-left: 4px;
}

.current-price-row {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.promo-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  color: #ffffff;
  background: var(--accent-red);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  margin-left: 6px;
  box-shadow: 0 0 10px rgba(231, 76, 60, 0.4);
}

.inv-promo-badge {
  display: inline-block;
  background: rgba(231, 76, 60, 0.16);
  color: #ff6b6b;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  margin-left: 6px;
  border: 1px solid rgba(231, 76, 60, 0.35);
}

.inv-old-price {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-right: 5px;
}

/* Tabela de Cupons */
.coupons-table-wrap {
  margin-bottom: 20px;
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
}

.coupons-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.coupons-table th,
.coupons-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.coupons-table th {
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.coupons-table tr:last-child td {
  border-bottom: none;
}

.coupon-code-badge {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: rgba(229, 142, 38, 0.15);
  color: var(--accent-gold);
  border: 1px dashed var(--accent-gold);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  display: inline-block;
}

.add-coupon-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: rgba(255, 255, 255, 0.02);
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.coupon-inputs-row {
  display: flex;
  gap: 14px;
}

.btn-add-coupon {
  align-self: flex-start;
  padding: 10px 22px;
}

@media (max-width: 600px) {
  .coupon-inputs-row {
    flex-direction: column;
  }
  .btn-add-coupon {
    width: 100%;
  }
}

/* ==========================================
   GESTÃO DE ASSINATURA, LICENÇA & SAAS
   ========================================== */

/* Widget na Sidebar */
.sidebar-subscription-card {
  background: rgba(229, 142, 38, 0.08);
  border: 1px solid rgba(229, 142, 38, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sub-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sub-badge {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent-gold);
  background: rgba(229, 142, 38, 0.15);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
}

.sub-status-dot {
  font-size: 0.72rem;
  font-weight: 700;
}

.sub-card-body {
  display: flex;
  flex-direction: column;
}

.sub-card-body .sub-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.sub-card-body .sub-date {
  font-size: 0.88rem;
  color: var(--text-main);
}

.btn-sub-quick-pay {
  background: linear-gradient(135deg, rgba(229, 142, 38, 0.25) 0%, rgba(211, 84, 0, 0.35) 100%);
  border: 1px solid var(--border-gold);
  color: #ffffff;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.btn-sub-quick-pay:hover {
  background: var(--accent-gold);
  color: #000;
}

/* Banner de Alerta no Topo */
.sub-expiry-banner {
  background: linear-gradient(135deg, rgba(241, 196, 15, 0.15) 0%, rgba(230, 126, 34, 0.2) 100%);
  border-bottom: 1px solid rgba(241, 196, 15, 0.4);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  animation: fadeInBanner 0.4s ease-out;
}

@keyframes fadeInBanner {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.sub-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sub-banner-icon {
  font-size: 1.5rem;
}

.sub-banner-text strong {
  display: block;
  font-size: 0.88rem;
  color: #f1c40f;
}

.sub-banner-text span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.btn-sub-banner-pay {
  background: #f1c40f;
  color: #111;
  font-weight: 800;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.btn-sub-banner-pay:hover {
  background: #fff;
}

/* Card do Cliente em Configurações */
.sub-client-box {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sub-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.sub-metric-item {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sub-metric-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.sub-metric-val {
  font-size: 1.25rem;
  color: var(--text-main);
  font-weight: 700;
}

.sub-metric-val.highlight-gold {
  color: var(--accent-gold);
}

.sub-metric-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.badge-status-pill {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.status-pill-active {
  background: rgba(46, 204, 113, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(46, 204, 113, 0.3);
}

.status-pill-warning {
  background: rgba(241, 196, 15, 0.15);
  color: #f1c40f;
  border: 1px solid rgba(241, 196, 15, 0.3);
}

.status-pill-overdue {
  background: rgba(231, 76, 60, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(231, 76, 60, 0.3);
}

.sub-client-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-pay-sub-client {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  font-size: 0.92rem;
}

.btn-dev-support {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 0.88rem;
  text-decoration: none;
}

/* Card do Desenvolvedor */
.dev-master-card {
  border: 1px dashed rgba(229, 142, 38, 0.4);
  background: rgba(229, 142, 38, 0.02);
}

.badge-dev-only {
  font-size: 0.68rem;
  background: rgba(231, 76, 60, 0.15);
  color: #ff6b6b;
  border: 1px solid rgba(231, 76, 60, 0.3);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  text-transform: uppercase;
}

.dev-sub-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dev-quick-actions-box {
  background: rgba(0, 0, 0, 0.2);
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.quick-pills-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.btn-dev-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-dev-pill:hover {
  background: var(--accent-gold);
  color: #000;
  border-color: var(--accent-gold);
}

.btn-dev-pill.pill-green {
  color: var(--accent-green);
  border-color: rgba(46, 204, 113, 0.4);
}

.btn-dev-pill.pill-red {
  color: var(--accent-red);
  border-color: rgba(231, 76, 60, 0.4);
}

.dev-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 8px;
}

.sub-sync-indicator {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Modal de Pagamento da Mensalidade */
.sub-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9995;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeInModal 0.25s ease-out;
}

@keyframes fadeInModal {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.sub-modal-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 100%;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.sub-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
}

.sub-modal-title-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sub-modal-icon {
  font-size: 1.8rem;
}

.sub-modal-title-box h3 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--text-main);
}

.sub-modal-title-box p {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: var(--accent-gold);
}

.btn-sub-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 4px;
}

.btn-sub-modal-close:hover {
  color: #fff;
}

.sub-modal-body {
  padding: 24px;
}

.sub-pay-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  gap: 6px;
}

.sub-pay-tab {
  flex: 1;
  padding: 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sub-pay-tab.active {
  background: var(--accent-gold);
  color: #000;
}

.card-pay-box, .pix-pay-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
}

.card-pay-icon-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 4px;
}

.card-brand-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #ddd;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.card-invoice-details {
  background: rgba(255, 255, 255, 0.03);
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 6px 0;
}

.card-invoice-details .detail-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
}

.card-invoice-details .detail-price {
  font-size: 1.15rem;
}

.btn-checkout-card {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  font-size: 0.95rem;
  text-decoration: none;
}

.secure-badge {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Pix Box */
.pix-qr-wrap {
  display: flex;
  justify-content: center;
  margin: 8px 0;
}

.pix-qr-placeholder {
  width: 140px;
  height: 140px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px dashed var(--accent-gold);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  text-align: center;
}

.pix-qr-icon {
  font-size: 2.2rem;
}

.pix-qr-placeholder span {
  font-size: 0.7rem;
  color: var(--accent-gold);
  font-weight: 700;
}

.pix-copy-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.pix-copy-box label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.pix-input-group {
  display: flex;
  gap: 8px;
}

.pix-input-group input {
  flex: 1;
  font-family: monospace;
  font-size: 0.82rem;
}

.pix-instructions {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  text-align: left;
  margin: 4px 0;
}

.btn-whatsapp-sub {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 211, 102, 0.15);
  color: #25d366;
  border: 1px solid rgba(37, 211, 102, 0.3);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  transition: all var(--transition-fast);
}

.btn-whatsapp-sub:hover {
  background: #25d366;
  color: #000;
}

/* Tela de Bloqueio Suave (Trava Anti-Calote) */
.subscription-block-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 8, 0.96);
  backdrop-filter: blur(16px);
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  animation: fadeInModal 0.3s ease-out;
}

.block-card {
  background: var(--bg-card);
  border: 1.5px solid var(--accent-red);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  padding: 36px 30px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.block-lock-icon {
  font-size: 3rem;
  line-height: 1;
  animation: pulseLock 2s infinite ease-in-out;
}

@keyframes pulseLock {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(231, 76, 60, 0.4)); }
  50% { transform: scale(1.1); filter: drop-shadow(0 0 20px rgba(231, 76, 60, 0.8)); }
}

.block-badge-alert {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent-red);
  background: rgba(231, 76, 60, 0.15);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.6px;
}

.block-card h2 {
  margin: 0;
  font-size: 1.4rem;
  color: #fff;
}

.block-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.block-guarantee-note {
  background: rgba(46, 204, 113, 0.1);
  border: 1px solid rgba(46, 204, 113, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 0.82rem;
  color: #d1fae5;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.block-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.btn-block-pay {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px;
  font-size: 0.95rem;
}

.btn-block-whatsapp {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px;
  font-size: 0.85rem;
  text-decoration: none;
}

.block-dev-unlock {
  margin-top: 10px;
  width: 100%;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}

.btn-dev-unlock-toggle {
  background: transparent;
  border: none;
  font-size: 0.72rem;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: underline;
}

.dev-unlock-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.dev-unlock-form input {
  flex: 1;
  font-size: 0.82rem;
}

@media (max-width: 600px) {
  .sub-metrics-grid {
    grid-template-columns: 1fr;
  }
  .sub-client-actions {
    flex-direction: column;
  }
  .sub-client-actions .btn-pay-sub-client,
  .sub-client-actions .btn-dev-support {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
  .quick-pills-row {
    flex-wrap: wrap;
  }
  .sub-modal-container {
    padding: 20px 16px;
    max-width: 95%;
  }
}

/* ==========================================================================
   CENTRAL DE DISPAROS & MULTI-CHANNEL HUB DOS EUA (SMS, EMAIL & WHATSAPP)
   ========================================================================== */
.whatsapp-connection-card {
  border: 1px solid var(--border-subtle) !important;
  background: #ffffff !important;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.whatsapp-connection-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: #18181b;
}

.whatsapp-connection-card.channel-whatsapp::before {
  background: #10b981;
}

.whatsapp-connection-card.channel-email::before {
  background: #0284c7;
}

.whatsapp-connection-card.channel-sms::before {
  background: #18181b;
}

/* Seletor de Canais dos EUA */
.us-channel-selector {
  display: flex;
  gap: 6px;
  background: var(--bg-surface);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.us-channel-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  border: none;
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.us-channel-btn:hover {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.04);
}

.us-channel-btn.active {
  background: #18181b;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.us-channel-btn.channel-email.active {
  background: #18181b;
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.us-channel-btn.channel-wa.active {
  background: #18181b;
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* Caixa de Conformidade TCPA (US Standard) */
.us-compliance-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.8rem;
  color: #1e40af;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.45;
  margin-top: 8px;
}

.sms-char-meter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 5px;
}

.sms-char-badge {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 2px 7px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.78rem;
  color: var(--text-main);
}

/* Channel Badges na Tabela de Histórico */
.badge-channel-sms {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.74rem;
  font-weight: 600;
}

.badge-channel-email {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.74rem;
  font-weight: 600;
}

.badge-channel-wa {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.74rem;
  font-weight: 600;
}

.pulse-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
  animation: pulse-glow 2s infinite ease-in-out;
}

.pulse-dot.green {
  background-color: #2ecc71;
  box-shadow: 0 0 10px rgba(46, 204, 113, 0.8);
}

.pulse-dot.yellow {
  background-color: #f1c40f;
  box-shadow: 0 0 10px rgba(241, 196, 15, 0.8);
}

.pulse-dot.red {
  background-color: #e74c3c;
  box-shadow: 0 0 10px rgba(231, 76, 60, 0.8);
}

@keyframes pulse-glow {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.badge-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.badge-status-pill.badge-connected {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.badge-status-pill.badge-waiting {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.badge-status-pill.badge-offline {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* ==========================================
   ATENDIMENTO DE MESAS & QR CODE GENERATOR
   ========================================== */
.table-qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 24px;
  margin-top: 10px;
}

.table-qr-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.table-qr-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--brand-rgb), 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.table-qr-card-header {
  margin-bottom: 14px;
}

.table-qr-store-name {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  display: block;
}

.table-qr-badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: 0.5px;
  margin: 6px 0 2px 0;
}

.table-qr-subtext {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: block;
}

.table-qr-code-box {
  /* Fica branco de propósito: leitor de QR Code precisa de contraste alto */
  background: #ffffff;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.table-qr-code-box img {
  width: 190px;
  height: 190px;
  display: block;
}

.table-qr-instructions {
  font-size: 0.82rem;
  color: var(--text-main);
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.35;
}

.table-qr-url-hint {
  font-size: 0.7rem;
  color: var(--text-muted, #a0988e);
  word-break: break-all;
  font-family: monospace;
  margin-bottom: 14px;
}

.table-qr-actions {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-top: auto;
}

.table-qr-btn-action {
  flex: 1;
  padding: 8px 10px;
  font-size: 0.76rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main, #f5f2eb);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-decoration: none;
}

.table-qr-btn-action:hover {
  background: rgba(124, 58, 237, 0.2);
  border-color: rgba(124, 58, 237, 0.4);
  color: #fff;
}

/* ==========================================
   ESTILOS DE IMPRESSÃO (A4 / PDF PARA TOTENS DE ACRÍLICO)
   ========================================== */
@media print {
  body, html {
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .login-overlay,
  .admin-sidebar,
  .sidebar-backdrop,
  .admin-topbar,
  .sub-expiry-banner,
  .admin-mobile-bottom-nav,
  .admin-toast,
  .table-qr-banner,
  .table-qr-toolbar,
  .table-qr-actions,
  #pane-cardapio,
  #pane-pedidos,
  #pane-fidelizacao,
  #pane-relatorios,
  #pane-configuracoes,
  .modal-overlay {
    display: none !important;
  }

  .admin-shell, .admin-main {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    display: block !important;
  }

  #pane-mesas {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .table-qr-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20mm !important;
    padding: 10mm !important;
  }

  .table-qr-card {
    background: #ffffff !important;
    color: #000000 !important;
    border: 2px dashed #999999 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 20px 16px !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    transform: none !important;
  }

  .table-qr-store-name {
    color: #333333 !important;
    font-size: 0.85rem !important;
  }

  .table-qr-badge {
    color: #000000 !important;
    font-size: 2.2rem !important;
    text-shadow: none !important;
  }

  .table-qr-subtext {
    color: #666666 !important;
  }

  .table-qr-code-box {
    background: #ffffff !important;
    box-shadow: none !important;
    border: 1px solid #cccccc !important;
    padding: 10px !important;
  }

  .table-qr-instructions {
    color: #000000 !important;
    font-weight: 700 !important;
  }

  .table-qr-url-hint {
    color: #666666 !important;
  }
}

/* ==========================================
   INTEGRAÇÃO OFICIAL IFOOD (GESTOR UNIFICADO)
   ========================================== */
.order-card.order-card-ifood {
  border-left: 4px solid #ea1d2c !important;
  background: linear-gradient(180deg, rgba(234, 29, 44, 0.05) 0%, var(--bg-card) 100%);
  box-shadow: 0 4px 14px rgba(234, 29, 44, 0.08);
}

.order-badge-ifood {
  background: rgba(234, 29, 44, 0.16) !important;
  color: #ea1d2c !important;
  border: 1px solid rgba(234, 29, 44, 0.45) !important;
  font-weight: 700 !important;
}

.status-tab-btn[data-status="ifood"].active {
  background: #ea1d2c !important;
  border-color: #ea1d2c !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(234, 29, 44, 0.4) !important;
}

#ifoodIntegrationCard {
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  position: relative;
  overflow: hidden;
}

#ifoodIntegrationCard.is-connected {
  border-color: rgba(37, 211, 102, 0.4);
}

#ifoodIntegrationCard.is-connected::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: #25d366;
}

.bubble-ifood {
  box-shadow: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-card);
  padding: 24px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
}

.btn-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.btn-modal-close:hover {
  color: var(--text-main);
}


/* ==========================================================================
   🇺🇸 GASTROMAIS US - ESTILOS ESPECÍFICOS PARA O MERCADO AMERICANO
   ========================================================================== */

/* Badges de Métodos de Pagamento US */
.pay-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.pay-badge-apple {
  background: #18181b;
  color: #ffffff;
  border: 1px solid #18181b;
}

.pay-badge-zelle {
  background: #faf5ff;
  color: #6b21a8;
  border: 1px solid #e9d5ff;
}

.pay-badge-cash {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.pay-badge-pickup {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

/* Destaque de Gorjetas (Tips) & Impostos */
.order-tip-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.74rem;
  font-weight: 700;
}

.order-breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  color: var(--text-muted);
  padding: 2px 0;
}

.order-breakdown-row strong {
  color: var(--text-body);
}

.order-breakdown-row.highlight-tip {
  color: #92400e;
  font-weight: 600;
}

/* Botão de Impressão de Comanda no Card */
.btn-print-order {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-body);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-print-order:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-gold);
  color: var(--text-main);
}

/* Modal de Comanda Térmica 80mm / 58mm */
.thermal-receipt-container {
  background: #ffffff;
  color: #000000;
  font-family: 'Courier New', Courier, monospace;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  padding: 18px 14px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  line-height: 1.35;
  font-size: 13px;
}

.thermal-receipt-header {
  text-align: center;
  border-bottom: 1px dashed #000;
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.thermal-receipt-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.thermal-receipt-header p {
  margin: 3px 0;
  font-size: 11px;
}

.thermal-receipt-section {
  border-bottom: 1px dashed #000;
  padding: 8px 0;
  font-size: 12px;
}

.thermal-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin: 3px 0;
}

.thermal-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 900;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 2px solid #000;
}

.thermal-footer {
  text-align: center;
  font-size: 11px;
  margin-top: 12px;
  font-weight: 700;
}

/* Regras de Impressão Direta */
@media print {
  body * {
    visibility: hidden;
  }
  #thermalPrintRoot, #thermalPrintRoot * {
    visibility: visible;
  }
  #thermalPrintRoot {
    position: absolute;
    left: 0;
    top: 0;
    width: 80mm;
    margin: 0;
    padding: 2mm;
    color: #000 !important;
    background: #fff !important;
  }
}

/* ==========================================================================
   🇺🇸 CENTRAL MULTICANAL DE RESGATE & FIDELIZAÇÃO (US STANDARDS)
   Layout Minimalista: Cards Verticais Compactos + QR Code Direto
   ========================================================================== */
.channel-hub-grid {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 1.25rem;
  align-items: stretch;
}

@media (max-width: 860px) {
  .channel-hub-grid {
    grid-template-columns: 1fr;
  }
}

/* Coluna Esquerda: Cards SMS, Email, WhatsApp (diminuídos e um em baixo do outro) */
.channel-stack-col {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  justify-content: center;
}

.channel-mini-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.95rem;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.channel-mini-card:hover {
  background: #f4f4f5;
  border-color: #d4d4d8;
}

.channel-mini-card.active {
  background: #f5f4f0;
  border-color: #18181b;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.channel-mini-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-body);
  flex-shrink: 0;
}

.channel-mini-info {
  flex: 1;
  min-width: 0;
}

.channel-mini-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-mini-status {
  font-size: 0.73rem;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-mini-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: #f4f4f5 !important;
  color: #52525b !important;
  border: 1px solid #e4e4e7 !important;
}

#waStatusBadgeContainer,
#waStatusBadge {
  display: none !important;
}

/* Coluna Direita: APENAS o QR Code para conectar com o robô */
.channel-qr-col {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  flex-wrap: wrap;
}

.channel-qr-box {
  background: #ffffff;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.channel-qr-box img {
  width: 150px;
  height: 150px;
  display: block;
}

.channel-qr-info {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 200px;
  flex: 1;
}

.channel-qr-info h4 {
  margin: 0;
  font-size: 1rem;
  color: var(--text-main);
  font-weight: 700;
}

.channel-qr-info p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.channel-qr-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.btn-subtle-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--text-body);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-subtle-link:hover {
  background: #f4f4f5;
  color: var(--text-main);
  border-color: #d4d4d8;
}

.btn-subtle-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--text-body);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-subtle-action:hover {
  background: #f4f4f5;
  color: var(--text-main);
  border-color: #d4d4d8;
}

.sms-char-meter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.sms-char-badge {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-family: monospace;
  color: var(--text-body);
}

.badge-channel-sms,
.badge-channel-email,
.badge-channel-wa {
  background: #f4f4f5;
  color: var(--text-body);
  border: 1px solid var(--border-subtle);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 600;
}

/* ==========================================================================
   SISTEMA DE KANBAN DE PEDIDOS (LIVE ORDER KANBAN BOARD)
   Colunas Separadas: Novo Pedido, Em Preparação, Saiu p/ Entrega, Entregue
   Cards Movíveis com Drag and Drop Fluido & Ações Rápidas
   ========================================================================== */

/* Toolbar de Canais e Ações */
.orders-kanban-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.kanban-channel-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.kanban-filter-btn {
  padding: 7px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-body);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.kanban-filter-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: var(--border-gold);
}

.kanban-filter-btn.active {
  background: var(--accent-brand);
  color: #ffffff;
  border-color: #18181b;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.kanban-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-quick-new-order {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: #18181b;
  color: #ffffff;
  border: 1px solid #18181b;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.btn-quick-new-order:hover {
  background: #27272a;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.btn-view-cancelled {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: #ffffff;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-view-cancelled:hover {
  background: #fef2f2;
  color: #ef4444;
  border-color: #fca5a5;
}

/* Dica de usabilidade */
.kanban-helper-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  background: var(--bg-surface);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.kanban-helper-tip strong {
  color: var(--text-main);
}

.kanban-tip-icon {
  font-size: 1rem;
}

/* Quadro Kanban (Grid de 4 Colunas Ultra-Compacto) */
.orders-kanban-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(260px, 1fr));
  gap: 10px;
  align-items: start;
  width: 100%;
  overflow-x: auto;
  padding-bottom: 16px;
  scrollbar-width: thin;
}

/* Coluna Individual */
.kanban-column {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  min-height: 460px;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

/* Efeito de Drag Over na Coluna */
.kanban-column.kanban-col-dragover {
  background: rgba(2, 132, 199, 0.06) !important;
  border: 2px dashed #0284c7 !important;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.14) !important;
  transform: scale(1.004);
}

/* Cabeçalho da Coluna */
.kanban-column-header {
  padding: 8px 10px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 2;
}

.kanban-col-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.kanban-col-icon {
  font-size: 0.95rem;
}

.kanban-col-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.kanban-col-pill {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

/* Cores das Colunas */
.col-status-novo .kanban-col-pill {
  background: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
  animation: pulsePill 2s infinite;
}
.col-status-preparando .kanban-col-pill {
  background: #f97316;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2);
}
.col-status-entrega .kanban-col-pill {
  background: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}
.col-status-concluido .kanban-col-pill {
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.kanban-col-metrics {
  display: flex;
  align-items: center;
  gap: 6px;
}

.kanban-col-count {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 5px;
  min-width: 18px;
  text-align: center;
}

.kanban-col-sum {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* Corpo da Coluna (Lista de Cards) */
.kanban-column-body {
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 400px;
  max-height: calc(100vh - 250px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.kanban-column-body::-webkit-scrollbar {
  width: 4px;
}
.kanban-column-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 4px;
}

/* Estado Vazio da Coluna */
.kanban-empty-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 10px;
  border: 1px dashed var(--border-gold);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  margin: auto 0;
}

.kanban-empty-icon {
  font-size: 1.25rem;
  margin-bottom: 4px;
  opacity: 0.6;
}

.kanban-empty-text {
  font-size: 0.78rem;
  font-weight: 600;
}

.kanban-empty-subtext {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 1px;
}

/* ==========================================================================
   CARD DO KANBAN ULTRA-COMPACTO (.kanban-card)
   ========================================================================== */
.kanban-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  box-shadow: var(--shadow-sm);
  cursor: grab;
  user-select: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  position: relative;
}

.kanban-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  border-color: rgba(var(--brand-rgb), 0.3);
}

.kanban-card:active {
  cursor: grabbing;
}

/* Durante o Arraste (Dragging) */
.kanban-card.is-dragging {
  opacity: 0.42 !important;
  transform: scale(0.97) rotate(1deg) !important;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15) !important;
  border: 1px dashed #0284c7 !important;
  cursor: grabbing !important;
}

/* Bordas de Status */
.kanban-card.status-novo {
  border-left: 3px solid #f59e0b;
}
.kanban-card.status-preparando {
  border-left: 3px solid #f97316;
}
.kanban-card.status-entrega {
  border-left: 3px solid #0284c7;
}
.kanban-card.status-concluido {
  border-left: 3px solid #10b981;
}

/* Header do Card */
.kcard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
}

.kcard-meta-left {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.kcard-drag-handle {
  color: #a1a1aa;
  font-size: 0.75rem;
  letter-spacing: -1px;
  cursor: grab;
  padding: 0 1px;
}

.kcard-id {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.kcard-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  line-height: 1.2;
}

.badge-mesa {
  background: rgba(124, 58, 237, 0.1);
  color: #7c3aed;
  border: 1px solid rgba(124, 58, 237, 0.2);
}

.badge-ifood {
  background: rgba(234, 29, 44, 0.1);
  color: #ea1d2c;
  border: 1px solid rgba(234, 29, 44, 0.25);
}

.badge-delivery {
  background: rgba(2, 132, 199, 0.1);
  color: #0284c7;
  border: 1px solid rgba(2, 132, 199, 0.2);
}

.badge-pickup {
  background: rgba(217, 119, 6, 0.1);
  color: #b45309;
  border: 1px solid rgba(217, 119, 6, 0.2);
}

.kcard-time {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* Alerta de espera prolongada */
.kcard-delayed-badge {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  animation: pulseDelayed 1.5s infinite;
}

.kcard-actions-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-card-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-card-mini:hover {
  background: #f4f4f5;
  color: var(--text-main);
  border-color: #d4d4d8;
}

/* Dados do Cliente */
.kcard-customer {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.kcard-cust-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.kcard-cust-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.kcard-wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #15803d;
  font-size: 0.68rem;
  font-weight: 700;
  text-decoration: none;
  background: rgba(22, 163, 74, 0.08);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid rgba(22, 163, 74, 0.2);
  transition: all 0.15s ease;
}

.kcard-wa-btn:hover {
  background: rgba(22, 163, 74, 0.16);
}

.kcard-address {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Caixa de Itens Compacta */
.kcard-items-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kcard-item-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.74rem;
  line-height: 1.2;
}

.kcard-item-qty {
  font-weight: 800;
  color: var(--text-main);
  margin-right: 4px;
  font-size: 0.74rem;
}

.kcard-item-name {
  flex: 1;
  color: var(--text-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.74rem;
}

.kcard-item-price {
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.72rem;
  margin-left: 6px;
}

.kcard-addons {
  font-size: 0.68rem;
  color: var(--accent-gold);
  padding-left: 8px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kcard-notes {
  font-size: 0.68rem;
  color: #b45309;
  background: rgba(245, 158, 11, 0.09);
  padding: 1px 4px;
  border-radius: 3px;
  margin-top: 1px;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kcard-mini-tip {
  font-size: 0.68rem;
  color: #047857;
  font-weight: 600;
  margin-top: 1px;
}

/* Rodapé do Card (Valor e Pagamento) */
.kcard-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 3px;
  border-top: 1px solid var(--border-subtle);
}

.kcard-total-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.kcard-footer .pay-badge {
  font-size: 0.66rem;
  padding: 1px 5px;
  gap: 3px;
}

/* Botões de Ação Rápida no Rodapé do Card */
.kcard-quick-actions {
  display: flex;
  gap: 4px;
  align-items: center;
}

.kcard-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  height: 25px;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  flex: 1;
}

.btn-advance-prep {
  background: #f97316;
  color: #ffffff;
}
.btn-advance-prep:hover {
  background: #ea580c;
}

.btn-advance-delivery {
  background: #0284c7;
  color: #ffffff;
}
.btn-advance-delivery:hover {
  background: #0369a1;
}

.btn-advance-done {
  background: #10b981;
  color: #ffffff;
}
.btn-advance-done:hover {
  background: #059669;
}

.btn-revert-step {
  background: #f4f4f5;
  color: var(--text-body);
  border: 1px solid var(--border-subtle);
  flex: 0 0 auto;
  padding: 2px 6px;
  min-width: 24px;
}
.btn-revert-step:hover {
  background: #e4e4e7;
  color: var(--text-main);
}

/* Aviso de Entrega WhatsApp Compacto */
.kcard-wa-delivery-alert {
  margin-top: 2px;
  padding: 3px 6px;
  background: rgba(37, 211, 102, 0.08);
  border: 1px solid rgba(37, 211, 102, 0.25);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.kcard-wa-delivery-text {
  font-size: 0.68rem;
  color: #16a34a;
  font-weight: 600;
}

.btn-recontact-wa-mini {
  background: rgba(37, 211, 102, 0.16);
  border: 1px solid rgba(37, 211, 102, 0.4);
  color: #15803d;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  cursor: pointer;
}

/* Responsividade Mobile e Telas Menores */
@media (max-width: 1200px) {
  .orders-kanban-board {
    grid-template-columns: repeat(4, 250px);
    overflow-x: auto;
  }
}

@media (max-width: 768px) {
  .orders-kanban-board {
    grid-template-columns: repeat(4, 240px);
  }
}

/* ===================================================
   ESTILOS EXCLUSIVOS DO PAINEL DO DESENVOLVEDOR (SUPER ADMIN)
   =================================================== */
.dev-access-banner {
  margin-top: 1.5rem;
  padding: 16px 20px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.pill-select {
  cursor: pointer;
  background: #f4f4f5;
  border: 1px solid #e4e4e7;
  color: #18181b;
  padding: 5px 11px;
  font-size: 0.76rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.pill-select:hover {
  background: #18181b;
  color: #ffffff;
  border-color: #18181b;
}

.sub-sync-indicator {
  font-size: 0.8rem;
  color: #15803d;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
/* ==========================================================================
   KDS (Kitchen Display System) - Cozinha
   ========================================================================== */
.kds-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.kds-header h2 {
  font-size: 1.4rem;
  margin: 0;
  color: var(--text-main);
  font-weight: 800;
}
.kds-legend {
  display: flex;
  gap: 10px;
}
.legend-badge {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #000;
}
.legend-new { background-color: #f1f5f9; color: #475569; }
.legend-prep { background-color: #fef3c7; color: #92400e; }
.legend-done { background-color: #dcfce7; color: #166534; }

.kds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  align-items: start;
}
.kds-ticket {
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.kds-ticket:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.kds-ticket.status-novo {
  border-top: 4px solid #94a3b8;
}
.kds-ticket.status-preparando {
  border-top: 4px solid #f59e0b;
}
.kds-ticket.status-concluido {
  border-top: 4px solid #10b981;
}
.kds-ticket-header {
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kds-ticket.status-novo .kds-ticket-header { background-color: #f8fafc; border-bottom: 1px solid #e2e8f0; }
.kds-ticket.status-preparando .kds-ticket-header { background-color: #ffffff; border-bottom: 1px solid #e2e8f0; }
.kds-ticket.status-concluido .kds-ticket-header { background-color: #dcfce7; border-bottom: 1px solid #bbf7d0; }

.kds-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}
.kds-badge {
  background: #0f172a;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.kds-status-text {
  font-size: 0.8rem;
  font-weight: 700;
  color: #92400e;
}
.kds-timer {
  font-size: 0.85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #92400e;
  background: rgba(255, 255, 255, 0.7);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(146, 64, 14, 0.2);
}
.kds-header-mid {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  margin-top: 2px;
}
.kds-header-bot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: #64748b;
  border-top: 1px solid rgba(0,0,0,0.06);
  padding-top: 4px;
  margin-top: 2px;
  font-weight: 600;
}

.kds-items {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #ffffff;
  flex: 1;
}
.kds-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 8px;
}
.kds-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.kds-item-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}
.kds-item-qty {
  min-width: 18px;
  font-weight: 800;
  color: #b45309;
}
.kds-item-name {
  color: #0f172a;
}
.kds-item-notes {
  margin-left: 26px;
  font-size: 0.8rem;
  color: #ea580c;
  font-weight: 600;
  line-height: 1.3;
}
.kds-actions {
  padding: 10px 12px;
  background: #f8fafc;
  display: flex;
  justify-content: stretch;
  border-top: 1px solid #e2e8f0;
}
.kds-btn-done {
  width: 100%;
  background: #10b981;
  color: #ffffff;
  border: none;
  padding: 10px 12px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}
.kds-btn-done:hover {
  background: #059669;
  transform: translateY(-1px);
}


/* ==========================================
   SAAS PRICING, TRIAL INDICATOR & UPGRADE MODAL
   ========================================== */
.trial-topbar-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.22));
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 9999px;
  padding: 4px 6px 4px 12px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
  transition: all var(--transition-fast);
}

.trial-pill-content {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #b45309;
}

.trial-pill-icon {
  font-size: 0.9rem;
  animation: pulseTrial 2s infinite ease-in-out;
}

@keyframes pulseTrial {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.85; }
}

.btn-trial-upgrade {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  padding: 5px 12px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.35);
  transition: all var(--transition-fast);
}

.btn-trial-upgrade:hover {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(217, 119, 6, 0.45);
}

/* ==========================================================================
   ABA ASSINATURA: resumo do plano + o que está incluído + ações
   ========================================================================== */
.subscription-pane {
  display: grid;
  grid-template-columns: 1.1fr 1px 1fr;
  gap: 28px;
}

.subscription-pane-divider {
  background: var(--border-subtle);
}

.subscription-pane-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.subscription-plan-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 4px 0;
}

.subscription-plan-tagline {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.45;
  max-width: 34ch;
}

.subscription-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-body);
  white-space: nowrap;
}

.subscription-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
}

.subscription-status--warning .subscription-status-dot {
  background: var(--accent-amber);
}

.subscription-status--urgent .subscription-status-dot,
.subscription-status--blocked .subscription-status-dot {
  background: var(--accent-red);
}

.subscription-price-row {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin: 18px 0 20px 0;
}

.subscription-price {
  font-size: 2.3rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
  letter-spacing: -0.01em;
}

.subscription-price-period {
  font-size: 0.92rem;
  color: var(--text-muted);
  font-weight: 500;
}

.subscription-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 0;
}

.subscription-meta-item dt {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.subscription-meta-item dd {
  font-size: 0.92rem;
  color: var(--text-main);
  font-weight: 600;
  margin: 0;
}

.subscription-pane-notice {
  margin-top: 16px;
  padding: 10px 14px;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #fca5a5;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  line-height: 1.4;
}

.subscription-features-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 14px;
}

.subscription-features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.subscription-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.86rem;
  color: var(--text-body);
  line-height: 1.4;
}

.subscription-feature-item svg {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  color: var(--accent-green);
  flex-shrink: 0;
}

.subscription-pane-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed var(--border-subtle);
}

.subscription-pane-actions .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
}

@media (max-width: 860px) {
  .subscription-pane {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .subscription-pane-divider {
    height: 1px;
    width: 100%;
  }

  .subscription-pane-actions .btn-primary-glow,
  .subscription-pane-actions .btn-secondary {
    width: 100%;
  }
}

/* ==========================================================================
   BANNERS PREVENTIVOS DE RENOVAÇÃO & COBRANÇA ZELLE (SAAS BILLING)
   ========================================================================== */
.sub-renewal-banner-container {
  width: 100%;
  margin-bottom: 20px;
}

.renewal-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-left: 4px solid var(--accent-amber);
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  flex-wrap: wrap;
}

.renewal-banner-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 280px;
}

.renewal-banner-icon {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
}

.renewal-banner-text h4 {
  font-size: 0.96rem;
  font-weight: 800;
  margin: 0 0 2px 0;
  color: var(--text-main);
}

.renewal-banner-text p {
  font-size: 0.84rem;
  color: var(--text-body);
  margin: 0;
  line-height: 1.4;
}

.renewal-banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* 1. Aviso Preventivo (5 a 1 dia antes) */
.renewal-banner.banner-warning {
  border-left-color: var(--accent-amber);
  background: rgba(245, 158, 11, 0.1);
}

.renewal-banner.banner-warning .renewal-banner-text h4 {
  color: #fbbf24;
}

/* 2. No Vencimento (Due Today) */
.renewal-banner.banner-due {
  border-left-color: #fb923c;
  background: rgba(251, 146, 60, 0.1);
}

.renewal-banner.banner-due .renewal-banner-text h4 {
  color: #fdba74;
}

/* 3. Carência (Grace Period) */
.renewal-banner.banner-grace {
  border-left-color: var(--accent-red);
  background: rgba(248, 113, 113, 0.1);
}

.renewal-banner.banner-grace .renewal-banner-text h4 {
  color: #fca5a5;
}

/* 4. Em Análise (Under Review) */
.renewal-banner.banner-review {
  border-left-color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.1);
}

.renewal-banner.banner-review .renewal-banner-text h4 {
  color: #7dd3fc;
}

/* Botões do Banner */
.btn-banner-action {
  padding: 8px 16px;
  font-size: 0.84rem;
  font-weight: 700;
  font-family: var(--font-sans);
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.btn-banner-action:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-banner-action.btn-banner-primary {
  background: linear-gradient(135deg, var(--accent-brand) 0%, var(--accent-brand-deep) 100%);
  color: #ffffff;
  border-color: transparent;
}

.btn-banner-action.btn-banner-primary:hover {
  background: linear-gradient(135deg, var(--accent-brand-bright) 0%, var(--accent-brand) 100%);
}

.btn-banner-dismiss {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.btn-banner-dismiss:hover {
  color: var(--text-main);
}

/* Tabela de Histórico de Faturas do Restaurante */
.merchant-invoices-wrap {
  margin-top: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 18px 20px;
}

.merchant-invoices-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  margin-top: 12px;
}

.merchant-invoices-table th {
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.merchant-invoices-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-body);
}

.merchant-invoices-table tr:last-child td {
  border-bottom: none;
}

/* Recibo Térmico / Modal de Recibo */
.receipt-sheet {
  max-width: 420px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  padding: 24px;
  font-family: var(--font-sans);
}

.receipt-stamp-paid {
  display: inline-block;
  padding: 4px 12px;
  border: 2px solid #10b981;
  color: #10b981;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.88rem;
  transform: rotate(-3deg);
}

@media print {
  body * {
    visibility: hidden;
  }
  #thermalPrintRoot,
  #thermalPrintRoot * {
    visibility: visible;
  }
  #thermalPrintRoot {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }
}

/* ==========================================================================
   WIDGET: LAUNCH CHECKLIST & FIRST-TIME STORE ONBOARDING (DARK THEME)
   ========================================================================== */
.btn-help-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 8px;
  transition: all var(--transition-fast);
}

.btn-help-trigger:hover {
  background: #ffffff;
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

/* ==========================================================================
   LAUNCH CHECKLIST — visual sóbrio: cartão claro, grafite e um único acento neutro
   ========================================================================== */
.launch-checklist-card {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin: 16px 24px 20px 24px;
  box-shadow: var(--shadow-card);
  transition: padding var(--transition-fast);
}

.checklist-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.checklist-badge {
  display: block;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.checklist-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  letter-spacing: -0.01em;
}

.checklist-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 6px 0 0 0;
  line-height: 1.5;
  max-width: 62ch;
}

.checklist-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-checklist-toggle,
.btn-checklist-dismiss {
  background: transparent;
  color: var(--text-body);
  border: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.btn-checklist-toggle:hover,
.btn-checklist-dismiss:hover {
  background: var(--bg-surface);
  border-color: rgba(var(--brand-rgb), 0.35);
}

.btn-checklist-toggle:focus-visible,
.btn-checklist-dismiss:focus-visible,
.btn-step-action:focus-visible,
.btn-checklist-live:focus-visible,
.btn-checklist-done:focus-visible,
.btn-checklist-help-link:focus-visible {
  outline: 2px solid var(--text-main);
  outline-offset: 2px;
}

.checklist-progress-wrap {
  margin-bottom: 22px;
}

.checklist-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.82rem;
  margin-bottom: 8px;
}

.checklist-progress-text {
  font-weight: 600;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}

.checklist-status-badge {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}

.checklist-status-badge.badge-ready {
  color: var(--text-main) !important;
  font-size: 0.78rem !important;
  font-weight: 600;
}

.checklist-progress-bar-bg {
  width: 100%;
  height: 4px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.checklist-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-brand) 0%, var(--accent-brand-bright) 100%);
  transition: width 0.4s ease;
}

/* Lista de passos */
.checklist-steps-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border-subtle);
}

.checklist-step-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--border-subtle);
}

.step-indicator {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-check-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-green);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.step-check-icon svg {
  width: 13px;
  height: 13px;
}

.step-number-icon {
  width: 24px;
  height: 24px;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.74rem;
  font-weight: 600;
}

.step-content {
  flex: 1;
  min-width: 0;
}

.step-header-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.step-item-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
}

.step-pill {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.step-pill.pill-completed {
  color: var(--text-muted);
}

.step-pill.pill-pending {
  color: var(--text-main);
}

.checklist-step-item.step-completed .step-item-title {
  color: var(--text-body);
}

.step-item-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 3px 0 0 0;
  line-height: 1.45;
}

.step-action-wrap {
  flex-shrink: 0;
}

.btn-step-action {
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.btn-step-setup {
  background: linear-gradient(135deg, var(--accent-brand) 0%, var(--accent-brand-deep) 100%);
  color: #ffffff;
  border: 1px solid transparent;
}

.btn-step-setup:hover {
  background: linear-gradient(135deg, var(--accent-brand-bright) 0%, var(--accent-brand) 100%);
}

.btn-step-manage {
  background: transparent;
  color: var(--text-body);
  border: 1px solid var(--border-subtle);
}

.btn-step-manage:hover {
  background: var(--bg-surface);
  border-color: rgba(var(--brand-rgb), 0.35);
}

/* Concluído (100%): painel neutro com o link da loja */
.checklist-success-banner {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.success-banner-content {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1 1 340px;
}

.success-banner-icon {
  display: none;
}

.success-banner-text {
  min-width: 0;
}

.success-banner-text h4 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
}

.success-banner-text p {
  margin: 4px 0 0 0;
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.success-banner-text .checklist-live-url {
  margin-top: 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-body);
}

.checklist-live-url code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  color: var(--accent-brand-bright);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  padding: 4px 8px;
  word-break: break-all;
  user-select: all;
}

.success-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.btn-checklist-live {
  background: linear-gradient(135deg, var(--accent-brand) 0%, var(--accent-brand-deep) 100%);
  color: #ffffff;
  border: 1px solid transparent;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background var(--transition-fast);
}

.btn-checklist-live:hover {
  background: linear-gradient(135deg, var(--accent-brand-bright) 0%, var(--accent-brand) 100%);
}

.btn-checklist-done {
  background: transparent;
  color: var(--text-body);
  border: 1px solid #d6d3d1;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.btn-checklist-done:hover {
  background: #ffffff;
}

.checklist-footer {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-checklist-help-link {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  padding: 0;
}

/* Colapsado */
.launch-checklist-card.collapsed .checklist-progress-wrap,
.launch-checklist-card.collapsed .checklist-steps-list,
.launch-checklist-card.collapsed .checklist-success-banner,
.launch-checklist-card.collapsed .checklist-footer {
  display: none !important;
}

.launch-checklist-card.collapsed {
  padding: 14px 24px;
}

.launch-checklist-card.collapsed .checklist-header {
  margin-bottom: 0;
}

/* ==========================================================================
   MODAL / DRAWER: CENTRAL DE AJUDA & FAQ RÁPIDO
   ========================================================================== */
.help-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.help-modal-card {
  background: var(--bg-card);
  color: var(--text-main);
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
}

.help-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.help-header-title-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.help-header-title-box h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0;
  color: var(--text-main);
}

.help-header-title-box p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 2px 0 0 0;
}

.btn-close-help {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
}

.btn-close-help:hover {
  color: var(--text-main);
}

.help-modal-body {
  padding: 20px 22px;
  overflow-y: auto;
  flex: 1;
}

.help-accordion {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.help-accordion-item {
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
}

.help-accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: none;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.help-accordion-trigger:hover {
  background: var(--bg-surface);
}

.help-accordion-item.active .help-accordion-trigger {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.help-item-title {
  flex: 1;
}

.help-chevron {
  font-size: 1rem;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.help-accordion-content {
  padding: 16px;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-body);
  background: #ffffff;
}

.help-accordion-content ol {
  padding-left: 20px;
  margin: 10px 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.help-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  flex-wrap: wrap;
  gap: 12px;
}

.help-footer-info {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.btn-support-whatsapp {
  background: #10b981;
  color: #ffffff;
  padding: 10px 18px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.btn-support-whatsapp:hover {
  background: #059669;
  transform: translateY(-1px);
}

/* Efeito de pulso nos campos focados */
.highlight-pulse {
  animation: pulseTarget 1.8s ease-in-out;
  outline: 2px solid #18181b !important;
  outline-offset: 2px;
}

@keyframes pulseTarget {
  0% { outline-color: #18181b; }
  50% { outline-color: #71717a; }
  100% { outline-color: transparent; }
}

@media (max-width: 768px) {
  .launch-checklist-card {
    margin: 12px 14px 16px 14px;
    padding: 18px 16px;
  }
  .checklist-step-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .step-action-wrap {
    width: 100%;
  }
  .btn-step-action {
    width: 100%;
    text-align: center;
  }
}

/* ==========================================
   ALERTA DE SOM BLOQUEADO (AUTOPLAY POLICY)
   ========================================== */
.sound-alert-banner {
  background: linear-gradient(90deg, #991b1b, #dc2626);
  color: #ffffff;
  padding: 10px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.sound-alert-content {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1200px;
  width: 100%;
  justify-content: center;
  flex-wrap: wrap;
}

.sound-alert-icon {
  flex-shrink: 0;
}

.sound-alert-text {
  letter-spacing: 0.01em;
}

.btn-sound-activate {
  background: #ffffff;
  color: #991b1b;
  border: none;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.btn-sound-activate:hover {
  background: #fef2f2;
  transform: translateY(-1px);
}

/* ==========================================
   BADGES DE STATUS DE PAGAMENTO
   ========================================== */
.pay-badge-refunded {
  background: #fef2f2 !important;
  color: #b91c1c !important;
  border: 1px solid #fecaca !important;
}

.pay-badge-partially-refunded {
  background: #fff7ed !important;
  color: #c2410c !important;
  border: 1px solid #ffedd5 !important;
}

.pay-badge-cancelled {
  background: #fef2f2 !important;
  color: #991b1b !important;
  border: 1px solid #fecaca !important;
}


