/* assets/essenza-hub.css - Terminal Touch POS Real (Estilo Caixa / Totem) */

/* ─── TEMA DARK POS PROFISSIONAL ─── */
body.is-essenza-system {
  --pos-bg: #0f1117;
  --pos-panel: #161b26;
  --pos-card: #1c2333;
  --pos-card-active: #242e42;
  --pos-border: #2a354a;
  --pos-text: #f1f5f9;
  --pos-text-muted: #8492a6;
  --pos-accent: #2563eb;

  /* Sobrescrita de variáveis globais */
  --bg-color: #0f1117 !important;
  --surface: #161b26 !important;
  --border: #2a354a !important;
  --text-main: #f1f5f9 !important;
  --text-muted: #8492a6 !important;
  --primary: #2563eb !important;
  --primary-hover: #1d4ed8 !important;
  --primary-light: rgba(37, 99, 235, 0.2) !important;

  background-color: #0f1117 !important;
  color: #f1f5f9 !important;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* ─── TIPOGRAFIA PADRÃO DO SISTEMA ─── */
body.is-essenza-system,
body.is-essenza-system *,
body.is-essenza-system input,
body.is-essenza-system button,
body.is-essenza-system select,
body.is-essenza-system textarea {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif !important;
}

/* ─── OCULTAÇÃO TOTAL DA BARRA LATERAL, HEADERS ANTIGOS E FISCAL ─── */
body.is-essenza-system .sidebar,
body.is-essenza-system .mobile-header,
body.is-essenza-system .desktop-brand,
body.is-essenza-system .esz-top-navbar {
  display: none !important;
}

/* Oculta estritamente qualquer menção a notas fiscais */
body.is-essenza-system .nav-link-nfe,
body.is-essenza-system a[href="/emitir"],
body.is-essenza-system a[href="#/emitir"],
body.is-essenza-system a[href="/nfe"],
body.is-essenza-system a[href="#/nfe"],
body.is-essenza-system a[href="/consultar"],
body.is-essenza-system .btn-nova-nfe,
body.is-essenza-system .btn-nova-nfe-disabled,
body.is-essenza-system .dashboard-stats,
body.is-essenza-system .nfe-summary,
body.is-essenza-system .fiscal-card,
body.is-essenza-system .mobile-card-list,
body.is-essenza-system .table-responsive:has(th:contains("Nº")),
body.is-essenza-system .table-responsive:has(th:contains("Chave")),
body.is-essenza-system .card:has(a[href="/emitir"]) {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* Quando no HUB, esconde o componente interno do React */
body.is-essenza-system.at-hub main.main-content > *:not(#essenza-pos-root) {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* ─── LAYOUT 100% TELA ─── */
body.is-essenza-system .app-container {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100vh !important;
  width: 100% !important;
  background-color: #0f1117 !important;
  padding: 0 !important;
  margin: 0 !important;
}

body.is-essenza-system .main-content {
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 1.25rem !important;
  flex: 1 !important;
  box-sizing: border-box !important;
}

/* ─── ESTRUTURA DO TERMINAL POS ESSENZA ─── */
#essenza-pos-root {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  box-sizing: border-box;
}

/* Barra Mínima Superior do PDV (Sem abas nem poluição) */
.pos-minimal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #161d2b 0%, #111622 100%);
  border: 1.5px solid #243144;
  border-radius: 16px;
  padding: 0.85rem 1.4rem;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.pos-brand-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.pos-brand-text {
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #f8fafc;
}

.pos-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 3px 8px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 12px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #34d399;
  letter-spacing: 0.5px;
}

.pos-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
}

.pos-btn-exit {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.1rem;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 10px;
  color: #f87171;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pos-btn-exit:active {
  background: #dc2626;
  color: #ffffff;
}

/* ─── BOTOEIRA TOUCH POS (GRID DE BOTÕES GRANDES DE VERDADE) ─── */
.pos-button-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
}

@media (min-width: 768px) {
  .pos-button-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

/* O BOTÃO TOUCH INDIVIDUAL */
.pos-touch-btn {
  position: relative;
  background: linear-gradient(155deg, #182232 0%, #121824 100%);
  border: 1.5px solid #233045;
  border-radius: 18px;
  padding: 1.85rem 1.15rem;
  min-height: 175px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 22px rgba(0, 0, 0, 0.35);
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  touch-action: manipulation;
  text-align: center;
  overflow: hidden;
}

/* Feedback Imediato de Toque */
.pos-touch-btn:active {
  transform: scale(0.96) translateY(2px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.6);
}

@media (hover: hover) {
  .pos-touch-btn:hover {
    transform: translateY(-3px);
    border-color: #3b82f6;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 12px 28px rgba(0, 0, 0, 0.45), 0 0 18px rgba(59, 130, 246, 0.15);
  }
}

/* Ícone Grande Central */
.pos-btn-icon-wrap {
  width: 62px;
  height: 62px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease;
}

.pos-touch-btn:active .pos-btn-icon-wrap {
  transform: scale(1.1);
}

/* Rótulo Grande e Direto */
.pos-btn-label {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #f8fafc;
  line-height: 1.15;
}

.pos-btn-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: #8492a6;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: -2px;
}

/* Cores Sólidas Funcionais por Botão */
/* 1. Simulador */
.pos-touch-btn.btn-simulador {
  border-color: #4338ca;
}
.pos-touch-btn.btn-simulador .pos-btn-icon-wrap {
  background: #312e81;
  color: #a5b4fc;
}

/* 2. Novo Orçamento */
.pos-touch-btn.btn-novo-orc {
  border-color: #059669;
}
.pos-touch-btn.btn-novo-orc .pos-btn-icon-wrap {
  background: #064e3b;
  color: #6ee7b7;
}

/* 3. Orçamentos */
.pos-touch-btn.btn-orcamentos {
  border-color: #0284c7;
}
.pos-touch-btn.btn-orcamentos .pos-btn-icon-wrap {
  background: #0c4a6e;
  color: #7dd3fc;
}

/* 4. Minhas Medidas */
.pos-touch-btn.btn-medidas {
  border-color: #0891b2;
}
.pos-touch-btn.btn-medidas .pos-btn-icon-wrap {
  background: #164e63;
  color: #67e8f9;
}

/* 5. Calculadora Técnica */
.pos-touch-btn.btn-calculadora {
  border-color: #06b6d4;
}
.pos-touch-btn.btn-calculadora .pos-btn-icon-wrap {
  background: #155e75;
  color: #a5f3fc;
}

/* 5. Financeiro */
.pos-touch-btn.btn-financeiro {
  border-color: #10b981;
}
.pos-touch-btn.btn-financeiro .pos-btn-icon-wrap {
  background: #064e3b;
  color: #34d399;
}

/* 6. Clientes */
.pos-touch-btn.btn-clientes {
  border-color: #d97706;
}
.pos-touch-btn.btn-clientes .pos-btn-icon-wrap {
  background: #78350f;
  color: #fde68a;
}

/* 5. Produtos */
.pos-touch-btn.btn-produtos {
  border-color: #7c3aed;
}
.pos-touch-btn.btn-produtos .pos-btn-icon-wrap {
  background: #4c1d95;
  color: #ddd6fe;
}

/* 6. Configurações da Loja */
.pos-touch-btn.btn-config {
  border-color: #4b5563;
}
.pos-touch-btn.btn-config .pos-btn-icon-wrap {
  background: #374151;
  color: #d1d5db;
}

/* 7. Sair */
.pos-touch-btn.btn-sair {
  border-color: #b91c1c;
}
.pos-touch-btn.btn-sair .pos-btn-icon-wrap {
  background: #7f1d1d;
  color: #fca5a5;
}

/* ─── BARRA DE RETORNO (NAS SUBTELAS) ─── */
.pos-return-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 1.25rem;
}

.pos-btn-return {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #1e2533;
  border: 1.5px solid #334155;
  border-radius: 12px;
  color: #f1f5f9;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  touch-action: manipulation;
}

.pos-btn-return:active {
  background: #2563eb;
  border-color: #2563eb;
}
