/* =========================================================
   FORNO & BRASA - UNIVERSAL EXECUTIVE NAVIGATION SUITE
   Estética Corporativa, Sóbria e Premium (Padrão Enterprise SaaS)
   ========================================================= */

/* Botão de Acionamento Executivo (Discreto e Elegante) */
#fb-master-nav-trigger {
  position: fixed;
  top: 14px;
  right: 18px;
  z-index: 999998;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: #0d131f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  padding: 6px 14px;
  border-radius: 8px;
  color: #f1f5f9;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

#fb-master-nav-trigger:hover {
  background: #141c2c;
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
  transform: translateY(-1px);
}

#fb-master-nav-trigger .trigger-svg {
  width: 15px;
  height: 15px;
  stroke: #94a3b8;
  stroke-width: 2;
  transition: stroke 0.18s ease;
}

#fb-master-nav-trigger:hover .trigger-svg {
  stroke: #f1f5f9;
}

#fb-master-nav-trigger .trigger-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 0.66rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Modal Overlay do Hub Executivo */
#fb-master-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 12, 0.85);
  backdrop-filter: blur(10px);
  z-index: 9999999;
  display: none !important;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

#fb-master-modal-overlay.active {
  display: flex !important;
  opacity: 1;
  visibility: visible;
}

#fb-master-modal-box {
  background: #0a0e17;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  width: 100%;
  max-width: 960px;
  max-height: 88vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transform: scale(0.98);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  color: #f8fafc;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

#fb-master-modal-overlay.active #fb-master-modal-box {
  transform: scale(1);
}

/* Header do Modal */
.fb-master-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #0d121d;
}

.fb-master-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fb-master-logo {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.fb-master-title-wrap h2 {
  font-family: 'Outfit', -apple-system, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fb-master-title-wrap p {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 1px;
}

.fb-master-close-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.fb-master-close-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Grid de Módulos */
.fb-master-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  padding: 20px 24px;
  background: #080b12;
}

.fb-module-card {
  background: #0f1420;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  transition: all 0.16s ease;
  position: relative;
}

.fb-module-card:hover {
  background: #141c2c;
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  transform: translateY(-2px);
}

.fb-module-card.current {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.04);
}

.fb-mod-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.fb-mod-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mod-accent, #94a3b8);
}

.fb-mod-icon-wrap svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.fb-mod-status {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.fb-mod-status.current-badge {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.25);
}

.fb-mod-body h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.fb-mod-body p {
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.45;
  margin-bottom: 14px;
}

.fb-mod-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  transition: color 0.15s ease;
}

.fb-module-card:hover .fb-mod-action {
  color: #f8fafc;
}

/* Footer do Modal */
.fb-master-foot {
  padding: 14px 24px;
  background: #0a0e17;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: #64748b;
}

.fb-user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #94a3b8;
}

.fb-user-chip strong {
  color: #f1f5f9;
}

.fb-btn-copy-cred {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 5px 11px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.fb-btn-copy-cred:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

@media (max-width: 640px) {
  #fb-master-nav-trigger {
    top: auto;
    bottom: 16px;
    right: 16px;
    padding: 7px 12px;
  }
  .fb-master-grid {
    grid-template-columns: 1fr;
    padding: 14px;
  }
}

/* Pílula Global de Monitoramento de Rede (Offline / Online) */
#fb-global-net-pill {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  z-index: 999999;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: #0d131f;
  border: 1px solid rgba(239, 68, 68, 0.35);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
  padding: 8px 18px;
  border-radius: 30px;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fca5a5;
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(12px);
}

#fb-global-net-pill.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

#fb-global-net-pill.online {
  border-color: rgba(16, 185, 129, 0.35);
  color: #86efac;
}

#fb-global-net-pill .net-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

#fb-global-net-pill.online .net-dot {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

#fb-global-net-pill .net-link {
  color: #cbd5e1;
  text-decoration: underline;
  margin-left: 6px;
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
}

