/* ========================================
   🎨 NAVBAR ESTILO META - DESDE CERO
   ======================================== */

/* Reset y base */
* {
  box-sizing: border-box;
}

/* ===== NAVBAR PRINCIPAL ===== */
.meta-navbar {
  background: white;
  border-bottom: none;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: none;
}

.meta-nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* LOGO Y BRAND + HERRAMIENTAS */
.meta-nav-brand {
  display: flex;
  align-items: center;
  gap: 16px; /* Espacio entre logo y botón herramientas */
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #1c1e21;
  font-weight: 600;
  font-size: 20px;
}

.brand-link:hover {
  color: #1c1e21;
  text-decoration: none;
}

.brand-text {
  font-weight: 700;
  color: #ab182d;
  font-size: 20px;
  display: block;
  white-space: nowrap;
}

/* CENTRO - VACÍO */
.meta-nav-center {
  flex: 1;
}

/* ENLACE PÚBLICO DE GIFT CARDS */
.meta-nav-public-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  color: #ab182d;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  background: transparent;
  border: 1px solid #ab182d;
  margin-left: 12px;
}

.meta-nav-public-link:hover {
  background: #ab182d;
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(171, 24, 45, 0.2);
}

.meta-nav-public-link svg {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.meta-nav-public-link:hover svg {
  transform: scale(1.1);
}

/* USUARIO */
.meta-nav-user {
  flex: 0 0 auto;
  position: relative;
}

/* Dropdown de usuario */
.meta-user-dropdown {
  position: relative;
}

.meta-user-btn {
  background: none;
  border: none;
  padding: 6px 8px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
  max-width: 200px;
}

.meta-user-btn:hover {
  background: #f0f2f5;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.user-name {
  color: #1c1e21;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-arrow {
  color: #65676b;
  flex-shrink: 0;
}

/* Dropdown Menu */
.meta-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  min-width: 320px;
  max-width: 400px;
  z-index: 1050;
  padding: 0;
  margin: 0;
  transform: translateY(-10px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.meta-dropdown-menu.show {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.meta-dropdown-header {
  padding: 16px;
  border-bottom: 1px solid #e4e6ea;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8f9fa;
  border-radius: 12px 12px 0 0;
}

.header-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.header-info {
  flex: 1;
}

.header-name {
  font-weight: 700;
  font-size: 16px;
  color: #1c1e21;
  margin-bottom: 2px;
}

.header-role {
  font-size: 12px;
  color: #65676b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.meta-dropdown-divider {
  height: 1px;
  background: #e4e6ea;
  margin: 8px 0;
}

.meta-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #1c1e21;
  text-decoration: none;
  transition: background-color 0.2s;
  border-radius: 0;
}

.meta-dropdown-item:hover {
  background: #f0f2f5;
  color: #1c1e21;
  text-decoration: none;
}

.meta-dropdown-item.logout-item {
  color: #e41e3f;
}

.meta-dropdown-item.logout-item:hover {
  background: #ffebee;
  color: #e41e3f;
}

.meta-dropdown-item svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.meta-dropdown-item span {
  font-weight: 500;
  font-size: 14px;
}

/* Login Button */
.meta-login-btn {
  background: linear-gradient(135deg, #ab182d 0%, #8b1426 100%);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(171, 24, 45, 0.3);
}

.meta-login-btn:hover {
  background: linear-gradient(135deg, #8b1426 0%, #6d0f1e 100%);
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(171, 24, 45, 0.4);
}

.meta-login-btn svg {
  flex-shrink: 0;
}

/* ========================================
   🎨 BOTÓN DE HERRAMIENTAS - UNIFICADO
   ======================================== */

/* Estilos base para escritorio */
.meta-tools-btn {
  background: white;
  border: 1px solid #e4e6ea;
  border-radius: 6px;
  padding: 8px 12px;
  color: #1c1e21;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.meta-tools-btn:hover {
  background: #f0f2f5;
  color: #1c1e21;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.meta-tools-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(171, 24, 45, 0.2);
}

.meta-tools-btn span {
  font-size: 14px;
  font-weight: 600;
}

/* ========================================
   🎨 OFFCANVAS ESTILO META
   ======================================== */

.meta-offcanvas {
  width: 360px;
  border: none;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.3);
}

.meta-offcanvas-header {
  padding: 20px;
  border-bottom: 1px solid #e4e6ea;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8f9fa;
}

.offcanvas-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 18px;
  color: #1c1e21;
}

.meta-close-btn {
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
  color: #65676b;
}

.meta-close-btn:hover {
  background: #e4e6ea;
  color: #1c1e21;
}

.meta-offcanvas-body {
  padding: 0;
  overflow-y: auto;
  height: calc(100vh - 80px);
}

/* User Card */
.meta-user-card {
  margin: 20px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.card-info {
  flex: 1;
}

.card-name {
  font-weight: 700;
  font-size: 16px;
  color: #1c1e21;
  margin-bottom: 2px;
}

.card-role {
  font-size: 12px;
  color: #65676b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Tool Sections */
.meta-tool-section {
  margin: 0 20px 24px 20px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-weight: 700;
  font-size: 14px;
  color: #65676b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.section-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-tool-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.meta-tool-item:hover {
  background: #f0f2f5;
  color: inherit;
  text-decoration: none;
  transform: translateX(4px);
}

.tool-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tool-icon.purple { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; }
.tool-icon.gradient { background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%); color: #8b4513; }
.tool-icon.blue { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; }
.tool-icon.orange { background: linear-gradient(135deg, #ffb347 0%, #ff8c00 100%); color: white; }
.tool-icon.teal { background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%); color: white; }
.tool-icon.red { background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%); color: white; }
.tool-icon.pink { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%); color: #8b0846; }
.tool-icon.indigo { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; }
.tool-icon.gray { background: linear-gradient(135deg, #bdc3c7 0%, #95a5a6 100%); color: white; }
.tool-icon.green { background: linear-gradient(135deg, #28a745 0%, #20c997 100%); color: white; }

.tool-content {
  flex: 1;
}

.tool-title {
  font-weight: 600;
  font-size: 14px;
  color: #1c1e21;
  margin-bottom: 2px;
}

.tool-desc {
  font-size: 12px;
  color: #65676b;
  line-height: 1.3;
}

/* Quick Actions */
.meta-quick-actions {
  margin: 20px;
  display: flex;
  gap: 8px;
}

.quick-action-btn {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  text-decoration: none;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.quick-action-btn.primary {
  background: #ab182d;
  color: white;
}

.quick-action-btn.primary:hover {
  background: #8b1426;
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
}

.quick-action-btn.secondary {
  background: #f0f2f5;
  color: #1c1e21;
  border: 1px solid #e4e6ea;
}

.quick-action-btn.secondary:hover {
  background: #e4e6ea;
  color: #1c1e21;
  text-decoration: none;
  transform: translateY(-1px);
}

/* ========================================
   📱 RESPONSIVE DESIGN
   ======================================== */

/* Tablets (768px - 992px) */
@media (max-width: 992px) {
  .meta-nav-container {
    padding: 0 12px;
  }
  
  .meta-offcanvas {
    width: 320px;
  }
}

/* Tablets y móviles (max-width: 768px) */
@media (max-width: 768px) {
  .meta-nav-container {
    padding: 0 12px;
    gap: 12px;
  }
  
  .meta-nav-brand {
    max-width: 70%;
  }
  
  .meta-nav-public-link {
    padding: 6px 12px;
    font-size: 13px;
    margin-left: 8px;
  }
  
  .meta-nav-public-link span {
    display: inline;
  }
  
  .brand-text {
    display: block !important;
    font-size: 18px;
    font-weight: 700;
    color: #ab182d;
  }
  
  /* Botón de herramientas en tablets */
  .meta-tools-btn {
    min-width: auto;
    width: auto;
    height: 44px;
    padding: 10px 14px;
    border-radius: 22px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
  }
  
  .meta-tools-btn span {
    display: inline !important;
    font-size: 14px !important;
    font-weight: 600 !important;
  }
  
  .user-name {
    display: none;
  }
  
  .user-avatar {
    width: 36px !important;
    height: 36px !important;
    display: block !important;
  }
  
  .meta-login-btn {
    padding: 8px 12px;
    font-size: 14px;
    border-radius: 20px;
  }
  
  .meta-login-btn span {
    display: none;
  }
  
  .meta-login-btn svg {
    width: 20px;
    height: 20px;
  }
  
  .meta-offcanvas {
    width: 320px !important;
  }
  
  .meta-offcanvas-body {
    height: calc(100vh - 70px);
  }
}

/* Móviles (max-width: 576px) */
@media (max-width: 576px) {
  .meta-navbar {
    height: 56px;
    padding: 0;
  }
  
  .meta-nav-container {
    padding: 0 8px;
    gap: 8px;
  }
  
  .meta-nav-brand {
    max-width: 65%;
  }
  
  .meta-nav-public-link {
    padding: 6px 8px;
    font-size: 12px;
    border-radius: 16px;
    margin-left: 6px;
  }
  
  .meta-nav-public-link span {
    display: none;
  }
  
  .meta-nav-public-link svg {
    width: 18px;
    height: 18px;
  }
  
  .brand-text {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #ab182d !important;
    display: block !important;
  }
  
  /* Botón de herramientas en móviles */
  .meta-tools-btn {
    width: auto;
    height: 40px;
    padding: 8px 12px;
    border-radius: 20px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
  }
  
  .meta-tools-btn span {
    display: inline !important;
    font-size: 14px !important;
    font-weight: 600 !important;
  }
  
  .user-avatar {
    width: 32px !important;
    height: 32px !important;
    display: block !important;
    border-radius: 50% !important;
  }
  
  .meta-login-btn {
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 20px;
  }
  
  .meta-login-btn span {
    display: none;
  }
  
  .meta-login-btn svg {
    width: 18px;
    height: 18px;
  }
  
  .meta-offcanvas {
    width: 100vw !important;
    max-width: 300px !important;
  }
  
  .meta-offcanvas-body {
    height: calc(100vh - 56px);
  }
  
  .meta-user-card {
    margin: 12px;
    padding: 12px;
  }
  
  .card-avatar {
    width: 40px;
    height: 40px;
  }
  
  .meta-tool-section {
    margin: 0 12px 20px 12px;
  }
  
  .meta-tool-item {
    padding: 12px;
    gap: 12px;
  }
  
  .tool-icon {
    width: 36px;
    height: 36px;
  }
  
  .tool-title {
    font-size: 14px;
  }
  
  .tool-desc {
    font-size: 12px;
  }
  
  .meta-quick-actions {
    margin: 12px;
    flex-direction: column;
  }
  
  .quick-action-btn {
    padding: 14px;
  }
}

/* Móviles muy pequeños (max-width: 375px) */
@media (max-width: 375px) {
  .meta-nav-container {
    padding: 0 6px;
  }
  
  .brand-text {
    font-size: 14px !important;
  }
  
  .meta-nav-brand {
    max-width: 60%;
  }
  
  .meta-nav-public-link {
    padding: 4px 6px;
    margin-left: 4px;
    border-radius: 14px;
  }
  
  .meta-nav-public-link svg {
    width: 16px;
    height: 16px;
  }
  
  /* Botón de herramientas en móviles muy pequeños */
  .meta-tools-btn {
    width: auto;
    height: 36px;
    padding: 6px 10px;
    border-radius: 18px;
    font-size: 13px;
  }
  
  .meta-tools-btn span {
    font-size: 13px !important;
  }
  
  .user-avatar {
    width: 30px !important;
    height: 30px !important;
  }
  
  .meta-login-btn {
    padding: 6px 8px;
    font-size: 12px;
  }
  
  .meta-login-btn svg {
    width: 16px;
    height: 16px;
  }
}

/* Estilos adicionales para asegurar visibilidad */
.meta-nav-brand {
  min-width: 0;
  flex-shrink: 0;
}

.meta-nav-user {
  min-width: 0;
  flex-shrink: 0;
}

/* Asegurar que el logo siempre sea visible independientemente del estado de sesión */
.brand-link {
  min-width: 0;
  flex-shrink: 0;
}



/* Animaciones */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.meta-offcanvas.show {
  animation: slideInRight 0.3s ease-out;
}

/* Overlay */
.offcanvas-backdrop {
  background-color: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(4px) !important;
}

/* Fix para dropdown */
.dropdown-menu.show {
  display: block !important;
}

/* Scrollbar personalizado */
.meta-offcanvas-body::-webkit-scrollbar {
  width: 6px;
}

.meta-offcanvas-body::-webkit-scrollbar-track {
  background: #f0f2f5;
}

.meta-offcanvas-body::-webkit-scrollbar-thumb {
  background: #dadde1;
  border-radius: 3px;
}

.meta-offcanvas-body::-webkit-scrollbar-thumb:hover {
  background: #c1c5c9;
}

/* Estados activos */
.meta-tool-item.active {
  background: #e3f2fd;
  border-left: 4px solid #ab182d;
}

.meta-tool-item.active .tool-title {
  color: #ab182d;
  font-weight: 700;
}

/* Mejoras de accesibilidad */
.meta-tools-btn:focus,
.meta-user-btn:focus,
.meta-close-btn:focus {
  outline: 2px solid #ab182d;
  outline-offset: 2px;
}

.meta-dropdown-item:focus,
.meta-tool-item:focus {
  background: #f0f2f5;
  outline: none;
}

/* Forzar tema claro siempre */
@media (prefers-color-scheme: dark) {
  .meta-navbar {
    background: white !important;
    border-bottom-color: #e4e6ea !important;
  }
  
  .brand-link,
  .offcanvas-title,
  .card-name,
  .tool-title {
    color: #1c1e21 !important;
  }
  
  .meta-dropdown-menu,
  .meta-user-card,
  .section-items {
    background: #ffffff !important;
    border-color: #e4e6ea !important;
  }
  
  .meta-offcanvas {
    background: white !important;
  }
  
  .meta-offcanvas-header {
    background: white !important;
    color: #1c1e21 !important;
  }
  
  .meta-offcanvas-body {
    background: #f8f9fa !important;
  }
  
  .card-role,
  .tool-desc {
    color: #65676b !important;
  }
}

/* ===== FINALIZACIÓN ESTILO META ===== */

/* Asegurar compatibilidad total */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
}

 