/* =============================================
   MENU PORTAL - ESTILO DASHBOARD
   Menu do portal com MESMO estilo do dashboard
   ============================================= */

/* ===== ESCONDER MENU ANTIGO EM MOBILE ===== */
@media (max-width: 768px) {
  /* Esconder menu antigo completamente */
  .modern-nav {
    display: none !important;
  }
  
  /* Mostrar novo menu estilo dashboard */
  .portal-menu-dashboard {
    display: block !important;
  }
}

/* ===== BOTÃO HAMBURGER - ESTILO DASHBOARD ===== */
.portal-hamburger {
  position: fixed;
  top: 12px;
  right: 15px;
  z-index: 10000;
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, #f97316, #fb923c);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  box-shadow: 
    0 4px 15px rgba(249, 115, 22, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.portal-hamburger:hover {
  background: linear-gradient(135deg, #fb923c, #fdba74);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 
    0 15px 40px rgba(249, 115, 22, 0.6),
    0 0 0 3px rgba(255, 255, 255, 0.2);
}

.portal-hamburger:active {
  transform: translateY(0) scale(0.98);
}

.portal-hamburger span {
  display: block;
  width: 24px;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Animação do X */
.portal-hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.portal-hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(20px);
}

.portal-hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

@media (max-width: 768px) {
  .portal-hamburger {
    display: flex !important;
  }
}

/* ===== SIDEBAR - ESTILO DASHBOARD ===== */
.portal-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 100%);
  border-right: 2px solid rgba(249, 115, 22, 0.3);
  box-shadow: 
    5px 0 30px rgba(0, 0, 0, 0.5),
    inset -1px 0 0 rgba(249, 115, 22, 0.1);
  z-index: 9999;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.portal-sidebar.active {
  transform: translateX(0);
}

@media (max-width: 768px) {
  .portal-sidebar {
    display: block !important;
  }
}

/* ===== LOGO NA SIDEBAR ===== */
.portal-sidebar-logo {
  padding: 25px 20px;
  text-align: center;
  border-bottom: 2px solid rgba(249, 115, 22, 0.2);
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.05) 0%, rgba(249, 115, 22, 0.02) 100%);
}

.portal-sidebar-logo img {
  height: 50px;
  width: auto;
  filter: drop-shadow(0 4px 10px rgba(249, 115, 22, 0.4));
  transition: all 0.3s ease;
}

.portal-sidebar-logo:hover img {
  transform: scale(1.05);
  filter: drop-shadow(0 6px 15px rgba(249, 115, 22, 0.6));
}

.portal-logo-text {
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  margin-top: 10px;
  background: linear-gradient(135deg, #fff 0%, #f97316 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 1px;
}

/* ===== NAVEGAÇÃO ===== */
.portal-nav-group {
  padding: 20px 15px;
}

.portal-nav-title {
  color: #f97316;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 0 10px 10px 10px;
  margin-bottom: 5px;
  border-bottom: 1px solid rgba(249, 115, 22, 0.2);
}

.portal-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 15px;
  margin-bottom: 6px;
  text-decoration: none;
  color: #ddd;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  background: transparent;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.portal-nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: linear-gradient(90deg, #f97316, transparent);
  transition: width 0.3s ease;
}

.portal-nav-item:hover {
  background: rgba(249, 115, 22, 0.1);
  color: #fff;
  text-decoration: none;
  transform: translateX(5px);
}

.portal-nav-item:hover::before {
  width: 4px;
}

.portal-nav-item.active {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(249, 115, 22, 0.1));
  color: #f97316;
  border-left: 4px solid #f97316;
}

.portal-nav-icon {
  font-size: 20px;
  min-width: 24px;
  text-align: center;
}

.portal-nav-label {
  flex: 1;
}

/* ===== AUTH BUTTONS ===== */
.portal-auth-group {
  padding: 15px;
  border-top: 2px solid rgba(249, 115, 22, 0.2);
  margin-top: auto;
}

.portal-auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  margin-bottom: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.portal-auth-btn.login {
  background: rgba(249, 115, 22, 0.1);
  color: #f97316;
  border: 2px solid rgba(249, 115, 22, 0.3);
}

.portal-auth-btn.login:hover {
  background: rgba(249, 115, 22, 0.2);
  border-color: #f97316;
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
}

.portal-auth-btn.register {
  background: linear-gradient(135deg, #f97316, #fb923c);
  color: white;
  border: 2px solid transparent;
  box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
}

.portal-auth-btn.register:hover {
  background: linear-gradient(135deg, #fb923c, #fdba74);
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.6);
  text-decoration: none;
  color: white;
  transform: translateY(-2px);
}

.portal-auth-btn.dashboard {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: 2px solid transparent;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.portal-auth-btn.dashboard:hover {
  background: linear-gradient(135deg, #059669, #10b981);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
  text-decoration: none;
  color: white;
  transform: translateY(-2px);
}

.portal-auth-btn.logout {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 2px solid rgba(239, 68, 68, 0.3);
}

.portal-auth-btn.logout:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
}

/* ===== OVERLAY ===== */
.portal-sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.portal-sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ===== BARRA SUPERIOR COM FUNDO (ESTILO DASHBOARD) ===== */
@media (max-width: 768px) {
  /* Criar fundo da barra superior */
  body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: linear-gradient(135deg, rgba(5, 5, 5, 0.98) 0%, rgba(15, 15, 15, 0.98) 100%);
    backdrop-filter: blur(20px);
    border-bottom: 2px solid rgba(249, 115, 22, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 9997 !important;
    pointer-events: none !important;
  }
  
  /* Ajustar padding do conteúdo */
 
}

/* ===== LOGO FIXA NO TOPO (MOBILE) ===== */
.portal-logo-fixed {
  position: fixed;
  top: -8px;
  left: 15px;
  z-index: 9999;
  display: none;
}

.portal-logo-fixed img {
  height: 45px;
  width: auto;
  filter: drop-shadow(0 4px 15px rgba(249, 115, 22, 0.5));
  transition: filter 0.3s ease;
}

.portal-logo-fixed:hover img {
  filter: drop-shadow(0 6px 20px rgba(249, 115, 22, 0.7));
}

@media (max-width: 768px) {
  .portal-logo-fixed {
    display: block !important;
  }
}

/* ===== SCROLLBAR CUSTOMIZADA ===== */
.portal-sidebar::-webkit-scrollbar {
  width: 6px;
}

.portal-sidebar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.portal-sidebar::-webkit-scrollbar-thumb {
  background: rgba(249, 115, 22, 0.5);
  border-radius: 3px;
}

.portal-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(249, 115, 22, 0.7);
}

/* ===== ANIMAÇÕES ===== */
@keyframes slideInRight {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ===== MOBILE SMALL (480px) ===== */
@media (max-width: 480px) {
  body::before {
    height: 65px !important;
  }
  
  .portal-sidebar {
    width: 260px;
  }
  
  .portal-hamburger {
    width: 42px;
    height: 42px;
    top: 11px;
    right: 12px;
  }
  
  .portal-hamburger span {
    width: 20px;
    height: 2.5px;
  }
  
  .portal-logo-fixed {
    top: 11px;
    left: 12px;
  }
  
  .portal-logo-fixed img {
    height: 38px;
  }
  
  .portal-nav-item {
    padding: 12px 12px;
    font-size: 14px;
  }
  
  .portal-nav-icon {
    font-size: 18px;
  }
  
  .portal-auth-btn {
    padding: 12px 16px;
    font-size: 13px;
  }
}

/* ===== LANDSCAPE MODE ===== */
@media (max-width: 768px) and (orientation: landscape) {
  .portal-sidebar {
    width: 240px;
  }
  
  .portal-sidebar-logo {
    padding: 15px;
  }
  
  .portal-sidebar-logo img {
    height: 40px;
  }
  
  .portal-nav-group {
    padding: 15px 10px;
  }
  
  .portal-nav-item {
    padding: 10px 12px;
  }
}

/* ===== DESKTOP - MANTER MENU ORIGINAL ===== */
@media (min-width: 769px) {
  .portal-hamburger,
  .portal-sidebar,
  .portal-sidebar-overlay,
  .portal-logo-fixed {
    display: none !important;
  }
  
  .modern-nav {
    display: block !important;
  }
}

