/* Componentes específicos del portal */

/* Layout principal */
.main-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 2;
}

/* 🎨 HEADER MOBILE PREMIUM REDISEÑADO */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 20px;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    /* 🚨 FIX: Prevenir parpadeo inicial */
    opacity: 0;
}

/* 🚨 FIX: Mostrar header solo cuando esté listo */
.mobile-header.show {
    opacity: 1;
}

/* 🚨 FIX CRÍTICO: Ocultar completamente en páginas de autenticación */
body[data-page="auth"] .mobile-header,
body.auth-body .mobile-header,
body[class*="auth"] .mobile-header {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* 🚨 FIX: Sin padding-top en páginas de auth */
body[data-page="auth"],
body.auth-body,
body[class*="auth"] {
    padding-top: 0 !important;
}

.mobile-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    height: 44px;
}

/* 🎨 LOGOTIPO PREMIUM SOLO SVG - SIN TEXTO */
.mobile-logo {
    display: flex;
    align-items: center;
    /* 🚨 FIX: Removido gap y texto */
    font-size: 1.1rem;
    font-weight: 700;
    color: #334155;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.mobile-logo:hover {
    transform: scale(1.02);
}

.mobile-logo-img {
    width: 40px; /* Aumentado ligeramente */
    height: 40px;
    border-radius: 8px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
    /* Optimizaciones para SVG */
    image-rendering: crisp-edges;
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-optimize-contrast;
}

.mobile-logo-img:hover {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
    transform: scale(1.05);
}

/* Fallback si no hay imagen */
.mobile-logo-img:not([src]),
.mobile-logo-img[src=""] {
    display: none;
}

/* 🚨 FIX: OCULTAR TEXTO DEL LOGO */
.mobile-logo-text {
    display: none !important;
    visibility: hidden !important;
}

/* Optimización del logo en pantallas muy pequeñas */
@media (max-width: 480px) {
    .mobile-logo-img {
        width: 36px;
        height: 36px;
    }
}

/* 🎨 USER AREA PREMIUM */
.mobile-user-area {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    min-height: 44px;
    position: relative;
}

.mobile-user-area:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mobile-user-area:active {
    transform: translateY(0);
}

/* 🎨 AVATAR PREMIUM */
.mobile-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    flex-shrink: 0;
}

/* 🎨 USER INFO PREMIUM */
.mobile-user-info-inline {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

.mobile-user-name-inline {
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    line-height: 1.2;
}

.mobile-user-role {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
    line-height: 1;
}

/* 🎨 DROPDOWN INDICATOR */
.mobile-dropdown-arrow {
    margin-left: 4px;
    font-size: 0.8rem;
    color: #64748b;
    transition: transform 0.3s ease;
}

.mobile-user-area.active .mobile-dropdown-arrow {
    transform: rotate(180deg);
}

/* 🎨 DROPDOWN PREMIUM */
.mobile-user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1001;
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.mobile-user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.mobile-user-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 24px;
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.98);
    transform: rotate(45deg);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

/* 🎨 USER INFO IN DROPDOWN */
.mobile-user-info-dropdown {
    padding: 20px;
    border-bottom: 1px solid rgba(241, 245, 249, 0.8);
    text-align: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.mobile-user-avatar-large {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 auto 12px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.mobile-user-name-dropdown {
    font-weight: 700;
    color: #1e293b;
    font-size: 1rem;
    margin-bottom: 4px;
    line-height: 1.3;
}

.mobile-user-email {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

/* 🎨 MENU ITEMS PREMIUM */
.mobile-menu-item {
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #334155;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(241, 245, 249, 0.6);
    position: relative;
    overflow: hidden;
}

.mobile-menu-item:last-child {
    border-bottom: none;
    border-radius: 0 0 16px 16px;
}

.mobile-menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 0%, transparent 100%);
    transition: width 0.3s ease;
}

.mobile-menu-item:hover::before {
    width: 100%;
}

.mobile-menu-item:hover {
    background: rgba(248, 250, 252, 0.8);
    color: #1e293b;
    transform: translateX(4px);
}

.mobile-menu-item:active {
    transform: translateX(2px);
}

.mobile-menu-item.logout {
    color: #ef4444;
    border-top: 1px solid rgba(241, 245, 249, 0.8);
}

.mobile-menu-item.logout::before {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.1) 0%, transparent 100%);
}

.mobile-menu-item.logout:hover {
    background: rgba(254, 242, 242, 0.8);
    color: #dc2626;
}

/* 🎨 MENU ICONS */
.mobile-menu-icon {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* Sidebar - Oculto en mobile */
.sidebar {
    width: 280px;
    background: var(--gradient-primary);
    color: white;
    padding: 40px 25px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.1), transparent);
}

.sidebar-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.logo-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.logo-container:hover {
    transform: scale(1.02);
    background: rgba(255, 255, 255, 0.15);
}

.sidebar-header h2 {
    font-weight: 800;
    font-size: 1.9rem;
    margin: 0 0 8px 0;
    background: linear-gradient(135deg, #ffffff 0%, #e0b1cb 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.sidebar-header p {
    font-size: 0.95rem;
    opacity: 0.8;
    margin: 0;
    font-weight: 500;
}

/* Información del usuario - Desktop */
.user-info {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 30px;
    text-align: center;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.user-info:hover {
    background: rgba(255, 255, 255, 0.15);
}

.user-email {
    opacity: 0.9;
    margin-bottom: 10px;
    font-weight: 500;
}

.user-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--accent);
}

.logout-btn {
    background: rgba(255, 77, 87, 0.2);
    color: white;
    border: 1px solid rgba(255, 77, 87, 0.3);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    min-height: 44px;
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-btn:hover {
    background: rgba(255, 77, 87, 0.4);
    transform: scale(1.05);
}

/* Navegación del sidebar */
.sidebar-nav {
    flex-grow: 1;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    color: white;
    text-decoration: none;
    border-radius: 16px;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.sidebar-nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.sidebar-nav a:hover::before {
    left: 100%;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary);
    transform: translateX(8px);
    box-shadow: var(--shadow-soft);
}

.sidebar-nav a svg {
    margin-right: 15px;
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.sidebar-nav a:hover svg {
    transform: scale(1.1);
}

.sidebar-footer {
    margin-top: auto;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.6;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Área de contenido */
.content-area {
    flex-grow: 1;
    padding: 50px;
    overflow-y: auto;
    position: relative;
}

.content-header {
    margin-bottom: 50px;
    text-align: center;
    animation: slideInUp 0.8s ease-out;
}

.content-header h1 {
    font-weight: 900;
    font-size: 3.2rem;
    color: var(--dark-text);
    margin: 0 0 15px 0;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.content-header p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin: 0 auto;
    font-weight: 500;
    max-width: 600px;
}

.welcome-message {
    background: var(--gradient-accent);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 20px;
    display: inline-block;
    box-shadow: var(--shadow-soft);
}

/* Grid de herramientas */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px;
    animation: staggerIn 1s ease-out 0.3s both;
}

.tool-card {
    background: white;
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    border: 1px solid rgba(13, 27, 42, 0.05);
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-accent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--shadow-strong);
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.tool-card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.1) 100%);
    transition: opacity 0.3s ease;
}

.tool-card:hover .tool-card-image::after {
    opacity: 0.7;
}

.status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(224, 177, 203, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.status-badge.available {
    background: rgba(40, 167, 69, 0.9);
}

.status-badge.coming-soon {
    background: rgba(255, 193, 7, 0.9);
}

.tool-card-content {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.tool-card-content h3 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--dark-text);
    margin: 0 0 15px 0;
    letter-spacing: -0.01em;
}

.tool-card-content p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    flex-grow: 1;
    margin: 0 0 25px 0;
    line-height: 1.6;
}

.tool-card .btn {
    width: 100%;
    text-align: center;
    border-radius: 16px;
}

.tool-card .btn svg {
    margin-left: 8px;
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.tool-card .btn:hover svg {
    transform: translateX(4px);
}

/* Tarjetas placeholder */
.placeholder-card {
    border: 2px dashed var(--border-light);
    background: linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(248,249,250,0.9) 100%);
    backdrop-filter: blur(10px);
    text-align: center;
    align-items: center;
    justify-content: center;
    position: relative;
}

.placeholder-card::before {
    background: linear-gradient(135deg, var(--blue-grey) 0%, var(--accent) 100%);
}

.placeholder-card:hover {
    border-color: var(--accent);
    background: rgba(224, 177, 203, 0.05);
}

.placeholder-card .tool-card-content {
    justify-content: center;
    align-items: center;
}

.placeholder-card svg {
    color: var(--blue-grey);
    margin-bottom: 20px;
    width: 48px;
    height: 48px;
    opacity: 0.8;
}

.placeholder-card h3 {
    color: var(--dark-text);
}

.placeholder-card p {
    flex-grow: 0;
}

.coming-soon {
    background: linear-gradient(135deg, var(--blue-grey) 0%, var(--accent) 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 15px;
    display: inline-block;
}

/* Página de perfil */
.profile-container {
    max-width: 800px;
    margin: 0 auto;
}

.profile-header {
    background: white;
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-soft);
    text-align: center;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--gradient-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 3rem;
    font-weight: 900;
    color: white;
    box-shadow: var(--shadow-soft);
}

.profile-form {
    background: white;
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow-soft);
}

.profile-form h2 {
    color: var(--dark-text);
    margin-bottom: 30px;
    font-size: 1.8rem;
    font-weight: 700;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

/* 🆕 ESTILOS PARA FUNCIONALIDAD DE COMPARTIR EN PERFIL */

/* Estilos para botones de compartir */
.share-button {
    background: #25D366;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    margin-left: 10px;
    font-weight: 500;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(37, 211, 102, 0.2);
}

.share-button:hover {
    background: #1a9e52;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 211, 102, 0.3);
}

.share-button:active {
    transform: translateY(0);
}

.share-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.link-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.link-text {
    flex: 1;
    min-width: 200px;
    word-break: break-all;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.copy-button {
    background: #667eea;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.copy-button:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.copy-button:active {
    transform: translateY(0);
}

/* Estilo especial para la sección de afiliación */
#affiliate-section {
    border: 2px dashed rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

#affiliate-section:hover {
    border-color: rgba(102, 126, 234, 0.4);
    background: rgba(102, 126, 234, 0.02);
}

/* Animación para mostrar/ocultar botones */
.copy-button,
.share-button {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease;
}

.copy-button[style*="display: none"],
.share-button[style*="display: none"] {
    opacity: 0;
    transform: scale(0.8);
}

/* 🚨 OPTIMIZACIÓN DE LOADING PARA PREVENIR PARPADEOS */

/* Prevenir parpadeo del contenido principal */
#main-content {
    opacity: 0;
    transition: opacity 0.4s ease;
}

#main-content.fade-in {
    opacity: 1;
}

/* Loading optimizado */
.loading-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    color: white;
    transition: opacity 0.3s ease;
}

.loading-container.hide {
    opacity: 0;
    pointer-events: none;
}

/* 📱 RESPONSIVE MOBILE PREMIUM */
@media (max-width: 768px) {
    /* 🎨 Mostrar header mobile premium */
    .mobile-header {
        display: block;
    }

    /* 🚨 FIX: Ocultar COMPLETAMENTE en páginas de auth */
    body[data-page="auth"] .mobile-header,
    body.auth-body .mobile-header,
    body[class*="auth"] .mobile-header {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    /* Ajustar body para el header SOLO en portal */
    body:not([data-page="auth"]):not(.auth-body):not([class*="auth"]) {
        padding-top: 68px;
    }

    /* Auth pages sin padding-top */
    body[data-page="auth"],
    body.auth-body,
    body[class*="auth"] {
        padding-top: 0 !important;
    }

    /* Ocultar sidebar en mobile */
    .sidebar {
        display: none;
    }

    /* Container ocupa todo el ancho */
    .main-container {
        flex-direction: column;
    }

    .content-area {
        padding: 30px 20px;
        width: 100%;
    }

    .content-header h1 {
        font-size: 2.5rem;
    }

    .content-header p {
        font-size: 1.1rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .tool-card-content {
        padding: 25px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .profile-form {
        padding: 30px 25px;
    }

    /* 🎨 Ajustes de header en mobile pequeño */
    .mobile-user-name-inline {
        max-width: 100px;
        font-size: 0.85rem;
    }

    .mobile-user-role {
        font-size: 0.7rem;
    }

    /* Ajustes para botones de compartir en mobile */
    .link-container {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .link-text {
        min-width: auto;
        margin-bottom: 8px;
    }

    .copy-button,
    .share-button {
        align-self: flex-start;
        margin-left: 0;
    }
}

/* Mobile muy pequeño */
@media (max-width: 480px) {
    .mobile-header {
        padding: 10px 15px;
    }

    /* Solo ajustar padding en páginas que NO son auth */
    body:not([data-page="auth"]):not(.auth-body):not([class*="auth"]) {
        padding-top: 60px;
    }

    .mobile-user-area {
        padding: 6px 10px;
        gap: 8px;
    }

    .mobile-user-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    .mobile-user-name-inline {
        max-width: 80px;
        font-size: 0.8rem;
    }

    .mobile-user-role {
        font-size: 0.65rem;
    }

    .mobile-user-dropdown {
        min-width: 200px;
        right: -10px;
    }

    .content-area {
        padding: 20px 15px;
    }

    /* Optimización del logo en pantallas muy pequeñas */
    .mobile-logo-img {
        width: 32px;
        height: 32px;
    }

    .mobile-logo-text {
        font-size: 1rem;
    }
}

/* 🚨 PREVENCIÓN ADICIONAL DE PARPADEOS */
body.auth-body .mobile-header,
body[data-page="auth"] .mobile-header,
body[class*="auth"] .mobile-header {
    visibility: hidden !important;
    opacity: 0 !important;
    display: none !important;
    position: absolute !important;
    top: -9999px !important;
    pointer-events: none !important;
}

/* Asegurar que auth pages no tengan espaciado superior */
.auth-body,
body[data-page="auth"],
body[class*="auth"] {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* 🎨 ANIMACIONES PREMIUM */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes staggerIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.mobile-header {
    animation: slideInDown 0.5s ease-out;
}

.mobile-user-dropdown.show {
    animation: bounceIn 0.4s ease-out;
}

/* Animación suave para la transición de contenido */
.fade-in {
    animation: fadeIn 0.4s ease-out;
}

/* Animación para elementos que aparecen en secuencia */
.animate-slide-up {
    animation: slideInUp 0.6s ease-out;
}

.animate-stagger {
    animation: slideInUp 0.8s ease-out 0.2s both;
}
