/* ============================================================
   NEXA LAB — BASE CSS
   Tema: Dark Tech / Refinado
   Fonte: Syne (display) + DM Sans (corpo)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── VARIÁVEIS ─────────────────────────────────────────────── */
:root {
  --bg-base: #0b0d11;
  --bg-card: #111318;
  --bg-nav: #16181b;
  --bg-hover: rgba(255, 255, 255, 0.05);

  --accent: #487ffa !important;
  /* azul elétrico */
  --accent-glow: rgba(59, 130, 246, 0.25);
  --accent-dim: rgba(59, 130, 246, 0.12);

  --text-primary: #e8eaf0;
  --text-secondary: #8b909e;
  --text-muted: #555a67;

  --border: rgba(255, 255, 255, 0.07) !important;
  --border-accent: rgba(59, 130, 246, 0.35);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --nav-h: 68px;

  --transition: 0.2s ease;
}

/* ── RESET / BASE ───────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.65;
  background-color: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* grain overlay sutil */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

main {
  flex: 1;
  padding-top: var(--nav-h);
  margin-top: 60px !important;
}

/* ── NAVBAR ─────────────────────────────────────────────────── */
#lab-nexa {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: var(--bg-nav);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 30px rgba(0, 0, 0, 0.5);
}

/* linha de accent azul fina no topo */
#lab-nexa::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.6;
}

/* ── Logo ── */
.nav-logo-container a {
  display: flex;
  align-items: center;
}

.navbar-logo {
  height: 36px;
  width: auto;
  /* inverte para ficar branca no dark */
  filter: brightness(0) invert(1);
  opacity: 0.9;
  transition: opacity var(--transition);
}

.navbar-logo:hover {
  opacity: 1;
}

/* ── Links ── */
.nav-buttons-container {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  letter-spacing: 0.01em;
}

.nav-link:hover {
  color: var(--text-primary) !important;
  background: var(--bg-hover) !important;
}

/* ── Botão Login ── */
.nav-login {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  background: var(--accent);
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  margin-left: 8px;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  box-shadow: 0 0 0 0 var(--accent-glow);
}

.nav-login:hover {
  background: #2563eb;
  box-shadow: 0 0 18px var(--accent-glow);
  transform: translateY(-1px);
}

.nav-login i {
  font-size: 15px;
}

/* ── Dropdown usuário ── */
.nav-user-dropdown {
  position: relative;
  margin-left: 8px;
}

.dropdown-hover>button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--text-secondary);
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-hover);
  border: 1px solid var(--border);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.dropdown-hover>button:hover,
.dropdown-hover:hover>button {
  color: var(--text-primary);
  border-color: var(--border-accent);
  background: var(--accent-dim);
}

.dropdown-hover>button .fa-user-circle {
  font-size: 16px;
  color: var(--accent);
}

.dropdown-arrow {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform var(--transition);
  opacity: 0.6;
}

/* dropdown panel */
.dropdown-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 190px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.dropdown-hover.active .dropdown-list {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dropdown-list li a,
.dropdown-list li .nav-logout {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  width: 100%;
  transition: background var(--transition), color var(--transition);
}

.dropdown-list li a:hover,
.dropdown-list li .nav-logout:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.dropdown-list li a i,
.dropdown-list li .nav-logout i {
  font-size: 14px;
  color: var(--accent);
  width: 16px;
  text-align: center;
}

/* separador visual entre itens */
.dropdown-list li:not(:last-child) {
  border-bottom: 1px solid var(--border);
  margin-bottom: 3px;
  padding-bottom: 3px;
}

/* ── Hambúrguer (mobile) ── */
.nav-cell-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}

.nav-cell-btn span {
  display: block !important;
  width: 24px !important;
  height: 2px !important;
  background: var(--text-secondary) !important;
  border-radius: 2px !important;
  transition: transform 0.25s ease, opacity 0.25s ease, background 0.25s ease !important;
}

.nav-cell-btn:hover span {
  background: var(--text-primary) !important;
}

/* ── FOOTER ─────────────────────────────────────────────────── */
#lab-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 52px 0 28px;
  margin-top: auto;
}

.container-footer {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 32px;
}

.linha-footer {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

/* blocos de info */
.footer-info-block {
  flex: 1;
  min-width: 220px;
}

.footer-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-title i {
  color: var(--accent);
  font-size: 14px;
}

.footer-info-block p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 14px;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
  font-size: 13.5px;
}

.footer-contact-item i {
  color: var(--accent);
  width: 16px;
  text-align: center;
  font-size: 14px;
}

.footer-contact-item a {
  color: var(--text-secondary);
  transition: color var(--transition);
}

.footer-contact-item a:hover {
  color: var(--accent);
}

/* divider */
.footer-divider {
  height: 1px;
  background: var(--border);
  margin: 32px 0;
}

/* links legais */
.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-links a i {
  font-size: 13px;
}

/* copyright */
.footer-brand {
  font-size: 12.5px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 4px;
}

/* ── MODAIS (termos / privacidade) ─────────────────────────── */
.json-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.json-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.json-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  max-width: 640px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
  transform: translateY(12px);
  transition: transform 0.22s ease;
}

.json-modal-overlay.active .json-container {
  transform: translateY(0);
}

/* ── RESPONSIVIDADE ─────────────────────────────────────────── */
@media (max-width: 768px) {
  #lab-nexa {
    padding: 0 20px;
  }

  .nav-cell-btn {
    display: flex;
  }

  .nav-buttons-container {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px 20px;
    transform: translateY(-110%);
    opacity: 0;
    transition: transform 0.28s ease, opacity 0.28s ease;
    pointer-events: none;
  }

  .nav-buttons-container.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link,
  .nav-login {
    width: 100%;
    padding: 12px 14px;
  }

  .nav-login {
    margin-left: 0;
    margin-top: 6px;
    justify-content: center;
  }

  .nav-user-dropdown {
    width: 100%;
  }

  .dropdown-hover>button {
    width: 100%;
  }

  .dropdown-list {
    position: static;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0;
    margin-top: 4px;
  }

  .container-footer {
    padding: 0 20px;
  }

  .linha-footer {
    gap: 32px;
  }
}

/* ── SCROLLBAR personalizada ────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ALERTAS */

.alerts-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 420px;
  max-height: 350px;
  overflow-y: auto;
}


/* Estilização da barra de scroll para PDFs */
.alerts-container::-webkit-scrollbar {
  width: 6px;
}

.alerts-container::-webkit-scrollbar-track {
  background: rgba(148, 163, 184, 0.1);
  border-radius: 10px;
}

.alerts-container::-webkit-scrollbar-thumb {
  background: grey;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.alerts-container::-webkit-scrollbar-thumb:hover {
  background: darkgrey;
}

.alert-custom {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 15px;
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: relative;
  animation: slideDown 0.3s ease-out;
}

.alert-custom i {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.alert-custom span {
  flex-grow: 1;
}

.alert-custom .btn-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  font-weight: 300;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
  padding: 0;
  margin-left: 10px;
  line-height: 1;
  color: inherit;
}

.alert-custom .btn-close:hover {
  opacity: 1;
}

/* Cores para cada tipo de alerta */
.alert-custom.alert-success {
  background-color: #d4edda;
  color: #155724;
  border-left: 4px solid #28a745;
}

.alert-custom.alert-success i {
  color: #28a745;
}

.alert-custom.alert-danger,
.alert-custom.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border-left: 4px solid #dc3545;
}

.alert-custom.alert-danger i,
.alert-custom.alert-error i {
  color: #dc3545;
}

.alert-custom.alert-warning {
  background-color: #fff3cd;
  color: #856404;
  border-left: 4px solid #ffc107;
}

.alert-custom.alert-warning i {
  color: #ffc107;
}

.alert-custom.alert-info {
  background-color: #d1ecf1;
  color: #0c5460;
  border-left: 4px solid #17a2b8;
}

.alert-custom.alert-info i {
  color: #17a2b8;
}

/* Animação suave ao aparecer */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.alerta-js {
  position: fixed;
  top: 20px;
  right: 20px;
}

.alert-close {
  background: none;
  color: #212121;
  border: none;
  font-size: 24px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  padding: 0;
  line-height: 1;
  transition: all 0.2s;
}

.alert-close:hover {
  background: none;
  transform: rotate(90deg);
  transition: all 0.2s;

}