/* ==========================================================================
   ESSID Lab — Shell Compartilhado (Topbar, Drawer Mobile, Dock 3D e Toasts)
   ========================================================================== */
.lab-topbar {
  border-bottom: 1px solid #2b2d3f;
  background: rgba(16, 17, 24, 0.84);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.lab-topbar-inner {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 20px;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.lab-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex-shrink: 0;
}

.lab-brand-logo {
  height: 31px;
  width: auto;
  display: block;
}

.lab-brand-badge {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f9a431;
  background: rgba(249, 164, 49, 0.14);
  border: 1px solid rgba(249, 164, 49, 0.34);
  padding: 3px 9px;
  border-radius: 999px;
}

.lab-nav-desktop {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lab-nav-link {
  text-decoration: none;
  color: #b5b7c7;
  font-family: "Montserrat", "Segoe UI", system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 11px;
  border-radius: 9px;
  transition: color 0.16s ease, background 0.16s ease;
  white-space: nowrap;
}

.lab-nav-link:hover {
  color: #fefefe;
  background: rgba(43, 45, 63, 0.55);
}

.lab-nav-link.active {
  color: #101118;
  background: #f9a431;
  font-weight: 700;
}

.lab-nav-3d {
  color: #f9a431;
  margin-left: 6px;
  border: 1px solid rgba(249, 164, 49, 0.42);
  background: rgba(249, 164, 49, 0.08);
}

.lab-nav-3d:hover {
  color: #101118;
  background: #f9a431;
  border-color: #f9a431;
}

.lab-nav-ext {
  color: #8d8fa3;
  border: 1px solid #2b2d3f;
}

.lab-nav-ext:hover {
  color: #f9a431;
  border-color: rgba(249, 164, 49, 0.45);
  background: rgba(249, 164, 49, 0.08);
}

/* Botão Hambúrguer Mobile */
.lab-menu-btn {
  display: none;
  appearance: none;
  background: #161824;
  border: 1px solid #2b2d3f;
  border-radius: 10px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.lab-menu-btn span {
  display: block;
  width: 19px;
  height: 2px;
  border-radius: 2px;
  background: #fefefe;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.lab-menu-btn[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.lab-menu-btn[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.lab-menu-btn[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Drawer Mobile */
.lab-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 7, 12, 0.72);
  backdrop-filter: blur(4px);
  z-index: 45;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.lab-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.lab-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 86vw);
  background: #121420;
  border-left: 1px solid #2b2d3f;
  z-index: 50;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform: translateX(100%);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  overflow-y: auto;
}

.lab-drawer.open {
  transform: translateX(0);
}

.lab-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid #2b2d3f;
  margin-bottom: 6px;
}

.lab-drawer-title {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f9a431;
}

.lab-drawer-close {
  appearance: none;
  background: #1d2030;
  border: 1px solid #2b2d3f;
  color: #fefefe;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 1.15rem;
  cursor: pointer;
}

.lab-drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #b5b7c7;
  font-family: "Montserrat", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: #161824;
}

.lab-drawer-link span {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  color: #f9a431;
}

.lab-drawer-link.active {
  border-color: #f9a431;
  background: rgba(249, 164, 49, 0.14);
  color: #fefefe;
}

.lab-drawer-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #2b2d3f;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lab-drawer-footer a {
  text-decoration: none;
  color: #8d8fa3;
  font-size: 0.82rem;
  font-weight: 600;
}

.lab-drawer-footer a:hover {
  color: #f9a431;
}

/* Dock 3D Flutuante Unificado (Desktop) */
body.has-lab-dock {
  padding-bottom: 84px;
}

.lab-floating-dock {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 35;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px;
  border-radius: 16px;
  background: rgba(16, 17, 24, 0.86);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(249, 164, 49, 0.28);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  perspective: 800px;
}

.lab-dock-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #b5b7c7;
  font-family: "Montserrat", sans-serif;
  font-size: 0.77rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), background 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}

.lab-dock-item span {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  color: #f9a431;
}

.lab-dock-item:hover {
  background: rgba(249, 164, 49, 0.16);
  color: #fefefe;
  transform: translateY(-6px) scale(1.07);
}

.lab-dock-item.active {
  background: #f9a431;
  color: #101118;
  font-weight: 700;
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(249, 164, 49, 0.34);
}

.lab-dock-item.active span {
  color: #101118;
}

/* Toast Flutuante Global */
.lab-toast {
  position: fixed;
  right: 22px;
  bottom: 86px;
  z-index: 60;
  background: #161824;
  color: #fefefe;
  border: 1px solid #f9a431;
  border-left: 4px solid #f9a431;
  border-radius: 12px;
  padding: 12px 18px;
  font-family: "Montserrat", sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.lab-toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .lab-nav-desktop {
    display: none;
  }
  .lab-menu-btn {
    display: inline-flex;
  }
}

@media (max-width: 820px) {
  .lab-floating-dock {
    display: none;
  }
  body.has-lab-dock {
    padding-bottom: 0;
  }
  .lab-toast {
    left: 16px;
    right: 16px;
    bottom: 20px;
    text-align: center;
  }
}

@media print {
  .lab-topbar,
  .lab-floating-dock,
  .lab-drawer,
  .lab-drawer-backdrop,
  .lab-toast {
    display: none !important;
  }
  body.has-lab-dock {
    padding-bottom: 0 !important;
  }
}
