/* Professional Profile Dropdown Styles */
.profile-dropdown-container {
    position: relative;
    display: inline-block;
}

.profile-button {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    border-radius: 50px !important;
    padding: 8px 16px 8px 8px !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

.profile-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

.profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.profile-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-dropdown-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
    margin-left: 4px;
}

.profile-button.open .profile-dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.profile-dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 280px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    padding: 12px;
    display: none;
    z-index: 10000;
    animation: dropdownSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.profile-dropdown-menu.open {
    display: block;
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* User Info Header */
.profile-dropdown-header {
    padding: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 8px;
}

.profile-dropdown-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.profile-dropdown-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.profile-dropdown-info {
    flex: 1;
    min-width: 0;
}

.profile-dropdown-name {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-dropdown-email {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-dropdown-badge {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.15));
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: #059669;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
}

/* Menu Items */
.profile-dropdown-section {
    padding: 4px 0;
}

.profile-dropdown-section + .profile-dropdown-section {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin-top: 8px;
    padding-top: 8px;
}

.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}

.profile-dropdown-item:hover {
    background: rgba(102, 126, 234, 0.08);
    color: #667eea;
    transform: translateX(4px);
}

.profile-dropdown-icon {
    font-size: 18px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.profile-dropdown-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.profile-dropdown-label {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.profile-dropdown-description {
    font-size: 12px;
    color: #9ca3af;
    margin: 2px 0 0 0;
}

.profile-dropdown-item:hover .profile-dropdown-description {
    color: #667eea;
}

/* Sign Out Button */
.profile-dropdown-signout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.profile-dropdown-signout:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Stats/Usage Display */
.profile-usage-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-radius: 10px;
    margin: 8px 0;
}

.profile-stat {
    text-align: center;
}

.profile-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #667eea;
    margin: 0 0 4px 0;
}

.profile-stat-label {
    font-size: 11px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

/* Dark Mode Support */
.dark-mode .profile-dropdown-menu {
    background: rgba(15, 23, 42, 0.98);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.dark-mode .profile-dropdown-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .profile-dropdown-name {
    color: #f1f5f9;
}

.dark-mode .profile-dropdown-email {
    color: #9ca3af;
}

.dark-mode .profile-dropdown-section + .profile-dropdown-section {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .profile-dropdown-item {
    color: #e2e8f0;
}

.dark-mode .profile-dropdown-item:hover {
    background: rgba(139, 92, 246, 0.15);
    color: #c4b5fd;
}

.dark-mode .profile-dropdown-description {
    color: #6b7280;
}

.dark-mode .profile-dropdown-item:hover .profile-dropdown-description {
    color: #a78bfa;
}

.dark-mode .profile-usage-stats {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.dark-mode .profile-stat-value {
    color: #a78bfa;
}

.dark-mode .profile-stat-label {
    color: #9ca3af;
}

.dark-mode .profile-dropdown-badge {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
    color: #34d399;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .profile-button {
        padding: 8px 12px 8px 8px !important;
        font-size: 0.9rem !important;
    }
    
    .profile-name {
        display: none;
    }
    
    .profile-dropdown-menu {
        min-width: 260px;
        right: -10px;
    }
    
    .profile-dropdown-header {
        padding: 10px;
    }
    
    .profile-dropdown-avatar {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .profile-dropdown-menu {
        position: fixed;
        right: 12px;
        left: 12px;
        min-width: auto;
        max-width: calc(100vw - 24px);
    }
}

